WordPress.org

Ready to get started?Download WordPress

Forums

WP-CMS Post Control
Super User Support (1 post)

  1. aaronerk
    Member
    Posted 3 years ago #

    I like your plugin, but found that it doesn't support super users. Super users are global administrators for multi-site (formerly multi user) wordpress installations. I made a change to your pcore_userrole() method inc/wp-cms-class-pcontrol.php that makes super users look like administrators. It be great if you could include this into the plugin. Without the change super-admins will not be treated as administrators and won't get the effects of your plugin. Hope it helps.

    function pcore_userrole() {
    global $current_user;
    get_currentuserinfo();
    $theuser = new WP_User( $current_user->ID );

    if ( !empty( $theuser->roles ) && is_array( $theuser->roles ) ) {
    foreach ( $theuser->roles as $role )
    $theuserrole=$role;
    }

    if ( (!isset($theuserrole) || is_null($theuserrole) )
    && is_super_admin($theuser->ID) ) {
    $theuserrole = "administrator";
    }

    return $theuserrole;
    }

    http://wordpress.org/extend/plugins/wp-cms-post-control/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic