ClassesBigCommerceNav_MenuNav Items Meta Box

Nav_Items_Meta_Box

Responsible for handling the BigCommerce menu items in the nav menu admin

Constants

ConstantVisibilityTypeValue
NAMEpublic’bigcommerce_nav_menu’
ACTIONpublic’bigcommerce_add_menu_items’
CATEGORIESpublic’bigcommerce_categories’
BRANDSpublic’bigcommerce_brands’
USER_INITIALIZEDpublic’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:

ParameterTypeDescription
$objectobject

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:

ParameterTypeDescription
$objectobject

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