\MainWP\DashboardMainWP_Menu

Class MainWP_Menu

Summary

Methods
Properties
Constants
get_class_name()
__construct()
init_mainwp_menus()
init_subpages_menu()
init_subpages_left_menu()
is_disable_menu_item()
add_left_menu()
render_left_menu()
render_sub_item()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

get_class_name()

get_class_name() : object

Method get_class_name()

Get Class Name.

Returns

object

__construct()

__construct() 

MainWP_Menu constructor.

Run each time the class is called. Define MainWP Main Menu Items.

init_subpages_left_menu()

init_subpages_left_menu(array  $subPages, array  $initSubpage, string  $parentKey, mixed  $slug) : array

Method init_subpages_left_menu

Build left menu subpages array.

Parameters

array $subPages

Array of SubPages.

array $initSubpage

Initial SubPage Array.

string $parentKey

Parent Menu Slug.

mixed $slug

SubPage Slug.

Returns

array —

$initSubpage[] Final SubPages Array.

is_disable_menu_item()

is_disable_menu_item(string  $level, array  $item) : boolean

Method is_disable_menu_item

Check if $_mainwp_disable_menus_items contains any menu items to hide.

Parameters

string $level

The level the menu item is on.

array $item

The menu items meta data.

Returns

boolean —

True|False, default is False.

add_left_menu()

add_left_menu(array  $params = array(), integer  $level = 1) : array

Method add_left_menu

Build Top Level Menu

Parameters

array $params

Menu Item parameters.

integer $level

Menu Item Level 1 or 2.

Returns

array —

$mainwp_leftmenu[] | $mainwp_sub_leftmenu[].

render_left_menu()

render_left_menu() 

Method render_left_menu

Build Top Level Main Menu HTML & Render.

render_sub_item()

render_sub_item(mixed  $parent_key) 

Method render_sub_item

Grab all submenu items and attatch to Main Menu.

Parameters

mixed $parent_key

The parent key.