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(): string
Return Value:
The unique identifier for the metabox
get_title
protected get_title(): string
Return 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): void
Parameters:
Parameter | Type | Description |
---|---|---|
$object | object |
set_nav_menu_screen_options
public set_nav_menu_screen_options(): mixed
get_screen
protected get_screen(): string|array|null
Return Value:
The screens on which to display the metabox
get_context
protected get_context(): string
Return 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(): void
See Also:
- \BigCommerce\Nav_Menu\wp_ajax_add_menu_item -
Inherited methods
register
public register(): void
get_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|null
Return Value:
The screens on which to display the metabox
get_context
protected get_context(): string
Return Value:
One of ‘normal’, ‘side’, or ‘advanced’
get_priority
protected get_priority(): string
Return Value:
One of ‘high’, ‘core’, ‘default’, ‘low’
get_callback_args
protected get_callback_args(): null|array
Return Value:
Additional args to pass to the render callback
Automatically generated on 2025-01-21