mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00: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:
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user