[wp-trac] [WordPress Trac] #43026: Deprecated feature still used in WP User Query.
WordPress Trac
noreply at wordpress.org
Fri Jan 5 00:01:25 UTC 2018
#43026: Deprecated feature still used in WP User Query.
--------------------------------+-----------------------------
Reporter: kennithnichol | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Role/Capability | Version: trunk
Severity: normal | Keywords:
Focuses: ui, administration |
--------------------------------+-----------------------------
Today we noticed that our Editor users were not listed in the "Authors"
drop down on the post editor.
Looking at the wp_usermeta table revealed that Editors have the proper
capabilities; however, their user_level was set to 0. Now, it is likely by
accident that all editors were set to level_0. The point is that the
Author drop down still relies on this deprecated feature to produce its
list.
The code found in class-wp-user-query.php on line 323 clearly makes use of
the user_level value.
{{{#!php
$who_query = array(
'key' => $wpdb->get_blog_prefix( $blog_id ) . 'user_level',
'value' => 0,
'compare' => '!=',
);
}}}
Shouldn't this be updated to use a user_role based filter, since that is
the primary means by which user roles are assigned now?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43026>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list