mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
Update 1.2.2
This commit is contained in:
@@ -207,6 +207,10 @@ class UM_Query {
|
||||
function role_data( $role_slug ) {
|
||||
global $wpdb, $ultimatemember;
|
||||
|
||||
if ( get_option("um_cached_role_{$role_slug}") ) {
|
||||
return get_option("um_cached_role_{$role_slug}");
|
||||
}
|
||||
|
||||
if ($role_slug == 'admin' || $role_slug == 'member'){
|
||||
$try = $this->find_post_id('um_role','_um_core',$role_slug);
|
||||
if ( isset( $try ) ){
|
||||
@@ -235,6 +239,10 @@ class UM_Query {
|
||||
$array = $ultimatemember->setup->get_initial_permissions( $role_slug );
|
||||
|
||||
}
|
||||
|
||||
if ( !get_option("um_cached_role_{$role_slug}") ) {
|
||||
update_option("um_cached_role_{$role_slug}", $array );
|
||||
}
|
||||
|
||||
return $array;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user