yst_ga_admin_validate_settings

Filters the validation for the admin options.

Description

apply_filters( 'yst_ga_admin_validate_settings', (bool) $true, (array) $this_options ); 

Parameters (2)

0. $true (bool) => true
True if the validation is successful, WP_Error on error.
1. $this_options (array)
The options that are being saved.

Usage

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

Defined (1)

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

/admin/class-admin.php  
  1. return apply_filters( 'yst_ga_admin_validate_settings', true, $this->options );