Home / Admin / Allow Users Without Editing Permissions to Edit Their Author SEO Details
Duplicate Snippet

Embed Snippet on Your Site

Allow Users Without Editing Permissions to Edit Their Author SEO Details

This filter can be used to allow users that don’t have editing permissions to edit their Author SEO meta data.

10+
Code Preview
php
<?php
add_filter( 'aioseo_user_profile_tab_allowed_user_ids', 'aioseo_profile_tab_allowed_users', 10, 2 );
function aioseo_profile_tab_allowed_users( $user_ids, $user_id ) {
	if ( ! user_can( $user_id, 'edit_posts' ) ) {
		$user_ids[] = $user_id;
	}
	return $user_ids;
}

Comments

Add a Comment