wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
register_site_editor_menu_item › WordPress Function
Seitn/v
Veraltetn/v
› register_site_editor_menu_item ( $id, $label, $to, $parent_id = '', $parent_type = '' )
| Parameter: (5) |
|
| Definiert in: |
|
| Codex: |
Register a menu item for the site-editor page.
Quellcode
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;
}
}