Problem:
Administrator getting "You do not have permissions for that" when creating a new View. Default theme and plugin deactivation did not resolve.
Solution:
Toolset capabilities were missing from the administrator role. Added snippet to theme's functions.php to force-assign Toolset capabilities, reloaded, then removed the snippet (caps persist on the role):
add_action( 'admin_init', 'force_toolset_admin_capabilities' );
function force_toolset_admin_capabilities() {
$role = get_role( 'administrator' );
if ( ! $role ) {
return;
}
$caps = array(
'toolset_edit_views',
'wpcf_custom_post_type_view',
'wpcf_custom_post_type_edit',
'wpcf_custom_post_type_edit_others',
'wpcf_custom_taxonomy_view',
'wpcf_custom_taxonomy_edit',
'wpcf_custom_taxonomy_edit_others',
'wpcf_custom_field_view',
'wpcf_custom_field_edit',
'wpcf_custom_field_edit_others',
'wpcf_user_meta_field_view',
'wpcf_user_meta_field_edit',
'wpcf_user_meta_field_edit_others',
);
foreach ( $caps as $cap ) {
if ( ! $role->has_cap( $cap ) ) {
$role->add_cap( $cap );
}
}
}This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Dieses Thema enthält 6 Antworten, hat 1 Stimme.
Zuletzt aktualisiert von vor 1 month, 2 weeks.
Assistiert von: Christopher Amirian.