Search
 
SCRIPT & CODE EXAMPLE
 

PHP

WP Admin Bar Dev Links

<?php 
 
add_action('admin_bar_menu', 'devlinks_add_toolbar_items', 90);
function devlinks_add_toolbar_items($admin_bar){
    $admin_bar->add_menu( array(
        'id'    => 'devlinks_adminbar',
        'title' => '<span class="dev-icon"></span>'.__( 'Dev Links'),
        'href'  => '/wp-admin',
        'meta'  => array(
            'title' => __('Dev Links'),            
        ),
    ));
    $admin_bar->add_menu( array(
        'id'    => 'devlinks_adminbar_wpcodebox',
        'parent' => 'devlinks_adminbar',
        'title' => 'WPCodeBox',
        'href'  => '/wp-admin/admin.php?page=wpcb_menu_page_php',
        'meta'  => array(
            'title' => __('WPCodeBox'),
            'target' => '_self',
            'class' => 'devlinks_adminbar_wpcodebox'
        ),
    ));
          $admin_bar->add_menu( array(
        'id'    => 'devlinks_adminbar_automaticcss',
        'parent' => 'devlinks_adminbar',
        'title' => 'AutomaticCSS',
        'href'  => '/wp-admin/admin.php?page=automatic-css',
        'meta'  => array(
            'title' => __('AutomaticCSS'),
            'target' => '_self',
            'class' => 'devlinks_adminbar_automaticcss'
        ),
    ));
        $admin_bar->add_menu( array(
        'id'    => 'devlinks_adminbar_oxygentemplates',
        'parent' => 'devlinks_adminbar',
        'title' => 'Oxygen Templates',
        'href'  => '/wp-admin/edit.php?post_type=ct_template',
        'meta'  => array(
            'title' => __('Oxygen Templates'),
            'target' => '_self',
            'class' => 'devlinks_adminbar_oxygentemplates'
        ),
    ));
           $admin_bar->add_menu( array(
        'id'    => 'devlinks_adminbar_plugins',
        'parent' => 'devlinks_adminbar',
        'title' => 'Plugins',
        'href'  => '/wp-admin/plugins.php',
        'meta'  => array(
            'title' => __('Plugins'),
            'target' => '_self',
            'class' => 'devlinks_adminbar_plugins top-separator'
        ),
    ));
               $admin_bar->add_menu( array(
        'id'    => 'devlinks_adminbar_pages',
        'parent' => 'devlinks_adminbar',
        'title' => 'Pages',
        'href'  => '/wp-admin/edit.php?post_type=page',
        'meta'  => array(
            'title' => __('Seiten'),
            'target' => '_self',
            'class' => 'devlinks_adminbar_pages'
        ),
    ));
                $admin_bar->add_menu( array(
        'id'    => 'devlinks_adminbar_posts',
        'parent' => 'devlinks_adminbar',
        'title' => 'Posts',
        'href'  => '/wp-admin/edit.php',
        'meta'  => array(
            'title' => __('Beiträge'),
            'target' => '_self',
            'class' => 'devlinks_adminbar_posts'
        ),
    ));
   $admin_bar->add_menu( array(
        'id'    => 'devlinks_adminbar_mbposttypes',
        'parent' => 'devlinks_adminbar',
        'title' => 'Meta Box Post Types',
        'href'  => '/wp-admin/edit.php?post_type=mb-post-type',
        'meta'  => array(
            'title' => __('Post Types'),
            'target' => '_self',
            'class' => 'devlinks_adminbar_mbposttypes top-separator'
        ),
    ));
       $admin_bar->add_menu( array(
        'id'    => 'devlinks_adminbar_mbtaxonomies',
        'parent' => 'devlinks_adminbar',
        'title' => 'Meta Box Taxonomies',
        'href'  => '/wp-admin/edit.php?post_type=mb-taxonomy',
        'meta'  => array(
            'title' => __('Taxonomies'),
            'target' => '_self',
            'class' => 'devlinks_adminbar_mbtaxonomies'
        ),
    ));
           $admin_bar->add_menu( array(
        'id'    => 'devlinks_adminbar_mbcustomfields',
        'parent' => 'devlinks_adminbar',
        'title' => 'Meta Box Custom Fields',
        'href'  => '/wp-admin/edit.php?post_type=meta-box',
        'meta'  => array(
            'title' => __('Custom Fields'),
            'target' => '_self',
            'class' => 'devlinks_adminbar_mbcustomfields'
        ),
    ));
}



/* Add this to your stylesheet (optional): */ /*
 #wpadminbar .dev-icon:before {
    font: normal 20px/1 dashicons;
    content: 'f475';
    position: relative;
    float: left;
    speak: never;
    padding: 4px 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-image: none !important;
    margin-right: 6px;
    margin-top: 2px;
}
#wp-admin-bar-devlinks_adminbar {
    background: #3d4348!important;
}
#wpadminbar .top-separator {
    border-top: 1px solid #4b5760;
}
*/
Comment

PREVIOUS NEXT
Code Example
Php :: how to fetch group name in custom post type in wordpress 
Php :: __sleep and __wakeup 
Php :: replace class 
Php :: laravel error not responding well 
Php :: if ( $post_armi-have_posts() ) { while ($post_armi-have_posts() ) { $post_armi-the_post(); 
Php :: Syntax error or access violation: 1072 Key column doesnt exist in table laravel migrate 
Php :: HP officejet pro 8720 default password 
Php :: Prevent infinite loop when saving Statamic entry 
Php :: yii2 label of ActiveField 
Php :: how to echo whole array php 
Php :: php get last 4 digits of string 
Php :: Add “Affected Products” in catalog price rule 
Php :: strrev 
Php :: chunk in laravel 
Php :: file upload yii2 rest api 
Php :: php preg_replace callback 
Php :: how to increment a number after concatinating it with a date function in php 
Php :: php get last date of month 
Php :: php recapcha 
Php :: sort array by date php 
Php :: php to python converter online free 
Php :: General errorstring fetchAll() php 
Php :: Drupal 9 loop term objects to retrieve term data (id, name, uuid) 
Php :: laravel many to many relationship with pivot table 
Php :: radio checked according to previous data in latravel 
Php :: get current tax page 
Php :: plesk change php version 
Php :: same name selection in phpstorm mac 
Php :: wordpress function _() not working 
Php :: remove public from url laravel 7 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =