Ticket #18197: 18197.bar.3.diff
File 18197.bar.3.diff, 31.3 KB (added by , 13 years ago) |
---|
-
wp-admin/admin-header.php
diff --git wp-admin/admin-header.php wp-admin/admin-header.php index c7500e1..ac6b734 100644
var userSettings = { 62 62 thousandsSeparator = '<?php echo addslashes( $wp_locale->number_format['thousands_sep'] ); ?>', 63 63 decimalPoint = '<?php echo addslashes( $wp_locale->number_format['decimal_point'] ); ?>', 64 64 isRtl = <?php echo (int) is_rtl(); ?>; 65 65 66 66 function wp_set_width_class() { 67 67 var w = document.body.clientWidth, bc = document.body.className; 68 68 … … wp_set_width_class(); 115 115 <div id="wpwrap"> 116 116 <?php require(ABSPATH . 'wp-admin/menu-header.php'); ?> 117 117 <div id="wpcontent"> 118 <div id="wphead">119 <?php120 121 if ( is_network_admin() )122 $blog_name = sprintf( __('%s Network Admin'), esc_html($current_site->site_name) );123 elseif ( is_user_admin() )124 $blog_name = sprintf( __('%s Global Dashboard'), esc_html($current_site->site_name) );125 else126 $blog_name = get_bloginfo('name', 'display');127 if ( '' == $blog_name ) {128 $blog_name = __( 'Visit Site' );129 } else {130 $blog_name_excerpt = wp_html_excerpt($blog_name, 40);131 if ( $blog_name != $blog_name_excerpt )132 $blog_name_excerpt = trim($blog_name_excerpt) . '…';133 $blog_name = $blog_name_excerpt;134 unset($blog_name_excerpt);135 }136 $title_class = '';137 if ( function_exists('mb_strlen') ) {138 if ( mb_strlen($blog_name, 'UTF-8') > 30 )139 $title_class = 'class="long-title"';140 } else {141 if ( strlen($blog_name) > 30 )142 $title_class = 'class="long-title"';143 }144 ?>145 146 <img id="header-logo" src="<?php echo esc_url( includes_url( 'images/blank.gif' ) ); ?>" alt="" width="16" height="16" />147 <h1 id="site-heading" <?php echo $title_class ?>>148 <a href="<?php echo trailingslashit( get_bloginfo( 'url' ) ); ?>" title="<?php esc_attr_e('Visit Site') ?>">149 <span id="site-title"><?php echo $blog_name ?></span>150 </a>151 </h1>152 118 153 119 <?php 154 155 120 do_action('in_admin_header'); 156 157 $links = array();158 159 // Generate user profile and info links.160 $links[5] = sprintf( __('Howdy, %1$s'), $user_identity );161 162 $links[8] = '<a href="profile.php" title="' . esc_attr__('Edit your profile') . '">' . __('Your Profile') . '</a>';163 164 if ( is_multisite() && is_super_admin() ) {165 if ( !is_network_admin() )166 $links[10] = '<a href="' . network_admin_url() . '" title="' . ( ! empty( $update_title ) ? $update_title : esc_attr__('Network Admin') ) . '">' . __('Network Admin') . ( ! empty( $total_update_count ) ? ' (' . number_format_i18n( $total_update_count ) . ')' : '' ) . '</a>';167 else168 $links[10] = '<a href="' . get_dashboard_url( get_current_user_id() ) . '" title="' . esc_attr__('Site Admin') . '">' . __('Site Admin') . '</a>';169 }170 171 $links[15] = '<a href="' . wp_logout_url() . '" title="' . esc_attr__('Log Out') . '">' . __('Log Out') . '</a>';172 173 $links = apply_filters( 'admin_user_info_links', $links, $current_user );174 ksort( $links );175 176 // Trim whitespace and pipes from links, then convert to list items.177 $links = array_map( 'trim', $links, array_fill( 0, count( $links ), " |\n\t" ) );178 179 $howdy = array_shift( $links );180 181 $links_no_js = implode( ' | ', $links );182 $links_js = '<li>' . implode( '</li><li>', $links ) . '</li>';183 184 121 ?> 185 122 186 <div id="wphead-info">187 <div id="user_info">188 <p class="hide-if-js"><?php echo "$howdy | $links_no_js"; ?></p>189 190 <div class="hide-if-no-js">191 <p><?php echo $howdy; ?></p>192 <div id="user_info_arrow"></div>193 <div id="user_info_links_wrap"><div id="user_info_links">194 <ul><?php echo $links_js; ?></ul>195 </div></div>196 </div>197 </div>198 </div>199 200 </div>201 202 123 <div id="wpbody"> 203 124 <?php 204 125 unset($title_class, $blog_name, $total_update_count, $update_title); -
wp-admin/css/colors-classic.dev.css
diff --git wp-admin/css/colors-classic.dev.css wp-admin/css/colors-classic.dev.css index 2b29eb9..39d777a 100644
1 1 /*------------------------------------------------------------------------------ 2 2 3 3 4 Howdy! This is the CSS file that controls the 4 Howdy! This is the CSS file that controls the 5 5 Blue (classic) color style on the WordPress Dashboard. 6 6 7 7 This file contains both LTR and RTL styles. … … table.diff .diff-addedline ins { 1664 1664 background-image: linear-gradient(bottom, #eff8ff, #fff); /* proposed W3C Markup */ 1665 1665 } 1666 1666 1667 #screen-meta-links a.show-settings {1668 color: #606060;1669 }1670 1671 #screen-meta-links a.show-settings:hover {1672 color: #000;1673 }1674 1675 1667 #replysubmit { 1676 1668 background-color: #f1f1f1; 1677 1669 border-top-color: #ddd; … … body.press-this ul.category-tabs li.tabs a { 1897 1889 text-decoration: underline; 1898 1890 } 1899 1891 1900 #screen-meta a.show-settings,1901 1892 .toggle-arrow { 1902 1893 background: transparent url(../images/arrows-vs.png) no-repeat right 3px; 1903 1894 } 1904 1895 1905 #screen-meta .screen-meta-active a.show-settings {1906 background: transparent url(../images/arrows-vs.png) no-repeat right -33px;1907 }1908 1909 1896 .view-switch #view-switch-list { 1910 1897 background: transparent url(../images/list.png) no-repeat 0 0; 1911 1898 } … … div.widgets-sortables, 2256 2243 background: transparent url(../images/arrows-vs.png) no-repeat 4px 2px; 2257 2244 } 2258 2245 2259 .rtl #screen-meta a.show-settings,2260 2246 .toggle-arrow { 2261 2247 background: transparent url(../images/arrows-vs.png) no-repeat left 3px; 2262 2248 } 2263 2249 2264 .rtl #screen-meta .screen-meta-active a.show-settings {2265 background: transparent url(../images/arrows-vs.png) no-repeat left -33px;2266 }2267 2268 2250 .rtl .sidebar-name-arrow { 2269 2251 background: transparent url(../images/arrows-vs.png) no-repeat 5px 9px; 2270 2252 } -
wp-admin/css/colors-fresh.dev.css
diff --git wp-admin/css/colors-fresh.dev.css wp-admin/css/colors-fresh.dev.css index 2db91de..a378bcf 100644
table.widefat span.spam a, 766 766 color: #555; 767 767 } 768 768 769 #screen-meta { 770 background-color: #f1f1f1; 771 border-color: #ccc; 772 } 773 774 769 775 .login #backtoblog a { 770 776 color: #464646; 771 777 } … … table.widefat .spam a:hover, 954 960 955 961 .expanded #adminmenu li.wp-not-current-submenu:hover a.menu-top, 956 962 .expanded #adminmenu li.wp-not-current-submenu:hover .wp-menu-arrow { 957 background-color: #e ee; /* Fallback */958 background-image: -ms-linear-gradient(bottom, #ccc, #e ee); /* IE10 */959 background-image: -moz-linear-gradient(bottom, #ccc, #e ee); /* Firefox */960 background-image: -o-linear-gradient(bottom, #ccc, #e ee); /* Opera */961 background-image: -webkit-gradient(linear, left bottom, left top, from(#ccc), to(#e ee)); /* old Webkit */963 background-color: #e4e4e4; /* Fallback */ 964 background-image: -ms-linear-gradient(bottom, #ccc, #e4e4e4); /* IE10 */ 965 background-image: -moz-linear-gradient(bottom, #ccc, #e4e4e4); /* Firefox */ 966 background-image: -o-linear-gradient(bottom, #ccc, #e4e4e4); /* Opera */ 967 background-image: -webkit-gradient(linear, left bottom, left top, from(#ccc), to(#e4e4e4)); /* old Webkit */ 962 968 background-image: -webkit-linear-gradient(bottom, #ccc, #e4e4e4); /* new Webkit */ 963 background-image: linear-gradient(bottom, #ccc, #e ee); /* proposed W3C Markup */969 background-image: linear-gradient(bottom, #ccc, #e4e4e4); /* proposed W3C Markup */ 964 970 border-top-color: #e4e4e4; 965 971 border-bottom-color: #ccc; 966 972 text-shadow: 0 1px 0 rgba( 255, 255, 255, 0.4 ); … … table.diff .diff-addedline ins { 1279 1285 color: #D54E21; 1280 1286 } 1281 1287 1282 #screen-options-wrap,1283 #contextual-help-wrap {1284 background-color: #f1f1f1;1285 border-color: #dfdfdf;1286 }1287 1288 #screen-options-link-wrap,1289 #contextual-help-link-wrap {1290 background-color: #e3e3e3; /* Fallback */1291 border-right: 1px solid transparent;1292 border-left: 1px solid transparent;1293 border-bottom: 1px solid transparent;1294 background-image: -ms-linear-gradient(bottom, #dfdfdf, #f1f1f1); /* IE10 */1295 background-image: -moz-linear-gradient(bottom, #dfdfdf, #f1f1f1); /* Firefox */1296 background-image: -o-linear-gradient(bottom, #dfdfdf, #f1f1f1); /* Opera */1297 background-image: -webkit-gradient(linear, left bottom, left top, from(#dfdfdf), to(#f1f1f1)); /* old Webkit */1298 background-image: -webkit-linear-gradient(bottom, #dfdfdf, #f1f1f1); /* new Webkit */1299 background-image: linear-gradient(bottom, #dfdfdf, #f1f1f1); /* proposed W3C Markup */1300 }1301 1302 #screen-meta-links a.show-settings {1303 color: #777;1304 }1305 1306 #screen-meta-links a.show-settings:hover {1307 color: #000;1308 }1309 1310 1288 #replysubmit { 1311 1289 background-color: #f1f1f1; 1312 1290 border-top-color: #ddd; … … body.press-this ul.category-tabs li.tabs a { 1537 1515 text-decoration: underline; 1538 1516 } 1539 1517 1540 #screen-meta a.show-settings,1541 .toggle-arrow {1542 background: transparent url(../images/arrows.png) no-repeat right 3px;1543 }1544 1545 #screen-meta .screen-meta-active a.show-settings {1546 background: transparent url(../images/arrows.png) no-repeat right -33px;1547 }1548 1549 1518 .view-switch #view-switch-list { 1550 1519 background: transparent url(../images/list.png) no-repeat 0 0; 1551 1520 } … … div.widgets-sortables, 1889 1858 background: transparent url(../images/arrows.png) no-repeat 4px 2px; 1890 1859 } 1891 1860 1892 .rtl #screen-meta a.show-settings,1893 1861 .toggle-arrow { 1894 1862 background: transparent url(../images/arrows.png) no-repeat left 3px; 1895 1863 } 1896 1864 1897 .rtl #screen-meta .screen-meta-active a.show-settings {1898 background: transparent url(../images/arrows.png) no-repeat left -33px;1899 }1900 1901 1865 .rtl .sidebar-name-arrow { 1902 1866 background: transparent url(../images/arrows.png) no-repeat 5px 9px; 1903 1867 } -
wp-admin/css/wp-admin-rtl.dev.css
diff --git wp-admin/css/wp-admin-rtl.dev.css wp-admin/css/wp-admin-rtl.dev.css index adc49f9..6cd2ab7 100644
form.upgrade .hint { 375 375 6.2 - Screen Options Tabs 376 376 ------------------------------------------------------------------------------*/ 377 377 378 #screen-meta-links {379 margin: 0 0 0 19px;380 }381 382 378 #screen-meta .screen-reader-text { 383 379 visibility: hidden; 384 380 } 385 381 386 #screen-options-link-wrap,387 #contextual-help-link-wrap {388 float: left;389 margin: 0 6px 0 0;390 font-family: Tahoma, Arial, sans-serif;391 }392 393 382 #contextual-help-wrap li { 394 383 list-style-type: disc; 395 384 margin-left: auto; … … form.upgrade .hint { 401 390 .toggle-arrow-active { 402 391 background-position: bottom right; 403 392 } 404 #screen-meta a.show-settings {405 padding: 0 6px 0 16px;406 }407 393 408 394 #screen-options-wrap, 409 395 #contextual-help-wrap { -
wp-admin/css/wp-admin.dev.css
diff --git wp-admin/css/wp-admin.dev.css wp-admin/css/wp-admin.dev.css index 823b45d..300c34e 100644
code { 550 550 } 551 551 552 552 .wrap { 553 margin: 015px 0 0;553 margin: 4px 15px 0 0; 554 554 } 555 555 556 556 div.updated, … … form.upgrade .hint { 1470 1470 #adminmenu a, 1471 1471 #sidemenu a, 1472 1472 #taglist a, 1473 #catlist a, 1474 #show-settings a { 1473 #catlist a { 1475 1474 text-decoration: none; 1476 1475 } 1477 1476 … … form.upgrade .hint { 1581 1580 ------------------------------------------------------------------------------*/ 1582 1581 1583 1582 #screen-meta { 1584 position: relative; 1585 clear: both; 1586 } 1587 1588 #screen-meta-links { 1589 margin: 0 24px 0 0; 1583 position: fixed; 1584 max-height: 200px; 1585 top: -250px; 1586 left: 0; 1587 right: 0; 1588 margin-top: 28px; 1589 z-index: 200; 1590 max-height: 200px; 1591 overflow: auto; 1592 border-style: solid; 1593 border-width: 0 0 1px; 1590 1594 } 1591 1595 1592 1596 #screen-meta .screen-reader-text { 1593 1597 visibility: hidden; 1594 1598 } 1595 1599 1596 #screen-options-link-wrap,1597 #contextual-help-link-wrap {1598 float: right;1599 height: 22px;1600 padding: 0;1601 margin: 0 0 0 6px;1602 font-family: sans-serif;1603 -moz-border-radius-bottomleft: 3px;1604 -moz-border-radius-bottomright: 3px;1605 -webkit-border-bottom-left-radius: 3px;1606 -webkit-border-bottom-right-radius: 3px;1607 border-bottom-left-radius: 3px;1608 border-bottom-right-radius: 3px;1609 }1610 1611 1600 #contextual-help-wrap li { 1612 1601 list-style-type: disc; 1613 1602 margin-left: 18px; … … form.upgrade .hint { 1623 1612 .toggle-arrow-active { 1624 1613 background-position: bottom left; 1625 1614 } 1626 #screen-meta a.show-settings {1627 text-decoration: none;1628 z-index: 1;1629 padding: 0 16px 0 6px;1630 height: 22px;1631 line-height: 22px;1632 font-size: 12px;1633 display: block;1634 text-shadow: rgba(255,255,255,0.7) 0 1px 0;1635 }1636 1637 #screen-meta a.show-settings:hover {1638 text-decoration: none;1639 }1640 1615 1641 1616 #screen-options-wrap h5, 1642 1617 #contextual-help-wrap h5 { … … form.upgrade .hint { 1646 1621 1647 1622 #screen-options-wrap, 1648 1623 #contextual-help-wrap { 1649 border-style: none solid solid; 1650 border-top: 0 none; 1651 border-width: 0 1px 1px; 1652 margin: 0 20px 0 0; 1624 margin: 0; 1653 1625 padding: 8px 12px 12px; 1654 1626 } 1655 1627 … … strong .post-com-count { 2070 2042 8.0 - Layout Blocks 2071 2043 ------------------------------------------------------------------------------*/ 2072 2044 2073 body.admin-bar #wp head,2045 body.admin-bar #wpcontent, 2074 2046 body.admin-bar #adminmenu { 2075 2047 padding-top: 28px; 2076 2048 } -
wp-admin/includes/template.php
diff --git wp-admin/includes/template.php wp-admin/includes/template.php index f70e1c5..bad3573 100644
function screen_meta($screen) { 1748 1748 1749 1749 $show_screen = apply_filters('screen_options_show_screen', $show_screen, $screen); 1750 1750 1751 if ( $show_screen ) 1752 add_action( 'admin_bar_menu', 'wp_admin_bar_screen_options_menu', 80 ); 1753 1754 1751 1755 ?> 1752 1756 <div id="screen-meta"> 1753 1757 <?php if ( $show_screen ) : ?> … … function screen_meta($screen) { 1794 1798 1795 1799 echo $screen_options; 1796 1800 echo $settings; ?> 1797 <div><?php wp_nonce_field( 'screen-options-nonce', 'screenoptionnonce', false ); ?></div>1798 </form>1801 <div><?php wp_nonce_field( 'screen-options-nonce', 'screenoptionnonce', false ); ?></div> 1802 </form> 1799 1803 </div> 1800 1804 1801 1805 <?php endif; // $show_screen … … function screen_meta($screen) { 1820 1824 ?> 1821 1825 </div> 1822 1826 1823 <div id="screen-meta-links"> 1824 <div id="contextual-help-link-wrap" class="hide-if-no-js screen-meta-toggle"> 1825 <a href="#contextual-help" id="contextual-help-link" class="show-settings"><?php _e('Help') ?></a> 1826 </div> 1827 <?php if ( $show_screen ) { ?> 1828 <div id="screen-options-link-wrap" class="hide-if-no-js screen-meta-toggle"> 1829 <a href="#screen-options" id="show-settings-link" class="show-settings"><?php _e('Screen Options') ?></a> 1830 </div> 1831 <?php } ?> 1832 </div> 1833 </div> 1834 <?php 1827 </div> <?php // #screen-meta 1835 1828 } 1836 1829 1837 1830 /** -
wp-admin/js/common.dev.js
diff --git wp-admin/js/common.dev.js wp-admin/js/common.dev.js index a75cb0b..d00e7db 100644
showNotice = { 182 182 }; 183 183 184 184 screenMeta = { 185 element: null, 186 toggles: null, 187 page: null, 188 padding: null, 189 top: null, 185 190 links: { 186 ' screen-options-link-wrap': 'screen-options-wrap',187 ' contextual-help-link-wrap': 'contextual-help-wrap'191 'wp-admin-bar-screen-options': 'screen-options-wrap', 192 'wp-admin-bar-help': 'contextual-help-wrap' 188 193 }, 189 194 init: function() { 190 $('.screen-meta-toggle').click( screenMeta.toggleEvent ); 195 screenMeta.element = $('#screen-meta'); 196 screenMeta.toggles = $('.screen-meta-toggle'); 197 screenMeta.page = $('#wpcontent, #adminmenu'); 198 199 screenMeta.toggles.click( screenMeta.toggleEvent ); 191 200 }, 192 201 toggleEvent: function( e ) { 193 202 var panel; … … screenMeta = { 205 214 screenMeta.open( panel, $(this) ); 206 215 }, 207 216 open: function( panel, link ) { 208 $('.screen-meta-toggle').not( link ).css('visibility', 'hidden'); 217 // Open selected panels 218 link.addClass('selected'); 209 219 210 panel.slideDown( 'fast', function() { 211 link.addClass('screen-meta-active'); 212 }); 220 screenMeta.padding = parseInt( screenMeta.page.css('paddingTop'), 10 ); 221 screenMeta.top = parseInt( screenMeta.element.css('top'), 10 ); 222 223 panel.show(); 224 225 screenMeta.element.animate({ top: 0 }, 'fast'); 226 screenMeta.page.animate({ paddingTop: screenMeta.padding + screenMeta.element.outerHeight() }, 'fast'); 213 227 }, 214 228 close: function( panel, link ) { 215 panel.slideUp('fast', function() {216 link.removeClass('screen-meta-active');217 $('.screen-meta-toggle').css('visibility', '');229 screenMeta.element.animate({ top: screenMeta.top }, 'fast', function() { 230 panel.hide(); 231 link.removeClass('selected'); 218 232 }); 233 screenMeta.page.animate({ paddingTop: screenMeta.padding }, 'fast'); 219 234 } 220 235 }; 221 236 -
wp-includes/admin-bar.php
diff --git wp-includes/admin-bar.php wp-includes/admin-bar.php index 10c8114..39e371b 100644
function wp_admin_bar_my_account_menu( $wp_admin_bar ) { 82 82 83 83 if ( 0 != $user_id ) { 84 84 /* Add the 'My Account' menu */ 85 $avatar = get_avatar( get_current_user_id(), 16 ); 86 $id = ( ! empty( $avatar ) ) ? 'my-account-with-avatar' : 'my-account'; 85 $avatar = get_avatar( get_current_user_id(), 28 ); 86 $id = ( ! empty( $avatar ) ) ? 'my-account-with-avatar' : 'my-account'; 87 $howdy = sprintf( __('Howdy, %1$s'), $user_identity ); 87 88 88 $wp_admin_bar->add_menu( array( 'id' => $id, 'title' => $ avatar . $user_identity, 'href' => get_edit_profile_url( $user_id ) ) );89 $wp_admin_bar->add_menu( array( 'id' => $id, 'title' => $howdy . $avatar, 'href' => get_edit_profile_url( $user_id ) ) ); 89 90 90 91 /* Add the "My Account" sub menus */ 91 92 $wp_admin_bar->add_menu( array( 'id' => 'edit-profile', 'parent' => $id, 'title' => __( 'Edit My Profile' ), 'href' => get_edit_profile_url( $user_id ) ) ); … … function wp_admin_bar_my_account_menu( $wp_admin_bar ) { 94 95 } 95 96 96 97 /** 97 * Add the " Dashboard"/"Visit Site" menu.98 * Add the "Blog Name" menu in the front end. 98 99 * 99 * @since 3. 2.0100 * @since 3.3.0 100 101 */ 101 function wp_admin_bar_ dashboard_view_site_menu( $wp_admin_bar ) {102 $ user_id = get_current_user_id();102 function wp_admin_bar_blog_front_menu( $wp_admin_bar ) { 103 $blogname = get_bloginfo('name'); 103 104 104 if ( 0 != $user_id ) { 105 if ( is_admin() ) 106 $wp_admin_bar->add_menu( array( 'id' => 'view-site', 'title' => __( 'Visit Site' ), 'href' => home_url() ) ); 107 elseif ( is_multisite() ) 108 $wp_admin_bar->add_menu( array( 'id' => 'dashboard', 'title' => __( 'Dashboard' ), 'href' => get_dashboard_url( $user_id ) ) ); 109 else 110 $wp_admin_bar->add_menu( array( 'id' => 'dashboard', 'title' => __( 'Dashboard' ), 'href' => admin_url() ) ); 111 } 105 if ( empty( $blogname ) ) 106 $blogname = preg_replace( '#^(https?://)?(www.)?#', '', get_home_url() ); 107 108 109 $wp_admin_bar->add_menu( array( 110 'id' => 'blog-name', 111 'title' => $blogname, 112 'href' => admin_url(), 113 ) ); 114 115 // Add Dashboard item. 116 $wp_admin_bar->add_menu( array( 117 'id' => 'dashboard', 118 'title' => __( 'Dashboard' ), 119 'href' => admin_url(), 120 'parent' => 'blog-name', 121 ) ); 122 123 wp_admin_bar_appearance_menu( $wp_admin_bar ); 124 } 125 126 /** 127 * Add the "Blog Name" menu in the admin. 128 * 129 * @since 3.3.0 130 */ 131 function wp_admin_bar_blog_admin_menu( $wp_admin_bar ) { 132 $url = get_home_url(); 133 $blogname = get_bloginfo('name'); 134 135 if ( empty( $blogname ) ) 136 $blogname = preg_replace( '#^(https?://)?(www.)?#', '', $url ); 137 138 139 $wp_admin_bar->add_menu( array( 140 'id' => 'blog-name', 141 'title' => $blogname, 142 'href' => $url, 143 ) ); 112 144 } 113 145 114 146 /** … … function wp_admin_bar_my_sites_menu( $wp_admin_bar ) { 120 152 global $wpdb; 121 153 122 154 /* Add the 'My Sites' menu if the user has more than one site. */ 123 if ( count( $wp_admin_bar->user->blogs ) <= 1 ) 124 return; 155 // if ( count( $wp_admin_bar->user->blogs ) <= 1 ) 156 // return; 157 158 $grey_wp_logo_url = admin_url( 'images/wp-logo.png' ); 125 159 126 $wp_admin_bar->add_menu( array( 'id' => 'my-blogs', 'title' => __( 'My Sites' ), 'href' => admin_url( 'my-sites.php' ) ) ); 160 $grey_wp_logo = '<img src="' . esc_url( $grey_wp_logo_url ) . '" alt="' . esc_attr__( 'Blavatar' ) . '" width="16" height="16" class="blavatar"/>'; 161 162 if ( is_multisite() ) 163 $url = admin_url( 'my-sites.php' ); 164 else 165 $url = admin_url(); 166 167 $wp_admin_bar->add_menu( array( 168 'id' => 'my-blogs', 169 'title' => $grey_wp_logo, 170 'href' => $url, 171 ) ); 172 173 if ( is_multisite() && is_super_admin() && !is_network_admin() ) { 174 $wp_admin_bar->add_menu( array( 175 'parent' => 'my-blogs', 176 'id' => 'network-admin', 177 'title' => __('Network Admin'), 178 'href' => network_admin_url() 179 ) ); 180 } 127 181 128 $ default= includes_url('images/wpmini-blue.png');182 $blue_wp_logo_url = includes_url('images/wpmini-blue.png'); 129 183 130 184 foreach ( (array) $wp_admin_bar->user->blogs as $blog ) { 185 // Skip the current blog. 186 if ( $blog->userblog_id == $wp_admin_bar->user->active_blog->blog_id ) 187 continue; 188 131 189 // @todo Replace with some favicon lookup. 132 //$blavatar = '<img src="' . esc_url( blavatar_url( blavatar_domain( $blog->siteurl ), 'img', 16, $ default) ) . '" alt="Blavatar" width="16" height="16" />';133 $blavatar = '<img src="' . esc_url($ default) . '" alt="' . esc_attr__( 'Blavatar' ) . '" width="16" height="16" class="blavatar"/>';190 //$blavatar = '<img src="' . esc_url( blavatar_url( blavatar_domain( $blog->siteurl ), 'img', 16, $blue_wp_logo_url ) ) . '" alt="Blavatar" width="16" height="16" />'; 191 $blavatar = '<img src="' . esc_url($blue_wp_logo_url) . '" alt="' . esc_attr__( 'Blavatar' ) . '" width="16" height="16" class="blavatar"/>'; 134 192 135 193 $blogname = empty( $blog->blogname ) ? $blog->domain : $blog->blogname; 136 194 … … function wp_admin_bar_comments_menu( $wp_admin_bar ) { 280 338 return; 281 339 282 340 $awaiting_mod = wp_count_comments(); 283 $awaiting_mod = $awaiting_mod->moderated;341 $awaiting_mod = number_format_i18n( $awaiting_mod->moderated ); 284 342 285 $awaiting_mod = $awaiting_mod ? "<span id='ab-awaiting-mod' class='pending-count'>" . number_format_i18n( $awaiting_mod ) . "</span>" : ''; 286 $wp_admin_bar->add_menu( array( 'id' => 'comments', 'title' => sprintf( __('Comments %s'), $awaiting_mod ), 'href' => admin_url('edit-comments.php') ) ); 343 $bubble = "<div class='ab-comments-bubble'>"; 344 $bubble .= "<div class='ab-comments-count'>$awaiting_mod</div>"; 345 $bubble .= "<div class='ab-comments-arrow'></div>"; 346 $bubble .= "</div>"; 347 348 $wp_admin_bar->add_menu( array( 349 'id' => 'comments', 350 'title' => $bubble, 351 'href' => admin_url('edit-comments.php'), 352 ) ); 287 353 } 288 354 289 355 /** … … function wp_admin_bar_appearance_menu( $wp_admin_bar ) { 296 362 if ( ! current_user_can('switch_themes') && ! current_user_can( 'edit_theme_options' ) ) 297 363 return; 298 364 299 $wp_admin_bar->add_menu( array( 'id' => 'appearance', 'title' => __('Appearance'), 'href' => admin_url('themes.php') ) ); 365 $wp_admin_bar->add_menu( array( 366 'id' => 'appearance', 367 'title' => __('Appearance'), 368 'href' => admin_url('themes.php'), 369 'parent' => 'blog-name', 370 ) ); 300 371 301 372 if ( ! current_user_can( 'edit_theme_options' ) ) 302 373 return; … … function wp_admin_bar_updates_menu( $wp_admin_bar ) { 337 408 } 338 409 339 410 /** 411 * Add screen options link. 412 * 413 * @since 3.3.0 414 */ 415 function wp_admin_bar_screen_options_menu( $wp_admin_bar ) { 416 $wp_admin_bar->add_menu( array( 417 'id' => 'screen-options', 418 'title' => __('Screen Options'), 419 'href' => '#', 420 'meta' => array( 421 'class' => 'screen-meta-toggle hide-if-no-js', 422 ), 423 ) ); 424 } 425 426 /** 427 * Add help link. 428 * 429 * @since 3.3.0 430 */ 431 function wp_admin_bar_help_menu( $wp_admin_bar ) { 432 $wp_admin_bar->add_menu( array( 433 'id' => 'help', 434 'title' => __('Help'), 435 'href' => '#', 436 'meta' => array( 437 'class' => 'screen-meta-toggle hide-if-no-js', 438 ), 439 ) ); 440 } 441 442 /** 443 * Add search form. 444 * 445 * @since 3.3.0 446 */ 447 function wp_admin_bar_search_menu( $wp_admin_bar ) { 448 $form = '<div id="adminbarsearch-wrap">'; 449 $form .= '<form action="' . home_url() . '" method="get" id="adminbarsearch">'; 450 $form .= '<input class="adminbar-input" name="s" id="adminbar-search"'; 451 $form .= 'type="text" value="" maxlength="150" placeholder="' . esc_attr__( 'Search' ) . '" />'; 452 $form .= '<input type="submit" class="adminbar-button" value="' . __('Search') . '"/>'; 453 $form .= '</form>'; 454 $form .= '</div>'; 455 456 $wp_admin_bar->add_menu( array( 457 'id' => 'search', 458 'title' => $form, 459 'href' => '#', 460 'meta' => array( 461 'class' => 'admin-bar-search', 462 // @TODO: Replace me with something far less hacky 463 'onclick' => 'if ( event.target.value != "Search" ) { return false; }', 464 ), 465 ) ); 466 } 467 468 /** 340 469 * Style and scripts for the admin bar. 341 470 * 342 471 * @since 3.1.0 … … function _get_admin_bar_pref( $context, $user = 0 ) { 422 551 return 'true' === $pref; 423 552 } 424 553 425 ?> 426 No newline at end of file 554 ?> -
wp-includes/class-wp-admin-bar.php
diff --git wp-includes/class-wp-admin-bar.php wp-includes/class-wp-admin-bar.php index 02156c1..d365e11 100644
class WP_Admin_Bar { 97 97 <?php endforeach; ?> 98 98 </ul> 99 99 </div> 100 101 <div id="adminbarsearch-wrap">102 <form action="<?php echo home_url(); ?>" method="get" id="adminbarsearch">103 <input class="adminbar-input" name="s" id="adminbar-search" type="text" value="" maxlength="150" />104 <input type="submit" class="adminbar-button" value="<?php _e('Search'); ?>"/>105 </form>106 </div>107 100 </div> 108 101 109 102 <?php … … class WP_Admin_Bar { 183 176 function add_menus() { 184 177 add_action( 'admin_bar_menu', 'wp_admin_bar_my_account_menu', 10 ); 185 178 add_action( 'admin_bar_menu', 'wp_admin_bar_my_sites_menu', 20 ); 186 add_action( 'admin_bar_menu', 'wp_admin_bar_dashboard_view_site_menu', 25 );187 179 add_action( 'admin_bar_menu', 'wp_admin_bar_edit_menu', 30 ); 188 add_action( 'admin_bar_menu', 'wp_admin_bar_shortlink_menu', 80 );189 180 add_action( 'admin_bar_menu', 'wp_admin_bar_updates_menu', 70 ); 181 add_action( 'admin_bar_menu', 'wp_admin_bar_shortlink_menu', 80 ); 190 182 191 if ( !is_network_admin() && !is_user_admin() ) { 183 if ( ! is_admin() ) { 184 add_action( 'admin_bar_menu', 'wp_admin_bar_blog_front_menu', 25 ); 192 185 add_action( 'admin_bar_menu', 'wp_admin_bar_new_content_menu', 40 ); 193 186 add_action( 'admin_bar_menu', 'wp_admin_bar_comments_menu', 50 ); 194 add_action( 'admin_bar_menu', 'wp_admin_bar_appearance_menu', 60 ); 187 add_action( 'admin_bar_menu', 'wp_admin_bar_search_menu', 100 ); 188 } else { 189 add_action( 'admin_bar_menu', 'wp_admin_bar_blog_admin_menu', 25 ); 190 add_action( 'admin_bar_menu', 'wp_admin_bar_help_menu', 90 ); 195 191 } 196 192 197 193 do_action( 'add_admin_bar_menus' ); -
wp-includes/css/admin-bar.dev.css
diff --git wp-includes/css/admin-bar.dev.css wp-includes/css/admin-bar.dev.css index 32e2845..174864b 100644
19 19 20 20 #wpadminbar a, 21 21 #wpadminbar a:hover, 22 #wpadminbar a img, 22 #wpadminbar a img, 23 23 #wpadminbar a img:hover { 24 24 outline: none; 25 25 border: none; … … 70 70 border-right: none; 71 71 } 72 72 73 #wpadminbar .quicklinks > ul > li:hover > a { 73 #wpadminbar .quicklinks > ul > li:hover > a, 74 #wpadminbar .quicklinks > ul > li.selected > a { 74 75 border-left-color: #707070; 75 76 } 76 77 … … 159 160 160 161 #wpadminbar .quicklinks .menupop a > span { 161 162 display: inline; 162 background: url(../images/admin-bar-sprite.png?d=11122010) right -5 8px no-repeat;163 background: url(../images/admin-bar-sprite.png?d=11122010) right -57px no-repeat; 163 164 padding-right: .8em; 164 165 } 165 166 … … 169 170 padding-right: 1.5em; 170 171 } 171 172 172 #wpadminbar .quicklinks a span#ab-awaiting-mod,173 173 #wpadminbar .quicklinks a span#ab-updates { 174 174 background: #eee; 175 175 color: #333; … … 184 184 border-radius: 10px; 185 185 } 186 186 187 #wpadminbar .quicklinks a:hover span#ab-awaiting-mod,188 187 #wpadminbar .quicklinks a:hover span#ab-updates { 189 188 background: #fff; 190 189 color: #000; 191 190 } 192 191 192 #wpadminbar #wp-admin-bar-my-account, 193 #wpadminbar #wp-admin-bar-my-account-with-avatar { 194 float: right; 195 } 196 193 197 #wpadminbar .quicklinks li#wp-admin-bar-my-account > a { 194 198 border-left: none; 195 199 } 196 200 197 201 #wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar > a { 198 202 border-left: none; 199 background: url(../images/admin-bar-sprite.png?d=11122010) top left no-repeat; 203 background: url(../images/admin-bar-sprite.png?d=11122010) top right no-repeat; 204 margin-right: -7px; 205 padding-right: 48px; 200 206 } 201 207 202 208 #wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar > a img { 203 209 width: 16px; 204 210 height: 16px; 205 display: inline;206 211 border: 1px solid #999; 207 vertical-align: middle; 208 margin: -2px 23px 0 -5px; 212 position: absolute; 213 right: 6px; 214 top: 5px; 209 215 padding: 0; 210 216 background: #eee; 211 float: none;212 217 } 213 218 214 219 #wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar ul { 215 left: 30px; 220 /* left: 30px;*/ 216 221 } 217 222 218 #wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar ul ul { 219 left: 0; 223 #wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar ul ul { 224 left: 0; 220 225 } 221 226 222 #wpadminbar .quicklinks .menupop li aimg.blavatar {227 #wpadminbar .quicklinks li img.blavatar { 223 228 vertical-align: middle; 224 margin: 0 8px 0 0;229 margin: -3px 4px 0 0; 225 230 padding: 0; 226 231 } 227 232 233 #wpadminbar #wp-admin-bar-search a { 234 padding: 0; 235 } 236 237 #wpadminbar .quicklinks .admin-bar-search:hover { 238 /* default background */ 239 background: transparent; 240 } 241 #wpadminbar .quicklinks .admin-bar-search:hover > a { 242 /* default borders */ 243 border-right: none; 244 border-left: 1px solid #808080; 245 } 246 228 247 #wpadminbar #adminbarsearch { 229 248 float: right; 230 height: 18px; 231 padding: 3px; 249 height: 26px; 250 padding: 2px 4px; 251 /* padding: 0;*/ 232 252 margin: 0; 233 253 } 234 254 235 255 #wpadminbar #adminbarsearch .adminbar-input { 256 height: 23px; 236 257 width: 140px; 237 height: auto;238 258 float: left; 239 font: 1 2px Arial, Helvetica, sans-serif;259 font: 13px Arial, Helvetica, sans-serif; 240 260 color: #555; 241 261 text-shadow: 0 1px 0 #fff; 242 border: 1px solid #626262;243 padding: 2px 3px;262 border: none; 263 padding: 0 3px 0 24px; 244 264 margin: 0 3px 0 0; 245 background: #ddd; 246 -moz-box-shadow: inset 2px 2px 1px #cdcdcd; 247 -webkit-box-shadow: inset 2px 2px 1px #cdcdcd; 248 box-shadow: inset 2px 2px 1px #cdcdcd; 249 -webkit-border-radius: 0; 250 -khtml-border-radius: 0; 251 -moz-border-radius: 0; 252 border-radius: 0; 265 266 background-color: rgba( 255, 255, 255, 0 ); 267 background-image: url('../../wp-content/themes/twentyeleven/images/search.png'); 268 background-repeat: no-repeat; 269 background-position: 4px 2px; 270 271 -webkit-border-radius: 3px; 272 -khtml-border-radius: 3px; 273 -moz-border-radius: 3px; 274 border-radius: 3px; 275 276 -moz-box-shadow: none; 277 -webkit-box-shadow: none; 278 box-shadow: none; 279 253 280 -moz-box-sizing: border-box; 254 281 -webkit-box-sizing: border-box; 255 282 -ms-box-sizing: border-box; 256 283 box-sizing: border-box; 257 284 outline: none; 285 286 -webkit-transition-duration: 400ms; 287 -webkit-transition-property: width, background; 288 -webkit-transition-timing-function: ease; 289 -moz-transition-duration: 400ms; 290 -moz-transition-property: width, background; 291 -moz-transition-timing-function: ease; 292 -o-transition-duration: 400ms; 293 -o-transition-property: width, background; 294 -o-transition-timing-function: ease; 258 295 } 259 296 297 #wpadminbar #adminbarsearch .adminbar-input:focus { 298 width: 200px; 299 background-color: rgba( 255, 255, 255, 0.9 ); 300 } 301 302 /* Two rules to ensure browser recognition */ 303 #wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder { 304 color: #e4e4e4; 305 } 306 #wpadminbar #adminbarsearch .adminbar-input:-moz-placeholder { 307 color: #e4e4e4; 308 } 309 310 260 311 #wpadminbar #adminbarsearch .adminbar-button { 261 font: bold 12px Arial, Helvetica, sans-serif; 262 color: #444; 263 text-shadow: 0px 1px 0px #eee; 264 cursor: pointer; 265 float: left; 266 background: #aaa; 267 background: -moz-linear-gradient(bottom, #aaa, #cecece); 268 background: -webkit-gradient(linear, left bottom, left top, from(#aaa), to(#cecece)); 269 -webkit-border-radius: 10px; 270 -khtml-border-radius: 10px; 271 -moz-border-radius: 10px; 272 border-radius: 10px; 273 border: 1px solid #626262; 274 padding: 2px 13px; 275 margin: 0; 276 width: auto; 277 height: auto; 312 display: none; 278 313 } 279 314 280 315 #wpadminbar #adminbarsearch .adminbar-button:active { … … 294 329 border: none; 295 330 } 296 331 332 /** 333 * Comments bubble 334 */ 335 #wpadminbar .ab-comments-bubble { 336 position: relative; 337 padding-top: 5px; 338 } 339 #wpadminbar .ab-comments-count { 340 background: #ddd; 341 color: #555; 342 text-shadow: none; 343 height: 1.2em; 344 line-height: 1.2em; 345 padding: 2px 8px 0; 346 font-size: 12px; 347 font-weight: bold; 348 -moz-border-radius: 10px; 349 -khtml-border-radius: 10px; 350 -webkit-border-radius: 10px; 351 border-radius: 10px; 352 } 353 354 #wpadminbar a:hover .ab-comments-count { 355 background: #fff; 356 color: #333; 357 } 358 359 #wpadminbar a .ab-comments-arrow { 360 height: 0; 361 position: absolute; 362 bottom: -4px; 363 left: 6px; 364 /* Use transparent borders to form a triangle */ 365 border-left: 5px solid #ddd; 366 border-bottom: 5px solid transparent; 367 } 368 #wpadminbar a:hover .ab-comments-arrow { 369 border-left-color: #fff; 370 } 371 297 372 298 373 /** 299 374 * IE 6-targeted rules