Update 1.2.2

This commit is contained in:
ultimatemember
2015-04-15 16:59:27 +02:00
parent 5e281fbeaf
commit 7b9b59ea8d
32 changed files with 1375 additions and 135 deletions
+8
View File
@@ -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;
}