Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php /** * Support for bbPress user roles and capabilities * * Project: User Role Edi..
Decoded Output download
<?php
/**
* Support for bbPress user roles and capabilities
*
* Project: User Role Editor WordPress plugin
* Author: Vladimir Garagulya
* Author email: [email protected]
* Author URI: http://shinephp.com
*
**/
class URE_bbPress {
public static $instance = null;
protected $lib = null;
protected function __construct(Ure_Lib $lib) {
$this->lib = $lib;
}
// end of __construct()
static public function get_instance(Ure_Lib $lib) {
if (!function_exists('bbp_filter_blog_editable_roles')) { // bbPress plugin is not active
return null;
}
if (self::$instance!==null) {
return self::$instance;
}
if ($lib->is_pro()) {
self::$instance = new URE_bbPress_Pro($lib);
} else {
self::$instance = new URE_bbPress($lib);
}
return self::$instance;
}
// end of get_instance()
/**
* Exclude roles created by bbPress
*
* @global array $wp_roles
* @return array
*/
public function get_roles() {
global $wp_roles;
$roles = bbp_filter_blog_editable_roles($wp_roles->roles); // exclude bbPress roles
return $roles;
}
// end of get_roles()
/**
* Get full list user capabilities created by bbPress
*
* @return array
*/
public function get_caps() {
$caps = array_keys(bbp_get_caps_for_role(bbp_get_keymaster_role()));
return $caps;
}
// end of get_caps()
}
// end of URE_bbPress class ?>
Did this file decode correctly?
Original Code
<?php
/**
* Support for bbPress user roles and capabilities
*
* Project: User Role Editor WordPress plugin
* Author: Vladimir Garagulya
* Author email: [email protected]
* Author URI: http://shinephp.com
*
**/
class URE_bbPress {
public static $instance = null;
protected $lib = null;
protected function __construct(Ure_Lib $lib) {
$this->lib = $lib;
}
// end of __construct()
static public function get_instance(Ure_Lib $lib) {
if (!function_exists('bbp_filter_blog_editable_roles')) { // bbPress plugin is not active
return null;
}
if (self::$instance!==null) {
return self::$instance;
}
if ($lib->is_pro()) {
self::$instance = new URE_bbPress_Pro($lib);
} else {
self::$instance = new URE_bbPress($lib);
}
return self::$instance;
}
// end of get_instance()
/**
* Exclude roles created by bbPress
*
* @global array $wp_roles
* @return array
*/
public function get_roles() {
global $wp_roles;
$roles = bbp_filter_blog_editable_roles($wp_roles->roles); // exclude bbPress roles
return $roles;
}
// end of get_roles()
/**
* Get full list user capabilities created by bbPress
*
* @return array
*/
public function get_caps() {
$caps = array_keys(bbp_get_caps_for_role(bbp_get_keymaster_role()));
return $caps;
}
// end of get_caps()
}
// end of URE_bbPress class
Function Calls
None |
Stats
MD5 | 42f89ebb57cbb5e5ca8d089d56e538c6 |
Eval Count | 0 |
Decode Time | 92 ms |