mirror of
git://develop.git.wordpress.org/
synced 2025-03-20 20:09:53 +01:00
Twenty Fourteen: Adjust capability queries when using version before WordPress 5.9-alpha.
As capability queries was introduced in 5.9, this commit allows for previous versions by assigning the "who" and unsetting "capability". Follow-up to [51943]. Props johnbillion, swissspidy. Fixes #16841. git-svn-id: https://develop.svn.wordpress.org/trunk@52290 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
58e8e8c1dd
commit
d418ae6c93
@ -498,6 +498,12 @@ if ( ! function_exists( 'twentyfourteen_list_authors' ) ) :
|
||||
'capability' => array( 'edit_posts' ),
|
||||
);
|
||||
|
||||
// Capability queries were only introduced in WP 5.9.
|
||||
if ( version_compare( $GLOBALS['wp_version'], '5.9-alpha', '<' ) ) {
|
||||
$args['who'] = 'authors';
|
||||
unset( $args['capability'] );
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters query arguments for listing authors.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user