monsterinsights_yst_ga_filter_push_vars

Deprecated Filter: 'yst_ga_filter_push_vars'.

Description

(array) monsterinsights_yst_ga_filter_push_vars( (array) $options ); 

Allow adding to the $options variables before scripts are required.

Returns (array)

Analytics.js options.

Parameters (1)

0. $options (array)
Analytics.js options.

Usage

  1. if ( !function_exists( 'monsterinsights_yst_ga_filter_push_vars' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-analytics-for-wordpress-by-monsterinsights/includes/deprecated.php'; 
  3.  
  4. // analytics.js options. 
  5. $options = array(); 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = monsterinsights_yst_ga_filter_push_vars($options); 
  9.  

Defined (1)

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

/includes/deprecated.php  
  1. function monsterinsights_yst_ga_filter_push_vars( $options ) { 
  2. if ( ! has_filter('yst_ga_filter_push_vars' ) ) { 
  3. return $options; 
  4. } else { 
  5. $message = sprintf( __( 'Use %s instead.', 'google-analytics-for-wordpress' ), '<code>monsterinsights_frontend_tracking_options_analytics_before_scripts</code>' ); 
  6. _monsterinsights_deprecated_hook( 'yst_ga_filter_push_vars', '6.0.0', $message ); 
  7.  
  8. $i = 0; 
  9. while ( true ) { 
  10. if ( empty( $options[ 'yst_ga_filter_push_vars_' . $i ] ) ) { 
  11. $options[ 'yst_ga_filter_push_vars_' . $i ] = apply_filters( 'yst_ga_filter_push_vars', $options );  
  12. break; 
  13. } else { 
  14. $i++; 
  15. return $options;