W3cubDocs

/WordPress

get_editable_authors( int $user_id )

This function has been deprecated. Use get_users() instead.

Gets author users who can edit posts.

Parameters

$user_id

(int) (Required) User ID.

Return

(array|bool) List of editable authors. False if no editable users.

Source

File: wp-admin/includes/deprecated.php

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

Changelog

Version Description
3.1.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_editable_authors