Make WordPress Core


Ignore:
Timestamp:
06/27/2025 02:25:07 PM (16 months ago)
Author:
johnbillion
Message:

Options, Meta APIs: Account for URL query parameters when checking the validity of requests to the /wp/v2/settings REST API route.

Follow-up to [60301].

Props sheldorofazeroth, Mamaduka, wildworks, johnbillion

Fixes #41604

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-settings-controller.php

    r60301 r60357  
    146146                $options = $this->get_registered_options();
    147147
    148                 $params = $request->get_params();
     148                $params = array_diff_key( $request->get_params(), $request->get_query_params() );
    149149
    150150                if ( empty( $params ) || ! empty( array_diff_key( $params, $options ) ) ) {
Note: See TracChangeset for help on using the changeset viewer.