[wp-trac] [WordPress Trac] #16841: Manually created user roles not showing in author dropdown regardless of assigned capabilities

WordPress Trac noreply at wordpress.org
Tue Jan 25 21:41:58 UTC 2022


#16841: Manually created user roles not showing in author dropdown regardless of
assigned capabilities
---------------------------------------------+-----------------------------
 Reporter:  10sexyapples                     |       Owner:  hellofromTonya
     Type:  defect (bug)                     |      Status:  closed
 Priority:  normal                           |   Milestone:  5.9
Component:  Role/Capability                  |     Version:  3.1
 Severity:  normal                           |  Resolution:  fixed
 Keywords:  has-patch commit needs-dev-note  |     Focuses:
---------------------------------------------+-----------------------------

Comment (by mnelson4):

 Just got the warning
 {{{#!php
 <?php

 Deprecated: WP_User_Query was called with an argument that is
 <strong>deprecated</strong> since version 5.9.0! <code>who</code> is
 deprecated. Use <code>capability</code> instead. in ...\wp-
 includes\functions.php on line 5600
 }}}

 Oups! Didn't realize I was even using it.

 I noticed the new "capability" argument
 [[https://developer.wordpress.org/reference/classes/wp_user_query/prepare_query/|isn't
 listed on developer.wordpress.org yet]]. It probably should be, right?
 Sorry if this is the wrong place to mention that.

 Also, for future similar situations, IMO it would have been nice to hold
 off deprecating the "who" argument for a few versions. Right now all
 plugins and themes that want to support WP 5.8 and 5.9 have to imitate
 @swissspidy's
 [[https://core.trac.wordpress.org/attachment/ticket/16841/16841-twentyfourteen.diff|fix
 to twentytwnety theme]] if we want to avoid a warning; whereas if we held
 off deprecating "who" it until there were relatively few WP 5.8 users
 left, we could have just increased the plugin's minimum WordPress version
 to 5.9 and kept our code simpler.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/16841#comment:94>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list