monsterinsights_settings_files

The Google Analytics for WordPress by MonsterInsights monsterinsights settings files hook.

Description

apply_filters( 'monsterinsights_settings_files', (callback) $array ); 

Parameters (1)

0. $array — Optional. (callback) => array( 'track_download_as' => array( 'id' => 'track_download_as', 'name' => __( 'Track downloads as an:', 'google-analytics-for-wordpress' ), 'desc' => __( 'Tracking as pageviews is not recommended, as this would skew your statistics, but it does make it possible to track downloads as goals. This feature requires that event tracking be turned on.', 'google-analytics-for-wordpress' ), 'type' => 'radio', 'std' => 'event', 'options' => array( 'event' => __( 'Event (recommended)', 'google-analytics-for-wordpress' ), 'pageview' => __( 'Pageview', 'google-analytics-for-wordpress' ) ), ), 'extensions_of_files' => array( 'id' => 'extensions_of_files', 'name' => __( 'Extensions of files to track as downloads:', 'google-analytics-for-wordpress' ), 'desc' => __( 'If you have enabled event tracking, MonsterInsights will send an event/pageview to GA if a link to a local file has one of the above extensions.', 'google-analytics-for-wordpress' ), 'type' => 'text', ), )
The array.

Usage

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

Defined (1)

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

/includes/admin/settings/register-settings.php  
  1. 'files' => apply_filters('monsterinsights_settings_files',