gtm4wp_add_plugin_action_links

The Google Tag Manager for WordPress gtm4wp add plugin action links function.

Description

gtm4wp_add_plugin_action_links( $links, $file ); 

Parameters (2)

0. $links
The links.
1. $file
The file.

Usage

  1. if ( !function_exists( 'gtm4wp_add_plugin_action_links' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-tag-manager-for-wordpress/admin/admin.php'; 
  3.  
  4. // The links. 
  5. $links = null; 
  6.  
  7. // The file. 
  8. $file = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = gtm4wp_add_plugin_action_links($links, $file); 
  12.  

Defined (1)

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

/admin/admin.php  
  1. function gtm4wp_add_plugin_action_links( $links, $file ) { 
  2. global $gtp4wp_plugin_basename; 
  3.  
  4. if ( $file != $gtp4wp_plugin_basename ) 
  5. return $links; 
  6.  
  7. $settings_link = '<a href="' . menu_page_url( GTM4WP_ADMINSLUG, false ) . '">' . esc_html( __( 'Settings' ) ) . '</a>'; 
  8.  
  9. array_unshift( $links, $settings_link ); 
  10.  
  11. return $links;