plugin_menu

The Google Map Tab plugin menu function.

Description

plugin_menu(); 

Usage

  1. if ( !function_exists( 'plugin_menu' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-map-tab/google-map-tab.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = plugin_menu(); 
  7.  

Defined (1)

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

/google-map-tab.php  
  1. function plugin_menu() { 
  2. // create menu in submenu page 
  3. add_menu_page( 'Google Map Tab', 'Google Map Tab', 'manage_options', 'options', 'wp_options', plugin_dir_url( __FILE__ ).'/inc/js/images/gmt-icon.png' ); 
  4. add_submenu_page('options', __( 'List', 'googlemaptab' ), __( 'List', 'googlemaptab' ), 'manage_options', 'list', 'wp_list'); 
  5. add_submenu_page( 'options', __( 'Add', 'googlemaptab' ), __( 'Add', 'googlemaptab' ), 'manage_options', 'add', 'wp_add' ); 
  6. add_submenu_page('options', __( 'Settings', 'googlemaptab' ), __( 'Settings', 'googlemaptab' ), 'manage_options', 'settings', 'wp_options'); 
  7.  
  8. // global variable remove duplicate menu  
  9. unset($GLOBALS['submenu']['options'][0]); 
  10.  
  11. // call register settings function 
  12. add_action( 'admin_init', 'register_settings' );