get_editable_user_ids [ WordPress Function ]
get_editable_user_ids ( $user_id, $exclude_zeros = true, $post_type = 'post' )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Benzer Fonksiyonlar: get_editable_authors, get_editable_roles, get_author_user_ids, _get_additional_user_keys, get_current_user_id
No description yet.
Source
<?php
function get_editable_user_ids( $user_id, $exclude_zeros = true, $post_type = 'post' ) {
_deprecated_function( __FUNCTION__, '3.1', 'get_users()' );
global $wpdb;
$user = new WP_User( $user_id );
$post_type_obj = get_post_type_object($post_type);
if ( ! $user->has_cap($post_type_obj->cap->edit_others_posts) ) {
if ( $user->has_cap($post_type_obj->cap->edit_posts) || ! $exclude_zeros )
return array($user->ID);
else
return array();
}
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
$query = $wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s", $level_key);
if ( $exclude_zeros )
$query .= " AND meta_value != '0'";
return $wpdb->get_col( $query );
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- #14419 (Make get_editable_user_ids() use the role system instead ...
The function get_editable_user_ids() is used to populate the Author list in Post Edit admin page. Currently, it uses user levels to determine which users have ...
core.trac.wordpress.org - #14094 (get_editable_user_ids() does not function properly with ...
The exclude_zeros parameter in the get_editable_user_ids() should cause the returned ids to exclude subscribers. However the check compares against '0', ...
core.trac.wordpress.org - get_editable_user_ids (WordPress Function) - WPSeek.com
WordPress lookup for get_editable_user_ids, a WordPress Function. wpseek. com is a WordPress-centric search tool for developers and theme authors.
wpseek.com - get_editable_user_ids() WordPress function reference, arguments ...
get_editable_user_ids( $user_id, $exclude_zeros = true, $post_type = 'post' ). user_id: (int) User ID. exclude_zeros: (boolean) Optional, default is true. Whether ...
queryposts.com