Nav_Items_Meta_Box
Responsible for handling the BigCommerce menu items in the nav menu admin
- Full name:
\BigCommerce\Nav_Menu\Nav_Items_Meta_Box - Parent class:
\BigCommerce\Meta_Boxes\Meta_Box
Constants
| Constant | Visibility | Type | Value |
|---|---|---|---|
NAME | public | ’bigcommerce_nav_menu’ | |
ACTION | public | ’bigcommerce_add_menu_items’ | |
CATEGORIES | public | ’bigcommerce_categories’ | |
BRANDS | public | ’bigcommerce_brands’ | |
USER_INITIALIZED | public | ’bigcommerce_nav_settings_initialized’ |
Methods
get_name
protected get_name(): stringReturn Value:
The unique identifier for the metabox
get_title
protected get_title(): stringReturn Value:
The title of the metabox
render
Renders the meta box, emulating the markup of the WP core nav meta boxes to take advantage of the nav JS
public render(object $object): voidParameters:
| Parameter | Type | Description |
|---|---|---|
$object | object |
set_nav_menu_screen_options
public set_nav_menu_screen_options(): mixedget_screen
protected get_screen(): string|array|nullReturn Value:
The screens on which to display the metabox
get_context
protected get_context(): stringReturn Value:
One of ‘normal’, ‘side’, or ‘advanced’
handle_ajax_request
Handle the ajax request to add our custom menu item type. Hook in just before the standard WP handler, which would reject our data.
public handle_ajax_request(): voidSee Also:
- \BigCommerce\Nav_Menu\wp_ajax_add_menu_item -
Inherited methods
register
public register(): voidget_name
protected get_name(): string- This method is abstract.
Return Value:
The unique identifier for the metabox
get_title
protected get_title(): string- This method is abstract.
Return Value:
The title of the metabox
render
Render the metabox contents
public render(object $object): void- This method is abstract.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$object | object |
get_screen
protected get_screen(): string|array|nullReturn Value:
The screens on which to display the metabox
get_context
protected get_context(): stringReturn Value:
One of ‘normal’, ‘side’, or ‘advanced’
get_priority
protected get_priority(): stringReturn Value:
One of ‘high’, ‘core’, ‘default’, ‘low’
get_callback_args
protected get_callback_args(): null|arrayReturn Value:
Additional args to pass to the render callback
Automatically generated on 2025-01-21