rest_api_update_site_settings

Filters the settings to be updated on the site.

Description

apply_filters( 'rest_api_update_site_settings', (array) $this_input ); 

Parameters (1)

0. $this_input (array)
Associative array of site settings to be updated.

Usage

To run the hook, copy the example below.
  1. $this_input = apply_filters( 'rest_api_update_site_settings', $this_input ); 
  2.  
  3. if ( !empty( $this_input ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the rest_api_update_site_settings callback 
  2. function filter_rest_api_update_site_settings( $this_input ) { 
  3. // make filter magic happen here... 
  4. return $this_input
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'rest_api_update_site_settings', 'filter_rest_api_update_site_settings', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'rest_api_update_site_settings', 'filter_rest_api_update_site_settings', 10, 1 ); 

Defined (1)

The filter is defined in the following location(s).

/json-endpoints/class.wpcom-json-api-site-settings-endpoint.php  
  1. $input = apply_filters( 'rest_api_update_site_settings', $this->input() );