Update 1.1.6

This commit is contained in:
ultimatemember
2015-04-07 20:10:23 +02:00
parent 89722448cb
commit 5e281fbeaf
69 changed files with 820 additions and 222 deletions
-32
View File
@@ -6,10 +6,6 @@ class UM_Cache {
add_action( 'init', array(&$this, 'do_not_cache' ) );
add_action('um_admin_after_editing_role', array(&$this, 'delete_role_cache'), 10, 2 );
$this->role_data = get_option('um_cache_role_data');
}
/***
@@ -22,33 +18,5 @@ class UM_Cache {
}
}
/***
*** @clear cached role data
***/
function delete_role_cache( $post_id, $post ) {
$role_slug = $post->post_name;
if ( isset( $this->role_data[ $role_slug ] ) ) {
unset( $this->role_data[ $role_slug ] );
update_option('um_cache_role_data', $this->role_data);
}
}
/***
*** @get cached role data
***/
function role_data( $role_slug ) {
if ( isset( $this->role_data[ $role_slug ] ) )
return $this->role_data[ $role_slug ];
return null;
}
/***
*** @set role data cache
***/
function set_role_data( $role_slug, $array ) {
$this->role_data[ $role_slug ] = $array;
update_option('um_cache_role_data', $this->role_data);
}
}