wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



get_editable_authors › WordPress Function

Seitn/v
Veraltet3.1.0
get_editable_authors ( $user_id )
Parameter:
  • (int) $user_id User ID.
    Erforderlich: Ja
Gibt zurück:
  • (array|false) List of editable authors. False if no editable users.
Definiert in:
Codex:

Gets author users who can edit posts.



Quellcode

function get_editable_authors( $user_id ) {
	_deprecated_function( __FUNCTION__, '3.1.0', 'get_users()' );

	global $wpdb;

	$editable = get_editable_user_ids( $user_id );

	if ( !$editable ) {
		return false;
	} else {
		$editable = join(',', $editable);
		$authors = $wpdb->get_results( "SELECT * FROM $wpdb->users WHERE ID IN ($editable) ORDER BY display_name" );
	}

	return apply_filters('get_editable_authors', $authors);
}