wpseek.com
A WordPress-centric search engine for devs and theme authors
register_site_editor_menu_item › WordPress Function
Sincen/a
Deprecatedn/a
› register_site_editor_menu_item ( $id, $label, $to, $parent_id = '', $parent_type = '' )
| Parameters: (5) |
|
| Defined at: | |
| Codex: |
Register a menu item for the site-editor page.
Source
function register_site_editor_menu_item( $id, $label, $to, $parent_id = '', $parent_type = '' ) {
global $wp_site_editor_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_site_editor_menu_items[] = $menu_item;
}
}