Changeset 58813 for trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-pattern-directory-controller.php
- Timestamp:
- 07/27/2024 12:25:44 AM (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-pattern-directory-controller.php
r56753 r58813 88 88 */ 89 89 public function get_items( $request ) { 90 /*91 * Include an unmodified `$wp_version`, so the API can craft a response that's tailored to92 * it. Some plugins modify the version in a misguided attempt to improve security by93 * obscuring the version, which can cause invalid requests.94 */95 require ABSPATH . WPINC . '/version.php';96 97 90 $valid_query_args = array( 98 91 'offset' => true, … … 107 100 108 101 $query_args['locale'] = get_user_locale(); 109 $query_args['wp-version'] = $wp_version;102 $query_args['wp-version'] = wp_get_wp_version(); 110 103 $query_args['pattern-categories'] = isset( $request['category'] ) ? $request['category'] : false; 111 104 $query_args['pattern-keywords'] = isset( $request['keyword'] ) ? $request['keyword'] : false;
Note: See TracChangeset
for help on using the changeset viewer.