Changeset 16438 for trunk/wp-includes/admin-bar.php
- Timestamp:
- 11/17/2010 06:47:34 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/admin-bar.php
r16310 r16438 5 5 * This code handles the building and rendering of the press bar. 6 6 */ 7 7 8 8 /** 9 9 * Instantiate the admin bar object and set it up as a global for access elsewhere. … … 23 23 /* Instantiate the admin bar */ 24 24 $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 ) ) 26 26 $wp_admin_bar = new $admin_bar_class; 27 27 else 28 28 return false; 29 29 30 30 $wp_admin_bar->initialize(); 31 31 $wp_admin_bar->add_menus(); … … 61 61 62 62 do_action( 'wp_after_admin_bar_render' ); 63 63 64 64 $wp_admin_bar->unload_user_locale_translations(); 65 65 } … … 88 88 89 89 $user_id = get_current_user_id(); 90 90 91 91 if ( 0 != $user_id ) { 92 92 /* Add the 'My Account' menu */ 93 93 $wp_admin_bar->add_menu( array( 'id' => 'my-account', 'title' => $user_identity, 'href' => get_edit_profile_url( $user_id ) ) ); 94 94 95 95 /* Add the "My Account" sub menus */ 96 96 $wp_admin_bar->add_menu( array( 'parent' => 'my-account', 'title' => __( 'Edit My Profile' ), 'href' => get_edit_profile_url( $user_id ) ) ); … … 158 158 /** 159 159 * Provide a shortlink. 160 * 160 * 161 161 * @since 3.1.0 162 162 */ … … 172 172 /** 173 173 * Provide an edit link for posts and terms. 174 * 174 * 175 175 * @since 3.1.0 176 176 */ … … 198 198 if ( $ptype_obj->show_in_menu !== true || ! current_user_can( $ptype_obj->cap->edit_posts ) ) 199 199 continue; 200 200 201 201 $actions["post-new.php?post_type=$ptype"] = array( $ptype_obj->labels->singular_name, $ptype_obj->cap->edit_posts, "new-$ptype" ); 202 202 } … … 260 260 $wordpress_update_count = 1; 261 261 */ 262 262 263 263 $update_count = $plugin_update_count + $theme_update_count + $wordpress_update_count; 264 264 … … 298 298 ?> 299 299 <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 ) : 306 306 ?> 307 307 body { padding-top: 28px !important; } 308 <?php 309 endif; 308 <?php 309 endif; 310 310 311 311 if ( in_array( get_current_theme(), array('H3', 'H4', 'The Journalist v1.9') ) ) : … … 329 329 function is_admin_bar_showing() { 330 330 global $show_admin_bar; 331 331 332 332 /* For all these types of request we never want an admin bar period */ 333 333 if ( defined('XMLRPC_REQUEST') || defined('APP_REQUEST') || defined('DOING_AJAX') || defined('IFRAME_REQUEST') ) 334 334 return false; 335 335 336 336 if ( ! isset( $show_admin_bar ) || null === $show_admin_bar ) { 337 337 if ( ! is_user_logged_in() || ( is_admin() && ! is_multisite() ) ) {
Note: See TracChangeset
for help on using the changeset viewer.