monsterinsights_settings_affiliates

Affiliate Tracking Settings.

Description

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

Parameters (1)

0. $array — Optional. (callback) => array( 'track_internal_as_outbound' => array( 'id' => 'track_internal_as_outbound', 'name' => __( 'Set path for internal links to track as outbound links', 'google-analytics-for-wordpress' ), 'desc' => sprintf( esc_html__( 'If you want to track all internal links that begin with %1$s, enter %1$s in the box above. If you have multiple prefixes you can separate them with comma\'s: %2$s', 'google-analytics-for-wordpress' ), '/out/', '/out/, /recommends/' ), 'type' => 'text', ), 'track_internal_as_label' => array( 'id' => 'track_internal_as_label', 'name' => __( 'Label for those links:', 'google-analytics-for-wordpress' ), 'desc' => sprintf( esc_html__( 'The label to use for these links, this will be added to where the click came from, so if the label is %s, the label for a click from the content of an article becomes "outbound-article-aff".', 'google-analytics-for-wordpress' ), '"aff"' ), 'type' => 'text', ), )
The array.

Usage

To run the hook, copy the example below.
  1. $array = apply_filters( 'monsterinsights_settings_affiliates', $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_affiliates callback 
  2. function filter_monsterinsights_settings_affiliates( $array ) { 
  3. // make filter magic happen here... 
  4. return $array
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'monsterinsights_settings_affiliates', 'filter_monsterinsights_settings_affiliates', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'monsterinsights_settings_affiliates', 'filter_monsterinsights_settings_affiliates', 10, 1 ); 

Defined (1)

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

/includes/admin/settings/register-settings.php  
  1. 'affiliates' => apply_filters('monsterinsights_settings_affiliates',