Forum

WordPress - submenu...
 
Notifications
Clear all

WordPress - submenu, custom, external url (admin page)

   RSS

0
Topic starter

how to add?

1 Answer
0
Topic starter

 This is hax :)

  1. Debug and find __MY_VARIABLE__SLUG__
    1. die(var_dump($submenu));
  2. Search for right slug name
function add_custom_link_into_submenu() {
		global $submenu;
		$custom_url= 'https://google.com';
		$submenu["__MY_VARIABLE__SLUG__"][] = array( Click my link', 'manage_options', $custom_url );
}

 and register it inside init()

add_action('admin_menu', array($this,'add_custom_link_into_submenu'));

Odpowiedź

Author Name

Author Email

Your question *

 
Preview 0 Revisions Saved
Share: