WordPress.org

Ready to get started?Download WordPress

Forums

Banning Subscriber Roles to Wordspew (2 posts)

  1. virtualedgar
    Member
    Posted 6 years ago #

    Can anyone help me with the topic mentioned above? I don't want Subscriber Roles to use my shoutbox and it seems that wordspew doesn't have this kind of feature.

    Somebody please?!

    Thanks a lot!

  2. MasterShake
    Member
    Posted 6 years ago #

    if( $current_user->id )  {
    	foreach($wp_roles->role_names as $role => $Role) {
    		if (array_key_exists($role, $current_user->caps))
    			break;
    	}
    }
    
    if ($role == "administrator") //or whoever you want to access wordspew
    {
      if (function_exists('jal_get_shoutbox')) { jal_get_shoutbox(); }
    }

    put that where you want to display your wordspew

Topic Closed

This topic has been closed to new replies.

About this Topic