Menus dans la barre d’administration
This commit is contained in:
@@ -33,4 +33,75 @@ function theme_additional_images() {
|
||||
echo '<pre>' . print_r($_wp_additional_image_sizes) . '</pre>';
|
||||
}
|
||||
|
||||
|
||||
// Add Toolbar Menus
|
||||
function custom_toolbar() {
|
||||
global $wp_admin_bar;
|
||||
|
||||
$args = array(
|
||||
'id' => 'parent-menu',
|
||||
'title' => __( 'My Menu', 'yuzu-child' ),
|
||||
);
|
||||
$wp_admin_bar->add_menu( $args );
|
||||
|
||||
$args = array(
|
||||
'id' => 'child1-menu',
|
||||
'parent' => 'parent-menu',
|
||||
'title' => __( 'clicclac.info', 'yuzu-child' ),
|
||||
'href' => 'https://clicclac.info',
|
||||
);
|
||||
$wp_admin_bar->add_menu( $args );
|
||||
|
||||
$args = array(
|
||||
'id' => 'child2-menu',
|
||||
'parent' => 'parent-menu',
|
||||
'title' => __( 'Extensions', 'yuzu-child' ),
|
||||
'href' => 'https://silverbook.local/wordpress/wp-admin/plugins.php',
|
||||
);
|
||||
$wp_admin_bar->add_menu( $args );
|
||||
|
||||
$args = array(
|
||||
'id' => 'child3-menu',
|
||||
'parent' => 'parent-menu',
|
||||
'title' => __( 'Articles', 'yuzu-child' ),
|
||||
'href' => 'Articles: https://silverbook.local/wordpress/wp-admin/edit.php',
|
||||
);
|
||||
$wp_admin_bar->add_menu( $args );
|
||||
|
||||
$args = array(
|
||||
'id' => 'child4-menu',
|
||||
'parent' => 'parent-menu',
|
||||
'title' => __( 'Medias', 'yuzu-child' ),
|
||||
'href' => 'https://silverbook.local/wordpress/wp-admin/upload.php?rml_folder',
|
||||
);
|
||||
$wp_admin_bar->add_menu( $args );
|
||||
|
||||
$args = array(
|
||||
'id' => 'child5-menu',
|
||||
'parent' => 'parent-menu',
|
||||
'title' => __( 'Pages', 'yuzu-child' ),
|
||||
'href' => 'https://silverbook.local/wordpress/wp-admin/edit.php?post_type=page',
|
||||
);
|
||||
$wp_admin_bar->add_menu( $args );
|
||||
|
||||
$args = array(
|
||||
'id' => 'child6-menu',
|
||||
'parent' => 'parent-menu',
|
||||
'title' => __( 'Réglages', 'yuzu-child' ),
|
||||
'href' => 'https://silverbook.local/wordpress/wp-admin/options-general.php',
|
||||
);
|
||||
$wp_admin_bar->add_menu( $args );
|
||||
|
||||
$args = array(
|
||||
'id' => 'child6-menu',
|
||||
'parent' => 'parent-menu',
|
||||
'title' => __( 'WP/LR Sync (Galleries)', 'yuzu-child' ),
|
||||
'href' => 'https://silverbook.local/wordpress/wp-admin/admin.php?page=wplr-collections-tags-menu',
|
||||
);
|
||||
$wp_admin_bar->add_menu( $args );
|
||||
|
||||
}
|
||||
if ( is_admin() ) {
|
||||
add_action( 'wp_before_admin_bar_render', 'custom_toolbar', 999 );
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user