Return to General talk

WP 3.1 Admin bar: Graphene CSS

Home Forums Graphene WordPress theme General talk WP 3.1 Admin bar: Graphene CSS

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #638
    Anonymous

    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

    #13131
    Syahir Hakim
    Keymaster

    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.

    #13132
    Kim
    Member
Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.