get_editable_authors()

最后更新于:2021-11-26 09:06:56

get_editable_authors( int$user_id)

Gets author users who can edit posts.

参数

$user_id

(int) (Required) User ID.

响应

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

源文件

文件: gc-admin/includes/deprecated.php

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

	global $gcdb;

	$editable = get_editable_user_ids( $user_id );

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

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