Make WordPress Core


Ignore:
Timestamp:
11/17/2010 06:47:34 PM (16 years ago)
Author:
ryan
Message:

Pinking shears

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/admin-bar.php

    r16310 r16438  
    55 * This code handles the building and rendering of the press bar.
    66 */
    7  
     7
    88/**
    99 * Instantiate the admin bar object and set it up as a global for access elsewhere.
     
    2323        /* Instantiate the admin bar */
    2424        $admin_bar_class = apply_filters( 'wp_admin_bar_class', 'WP_Admin_Bar' );
    25         if ( class_exists( $admin_bar_class ) ) 
     25        if ( class_exists( $admin_bar_class ) )
    2626                $wp_admin_bar = new $admin_bar_class;
    2727        else
    2828                return false;
    29        
     29
    3030        $wp_admin_bar->initialize();
    3131        $wp_admin_bar->add_menus();
     
    6161
    6262        do_action( 'wp_after_admin_bar_render' );
    63        
     63
    6464        $wp_admin_bar->unload_user_locale_translations();
    6565}
     
    8888
    8989        $user_id = get_current_user_id();
    90        
     90
    9191        if ( 0 != $user_id ) {
    9292                /* Add the 'My Account' menu */
    9393                $wp_admin_bar->add_menu( array( 'id' => 'my-account', 'title' => $user_identity,  'href' => get_edit_profile_url( $user_id ) ) );
    94        
     94
    9595                /* Add the "My Account" sub menus */
    9696                $wp_admin_bar->add_menu( array( 'parent' => 'my-account', 'title' => __( 'Edit My Profile' ), 'href' => get_edit_profile_url( $user_id ) ) );
     
    158158/**
    159159 * Provide a shortlink.
    160  * 
     160 *
    161161 * @since 3.1.0
    162162 */
     
    172172/**
    173173 * Provide an edit link for posts and terms.
    174  * 
     174 *
    175175 * @since 3.1.0
    176176 */
     
    198198                if ( $ptype_obj->show_in_menu !== true || ! current_user_can( $ptype_obj->cap->edit_posts ) )
    199199                        continue;
    200                        
     200
    201201                $actions["post-new.php?post_type=$ptype"] = array( $ptype_obj->labels->singular_name, $ptype_obj->cap->edit_posts, "new-$ptype" );
    202202        }
     
    260260                $wordpress_update_count = 1;
    261261        */
    262  
     262
    263263        $update_count = $plugin_update_count + $theme_update_count + $wordpress_update_count;
    264264
     
    298298        ?>
    299299        <style type="text/css">
    300                 <?php 
    301                
    302                 if ( 
    303                         ( empty( $_GET['nobump'] ) || is_admin() ) && 
    304                         ! strpos( $_SERVER['REQUEST_URI'], 'media-upload.php' ) 
    305                 ) : 
     300                <?php
     301
     302                if (
     303                        ( empty( $_GET['nobump'] ) || is_admin() ) &&
     304                        ! strpos( $_SERVER['REQUEST_URI'], 'media-upload.php' )
     305                ) :
    306306                        ?>
    307307                        body { padding-top: 28px !important; }
    308                         <?php 
    309                 endif; 
     308                        <?php
     309                endif;
    310310
    311311                if ( in_array( get_current_theme(), array('H3', 'H4', 'The Journalist v1.9') ) ) :
     
    329329function is_admin_bar_showing() {
    330330        global $show_admin_bar;
    331        
     331
    332332        /* For all these types of request we never want an admin bar period */
    333333        if ( defined('XMLRPC_REQUEST') || defined('APP_REQUEST') || defined('DOING_AJAX') || defined('IFRAME_REQUEST') )
    334334                return false;
    335        
     335
    336336        if ( ! isset( $show_admin_bar ) || null === $show_admin_bar ) {
    337337                if ( ! is_user_logged_in() || ( is_admin() && ! is_multisite() ) ) {
Note: See TracChangeset for help on using the changeset viewer.