Deprecate unused get_author_user_ids()and get_editable_authors(). See #14572
git-svn-id: http://svn.automattic.com/wordpress/trunk@15540 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e7a6f6f967
commit
18469c28ff
|
@ -197,6 +197,47 @@ function use_codepress() {
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @deprecated 3.1.0
|
||||
*
|
||||
* @return array List of user IDs.
|
||||
*/
|
||||
function get_author_user_ids() {
|
||||
_deprecated_function( __FUNCTION__, '3.1' );
|
||||
|
||||
global $wpdb;
|
||||
if ( !is_multisite() )
|
||||
$level_key = $wpdb->get_blog_prefix() . 'user_level';
|
||||
else
|
||||
$level_key = $wpdb->get_blog_prefix() . 'capabilities'; // wpmu site admins don't have user_levels
|
||||
|
||||
return $wpdb->get_col( $wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s AND meta_value != '0'", $level_key) );
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated 3.1.0
|
||||
*
|
||||
* @param int $user_id User ID.
|
||||
* @return array|bool List of editable authors. False if no editable users.
|
||||
*/
|
||||
function get_editable_authors( $user_id ) {
|
||||
_deprecated_function( __FUNCTION__, '3.1' );
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register column headers for a particular screen.
|
||||
*
|
||||
|
|
|
@ -188,50 +188,6 @@ function edit_user( $user_id = 0 ) {
|
|||
return $user_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@internal Missing Short Description}}
|
||||
*
|
||||
* {@internal Missing Long Description}}
|
||||
*
|
||||
* @since unknown
|
||||
*
|
||||
* @return array List of user IDs.
|
||||
*/
|
||||
function get_author_user_ids() {
|
||||
global $wpdb;
|
||||
if ( !is_multisite() )
|
||||
$level_key = $wpdb->get_blog_prefix() . 'user_level';
|
||||
else
|
||||
$level_key = $wpdb->get_blog_prefix() . 'capabilities'; // wpmu site admins don't have user_levels
|
||||
|
||||
return $wpdb->get_col( $wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s AND meta_value != '0'", $level_key) );
|
||||
}
|
||||
|
||||
/**
|
||||
* {@internal Missing Short Description}}
|
||||
*
|
||||
* {@internal Missing Long Description}}
|
||||
*
|
||||
* @since unknown
|
||||
*
|
||||
* @param int $user_id User ID.
|
||||
* @return array|bool List of editable authors. False if no editable users.
|
||||
*/
|
||||
function get_editable_authors( $user_id ) {
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@internal Missing Short Description}}
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue