Make WordPress Core

Changeset 52290


Ignore:
Timestamp:
11/30/2021 07:23:34 PM (3 years ago)
Author:
hellofromTonya
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyfourteen/functions.php

    r51943 r52290  
    499499        );
    500500
     501        // Capability queries were only introduced in WP 5.9.
     502        if ( version_compare( $GLOBALS['wp_version'], '5.9-alpha', '<' ) ) {
     503            $args['who'] = 'authors';
     504            unset( $args['capability'] );
     505        }
     506
    501507        /**
    502508         * Filters query arguments for listing authors.
Note: See TracChangeset for help on using the changeset viewer.