wpseek.com
A WordPress-centric search engine for devs and theme authors



wp_register_options_connectors_menu_item › WordPress Function

Sincen/a
Deprecatedn/a
wp_register_options_connectors_menu_item ( $id, $label, $to, $parent_id = '', $parent_type = '' )
Parameters: (5)
  • (string) $id Menu item ID.
    Required: Yes
  • (string) $label Display label.
    Required: Yes
  • (string) $to Route path to navigate to.
    Required: Yes
  • (string) $parent_id Optional. Parent menu item ID.
    Required: No
    Default: (empty)
  • (string) $parent_type Optional. Parent type: 'drilldown' or 'dropdown'.
    Required: No
    Default: (empty)
Defined at:
Codex:

Register a menu item for the options-connectors page.



Source

function wp_register_options_connectors_menu_item( $id, $label, $to, $parent_id = '', $parent_type = '' ) {
	global $wp_options_connectors_menu_items;

	$menu_item = array(
		'id'    => $id,
		'label' => $label,
		'to'    => $to,
	);

	if ( ! empty( $parent_id ) ) {
		$menu_item['parent'] = $parent_id;
	}

	if ( ! empty( $parent_type ) && in_array( $parent_type, array( 'drilldown', 'dropdown' ), true ) ) {
		$menu_item['parent_type'] = $parent_type;
	}

	$wp_options_connectors_menu_items[] = $menu_item;
}