November 2013
Beginner to intermediate
376 pages
9h
English
In WordPress, the main navigation menu is located on the left of the screen where we have access to all the sections of the application. Similar to the admin toolbar, we have the ability to extend the main navigation menu with customized versions. Let's start by adding the admin-menu-invoking action to the constructor:
add_action( 'admin_menu', array( $this,'wpwa_customize_main_navigation' ) );
Now, consider the initial implementation of the wpwa_customize_main_navigation function:
public function wpwa_customize_main_navigation(){
global $menu,$submenu;
echo "<pre>";print_r($menu);exit;
}The preceding code uses the global variable menu for accessing the available main navigation menu items. Before we begin the ...
Read now
Unlock full access