WP 3.1 Admin bar: Graphene CSS

  • Anonymous

    #638

    If You put this code in functions.php it makes a menu item in WP 3.1

    Admin bar, appearance menu. Direct to Graphene theme CSS editor:

    function graphene_wp_admin_bar_theme_options() {
    global $wp_admin_bar;
    $wp_admin_bar->add_menu( array(
    'parent' => 'appearance',
    'id' => 'theme-editor',
    'title' => 'Graphene CSS',
    'href' => admin_url('theme-editor.php')
    ) );
    }
    add_action( 'admin_bar_menu', 'graphene_wp_admin_bar_theme_options', 61 );

    Remember functions.php must start with <?php and end with ?>

    But this saves me tons of time.

    Kim

    Admin

    Syahir Hakim

    #13131

    Cool tip! But I must say that this is not recommended, as it links to the theme editor, which edits the theme files directly.

    But cool tip nonetheless! I’ll add this to the theme so that it links to the theme’s options page instead.

    Kim

    #13132

Viewing 3 posts - 1 through 3 (of 3 total)

  • You must be logged in to reply to this topic.