Changeset 18888
- Timestamp:
- 10/05/2011 06:45:32 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-footer.php
r18830 r18888 22 22 $footer_text = array( 23 23 '<span id="footer-thankyou">' . __( 'Thank you for creating with <a href="http://wordpress.org/">WordPress</a>.' ) . '</span>', 24 __( '<a href="http://codex.wordpress.org/">Documentation</a>' ),25 sprintf( '<a href="%s">' . __( 'Freedoms' ) . '</a>', admin_url( 'freedoms.php' ) ),26 __('<a href="http://wordpress.org/support/forum/requests-and-feedback">Feedback</a>'),27 sprintf( '<a href="%s">' . __('Credits') . '</a>', admin_url('credits.php') ),28 24 ); 29 25 echo apply_filters( 'admin_footer_text', implode( ' • ', $footer_text ) ); -
trunk/wp-includes/admin-bar.php
r18873 r18888 92 92 } 93 93 94 // Add freedoms link 95 $wp_admin_bar->add_menu( array( 96 'parent' => 'wp-logo', 97 'id' => 'freedoms', 98 'title' => __('Freedoms'), 99 'href' => admin_url('freedoms.php'), 100 ) ); 101 102 // Add credits link 103 $wp_admin_bar->add_menu( array( 104 'parent' => 'wp-logo', 105 'id' => 'credits', 106 'title' => __('Credits'), 107 'href' => admin_url('credits.php'), 108 ) ); 109 110 // Add secondary menu. 111 $wp_admin_bar->add_menu( array( 112 'parent' => 'wp-logo', 113 'id' => 'wp-logo-secondary', 114 'title' => __( ' ' ), 115 'meta' => array( 116 'class' => 'secondary', 117 ), 118 ) ); 119 94 120 // Add codex link 95 121 $wp_admin_bar->add_menu( array( 96 'parent' => 'wp-logo ',122 'parent' => 'wp-logo-secondary', 97 123 'id' => 'documentation', 98 124 'title' => __('Documentation'), … … 100 126 ) ); 101 127 128 // Add feedback link 129 $wp_admin_bar->add_menu( array( 130 'parent' => 'wp-logo-secondary', 131 'id' => 'feedback', 132 'title' => __('Feedback'), 133 'href' => 'http://wordpress.org/support/forum/requests-and-feedback', 134 ) ); 135 102 136 // Add forums link 103 137 $wp_admin_bar->add_menu( array( 104 'parent' => 'wp-logo ',138 'parent' => 'wp-logo-secondary', 105 139 'id' => 'support-forums', 106 140 'title' => __('Support Forums'), … … 110 144 // Add WordPress.org link 111 145 $wp_admin_bar->add_menu( array( 112 'parent' => 'wp-logo ',146 'parent' => 'wp-logo-secondary', 113 147 'id' => 'wporg', 114 148 'title' => __('WordPress.org'), … … 180 214 'meta' => array( 181 215 'class' => 'user-info-item', 182 ),183 ) );184 185 $wp_admin_bar->add_menu( array(186 'parent' => 'my-account',187 'id' => 'my-account-secondary',188 'title' => ' ',189 'meta' => array(190 'class' => 'secondary',191 ),192 ) );193 }194 195 wp_admin_bar_my_sites_menu( $wp_admin_bar );196 }197 198 /**199 * Add the "Network Admin" menu.200 *201 * @since 3.3.0202 */203 function wp_admin_bar_network_admin_menu( $wp_admin_bar ) {204 if ( is_multisite() && is_super_admin() && ! is_network_admin() ) {205 $wp_admin_bar->add_menu( array(206 'id' => 'network-admin',207 'title' => __('Network Admin'),208 'href' => network_admin_url(),209 'meta' => array(210 'class' => 'opposite',211 216 ), 212 217 ) ); … … 280 285 'href' => $url, 281 286 ) ); 287 288 $wp_admin_bar->add_menu( array( 289 'parent' => 'blog-name', 290 'id' => 'view-site', 291 'title' => __( 'Visit Site' ), 292 'href' => home_url(), 293 ) ); 282 294 } 283 295 … … 290 302 global $wpdb; 291 303 292 if ( is_user_logged_in() ) { 293 // Add blog links 294 $blue_wp_logo_url = includes_url('images/wpmini-blue.png'); 295 296 foreach ( (array) $wp_admin_bar->user->blogs as $blog ) { 297 // Skip the current blog (unless we're in the network/user admin). 298 if ( $blog->userblog_id == get_current_blog_id() && ! is_network_admin() && ! is_user_admin() ) { 299 continue; 300 } 301 302 // @todo Replace with some favicon lookup. 303 //$blavatar = '<img src="' . esc_url( blavatar_url( blavatar_domain( $blog->siteurl ), 'img', 16, $blue_wp_logo_url ) ) . '" alt="Blavatar" width="16" height="16" />'; 304 $blavatar = '<img src="' . esc_url($blue_wp_logo_url) . '" alt="' . esc_attr__( 'Blavatar' ) . '" width="16" height="16" class="blavatar"/>'; 305 306 $blogname = empty( $blog->blogname ) ? $blog->domain : $blog->blogname; 307 $menu_id = 'blog-' . $blog->userblog_id; 308 309 $wp_admin_bar->add_menu( array( 310 'parent' => 'my-account-secondary', 311 'id' => $menu_id, 312 'title' => $blavatar . $blogname, 313 'href' => get_admin_url( $blog->userblog_id ), 314 ) ); 315 304 // Don't show for logged out users or single site mode. 305 if ( ! is_user_logged_in() || ! is_multisite() ) 306 return; 307 308 // Show only when there are more than two items in the menu. 309 if ( count( $wp_admin_bar->user->blogs ) <= 1 && ! is_super_admin() ) 310 return; 311 312 $wp_admin_bar->add_menu( array( 313 'id' => 'my-sites', 314 'title' => __( 'My Sites' ), 315 'href' => admin_url( 'my-sites.php' ), 316 ) ); 317 318 if ( is_super_admin() ) { 319 $wp_admin_bar->add_menu( array( 320 'parent' => 'my-sites', 321 'id' => 'network-admin', 322 'title' => __('Network Admin'), 323 'href' => network_admin_url(), 324 ) ); 325 } 326 327 if ( $wp_admin_bar->user->blogs ) { 328 $wp_admin_bar->add_menu( array( 329 'parent' => 'my-sites', 330 'id' => 'my-sites-secondary', 331 'title' => ' ', 332 'meta' => array( 333 'class' => 'secondary', 334 ), 335 ) ); 336 } 337 338 // Add blog links 339 $blue_wp_logo_url = includes_url('images/wpmini-blue.png'); 340 341 foreach ( (array) $wp_admin_bar->user->blogs as $blog ) { 342 // Skip the current blog (unless we're in the network/user admin). 343 if ( $blog->userblog_id == get_current_blog_id() && ! is_network_admin() && ! is_user_admin() ) { 344 continue; 345 } 346 347 // @todo Replace with some favicon lookup. 348 //$blavatar = '<img src="' . esc_url( blavatar_url( blavatar_domain( $blog->siteurl ), 'img', 16, $blue_wp_logo_url ) ) . '" alt="Blavatar" width="16" height="16" />'; 349 $blavatar = '<img src="' . esc_url($blue_wp_logo_url) . '" alt="' . esc_attr__( 'Blavatar' ) . '" width="16" height="16" class="blavatar"/>'; 350 351 $blogname = empty( $blog->blogname ) ? $blog->domain : $blog->blogname; 352 $menu_id = 'blog-' . $blog->userblog_id; 353 354 $wp_admin_bar->add_menu( array( 355 'parent' => 'my-sites-secondary', 356 'id' => $menu_id, 357 'title' => $blavatar . $blogname, 358 'href' => get_admin_url( $blog->userblog_id ), 359 ) ); 360 361 $wp_admin_bar->add_menu( array( 362 'parent' => $menu_id, 363 'id' => $menu_id . '-d', 364 'title' => __( 'Dashboard' ), 365 'href' => get_admin_url( $blog->userblog_id ), 366 ) ); 367 368 if ( current_user_can_for_blog( $blog->userblog_id, 'edit_posts' ) ) { 316 369 $wp_admin_bar->add_menu( array( 317 370 'parent' => $menu_id, 318 'id' => $menu_id . '- d',319 'title' => __( ' Dashboard' ),320 'href' => get_admin_url( $blog->userblog_id ),371 'id' => $menu_id . '-n', 372 'title' => __( 'New Post' ), 373 'href' => get_admin_url( $blog->userblog_id, 'post-new.php' ), 321 374 ) ); 322 323 if ( current_user_can_for_blog( $blog->userblog_id, 'edit_posts' ) ) {324 $wp_admin_bar->add_menu( array(325 'parent' => $menu_id,326 'id' => $menu_id . '-n',327 'title' => __( 'New Post' ),328 'href' => get_admin_url( $blog->userblog_id, 'post-new.php' ),329 ) );330 $wp_admin_bar->add_menu( array(331 'parent' => $menu_id,332 'id' => $menu_id . '-c',333 'title' => __( 'Manage Comments' ),334 'href' => get_admin_url( $blog->userblog_id, 'edit-comments.php' ),335 ) );336 }337 338 375 $wp_admin_bar->add_menu( array( 339 376 'parent' => $menu_id, 340 'id' => $menu_id . '- v',341 'title' => __( ' Visit Site' ),342 'href' => get_ home_url( $blog->userblog_id),377 'id' => $menu_id . '-c', 378 'title' => __( 'Manage Comments' ), 379 'href' => get_admin_url( $blog->userblog_id, 'edit-comments.php' ), 343 380 ) ); 344 381 } 382 383 $wp_admin_bar->add_menu( array( 384 'parent' => $menu_id, 385 'id' => $menu_id . '-v', 386 'title' => __( 'Visit Site' ), 387 'href' => get_home_url( $blog->userblog_id ), 388 ) ); 345 389 } 346 390 } -
trunk/wp-includes/class-wp-admin-bar.php
r18776 r18888 176 176 add_action( 'admin_bar_menu', 'wp_admin_bar_wp_menu', 10 ); 177 177 add_action( 'admin_bar_menu', 'wp_admin_bar_my_account_menu', 10 ); 178 add_action( 'admin_bar_menu', 'wp_admin_bar_my_sites_menu', 20 ); 178 179 add_action( 'admin_bar_menu', 'wp_admin_bar_edit_menu', 30 ); 179 180 add_action( 'admin_bar_menu', 'wp_admin_bar_new_content_menu', 40 ); … … 181 182 add_action( 'admin_bar_menu', 'wp_admin_bar_updates_menu', 70 ); 182 183 add_action( 'admin_bar_menu', 'wp_admin_bar_shortlink_menu', 80 ); 183 add_action( 'admin_bar_menu', 'wp_admin_bar_network_admin_menu', 80 );184 184 185 185 if ( ! is_admin() ) {
Note: See TracChangeset
for help on using the changeset viewer.