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:
Tonya Mork 2021-11-30 19:23:34 +00:00
parent 58e8e8c1dd
commit d418ae6c93

View File

@ -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.
*