aioseo_user_profile_tab_allowed_user_ids

Purpose

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

Arguments (2)

  1. $user_ids (array) – An array of user IDs.
  2. $user_id (int) – The current user ID.

Example code snippet

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;
}