Change WordPress user roles and capabilities › Forums › Bug Reports › Admin profile lost some of the Categories after latest update › Reply To: Admin profile lost some of the Categories after latest update
23/11/2017 at 02:40
#4435
Vladimir
Keymaster
Hi,
Thanks for this information. It seems I could introduce a bug. Can you try a quick workaround?
Open v. 4.38 wp-content/plugins/user-role-editor-pro/pro/includes/classes/post-edit-access.php, go to line #470, where function exclude_terms() is defined. Replace this part
if (!in_array($pagenow, array('edit.php', 'post.php', 'post-new.php'))) {
return $exclusions;
}
$terms_list_str = $this->user->get_post_categories_list();
with this version:
if (!in_array($pagenow, array('edit.php', 'post.php', 'post-new.php'))) {
return $exclusions;
}
if (!$this->user->is_restriction_applicable()) {
return;
}
$terms_list_str = $this->user->get_post_categories_list();
Updated version will not apply this restriction to a user with superadmin privileges.
I included this fix to the code and it will be available with the next update. Just wish to test it with your help to be sure, that I identified a problem correctly.