Skip to main content

The menu item Import is by default only displayed when logged in as an administrator – if you want to change that, you can use the following function:

add_filter('at_set_import_dashboard_capabilities', 'at_set_custom_import_dashboard_capabilities', 10, 1);
function at_set_custom_import_dashboard_capabilities($cap) {
	$cap = 'edit_pages';
	
	return $cap;
}

The value $cap matches the correspondent WordPress-Capability. You can see the different capabilities here:

Roles_and_Capabilities

In this case, also editors could now see the menu item Import.


Was this article helpful?

1 Star2 Stars3 Stars4 Stars5 Stars
(No Ratings Yet)

Keine Kommentare vorhanden


You have a question or an opinion about this post? Share it with us!

Your email address will not be published. Required fields are marked *

*
*