Change WordPress user roles and capabilities › Forums › Restrict or Permit access inside WordPress – how to › If no restrictions, user sees everything › Reply To: If no restrictions, user sees everything
27/07/2016 at 14:03
#2580
Vladimir
Keymaster
No problem.
The only custom filter which is currently included to URE’s code related to the edit restrictions items at user level is ‘ure_post_edit_access_authors_list’.
$value = apply_filters('ure_post_edit_access_authors_list', $value);
I will add more custom filters with a next version possibly.
You may use a general WordPress ‘get_user_metadata’ filter from get_meta_data() function:
$check = apply_filters( "get_{$meta_type}_metadata", null, $object_id, $meta_key, $single );
Here:
$object_id : $current_user->ID,
$meta_key : $wpdb->prefix .’ure_categories_list’
In both cases you should check if you set the category for this user or not yourself inside those filters.