Title: WP isAdmin
Author: Blaine Moore
Published: <strong>18 septembre 2020</strong>
Last modified: 16 mai 2022

---

Recherche d’extensions

Cette extension **n’a pas été testée avec plus de trois mises à jour majeures de
WordPress**. Elle peut ne plus être maintenue ou supportée et peut avoir des problèmes
de compatibilité lorsqu’elle est utilisée avec des versions de WordPress plus récentes.

![](https://s.w.org/plugins/geopattern-icon/wp-isadmin.svg)

# WP isAdmin

 Par [Blaine Moore](https://profiles.wordpress.org/blaine-moore/)

[Télécharger](https://downloads.wordpress.org/plugin/wp-isadmin.zip)

 * [Détails](https://fr-be.wordpress.org/plugins/wp-isadmin/#description)
 * [Avis](https://fr-be.wordpress.org/plugins/wp-isadmin/#reviews)
 * [Développement](https://fr-be.wordpress.org/plugins/wp-isadmin/#developers)

 [Support](https://wordpress.org/support/plugin/wp-isadmin/)

## Description

This plugin provides provides a simple short code to add or hide custom content 
to your posts and pages based on whether a user is an administrator (or other role)
or not.

This started as a way around having an automatic redirect if somebody belonged to
a specific WishListMember membership level but not wanting to redirect _off_ of 
the page
 if I was an admin (who always has access to all membership levels.)

## Captures d’écran

 * [[
 * A simple example for how to use the shortcodes.
 * [[
 * An example that includes a javascript redirect for WishListMember private tags,
   which still allows the admin user to stay on the page.

## FAQ

### What shortcodes are available?

[isAdmin][/isAdmin] and [isNotAdmin][/isNotAdmin] are both supported, and will only
show or hide the content (respectively) if the user is logged in and has an administrator

role (by default).

### Can I specify other roles than just the administrator role?

Yes, you can set the _role_ or _roles_ attribute. So if you’d like content that 
can only be seen by users with the « editor » role, you would use: [isAdmin roles
= »editor »][/isAdmin].

### Can I specify more than one role?

Yes, just provide a comma-separated list to the _roles_ attribute. For example: [
isAdmin roles= »editor,administrator »][/isAdmin]

### What is the difference between the *role* and *roles* attributes?

There is no difference; both are available as a convenience as I expected that if
I wanted to change it I wouldn’t remember if I needed it to be plural or not and
it would seem
 odd to specify a plural attribute for a singular condition (and vice
versa.) Basically, choose one or the other (if you want something other than checking
for administrator) and it will work as expected. If you specify both, then the _roles_
attribute takes precedence unless you set it to the default, in which case it will
use the _role_ attribute.

## Avis

Il n’y a aucun avis pour cette extension.

## Contributeurs & développeurs

« WP isAdmin » est un logiciel libre. Les personnes suivantes ont contribué à cette
extension.

Contributeurs

 *   [ Blaine Moore ](https://profiles.wordpress.org/blaine-moore/)

[Traduisez « WP isAdmin » dans votre langue.](https://translate.wordpress.org/projects/wp-plugins/wp-isadmin)

### Le développement vous intéresse ?

[Parcourir le code](https://plugins.trac.wordpress.org/browser/wp-isadmin/), consulter
le [SVN dépôt](https://plugins.svn.wordpress.org/wp-isadmin/), ou s’inscrire au 
[journal de développement](https://plugins.trac.wordpress.org/log/wp-isadmin/) par
[RSS](https://plugins.trac.wordpress.org/log/wp-isadmin/?limit=100&mode=stop_on_copy&format=rss).

## Journal

= 1.0.1 (2020-09-17)=
 * Initial Version

## Méta

 *  Version **1.0.1**
 *  Last updated **il y a 4 années**
 *  Active installations **Moins de 10**
 *  WordPress version ** 4.7 ou plus **
 *  Tested up to **6.0.0**
 *  PHP version ** 7.0 ou plus **
 *  Language
 * [English (US)](https://wordpress.org/plugins/wp-isadmin/)
 * Tag
 * [shortcode](https://fr-be.wordpress.org/plugins/tags/shortcode/)
 *  [Vue avancée](https://fr-be.wordpress.org/plugins/wp-isadmin/advanced/)

## Notes

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/wp-isadmin/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/wp-isadmin/reviews/)

## Contributeurs

 *   [ Blaine Moore ](https://profiles.wordpress.org/blaine-moore/)

## Support

Quelque chose à dire ? Besoin d’aide ?

 [Voir le forum de support](https://wordpress.org/support/plugin/wp-isadmin/)

## Faire un don

Souhaitez-vous soutenir l’avancement de cette extension ?

 [ Faire un don à cette extension ](https://www.charitynavigator.org/index.cfm?bay=search.summary&orgid=7614)