Ticket #18197: 18197.bar.diff
File 18197.bar.diff, 31.0 KB (added by , 13 years ago) |
---|
-
wp-includes/admin-bar.php
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 ) ) ); … … 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 ); 112 124 } 113 125 114 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 ) ); 144 } 145 146 /** 115 147 * Add the "My Sites/[Site Name]" menu and all submenus. 116 148 * 117 149 * @since 3.1.0 … … 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; 125 157 126 $ wp_admin_bar->add_menu( array( 'id' => 'my-blogs', 'title' => __( 'My Sites' ), 'href' => admin_url( 'my-sites.php' ) ));158 $grey_wp_logo_url = admin_url( 'images/wp-logo.png' ); 127 159 128 $ default = includes_url('images/wpmini-blue.png');160 $grey_wp_logo = '<img src="' . esc_url( $grey_wp_logo_url ) . '" alt="' . esc_attr__( 'Blavatar' ) . '" width="16" height="16" class="blavatar"/>'; 129 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 $blue_wp_logo_url = includes_url('images/wpmini-blue.png'); 174 130 175 foreach ( (array) $wp_admin_bar->user->blogs as $blog ) { 176 // Skip the current blog. 177 if ( $blog === $wp_admin_bar->user->active_blog ) 178 continue; 179 131 180 // @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"/>';181 //$blavatar = '<img src="' . esc_url( blavatar_url( blavatar_domain( $blog->siteurl ), 'img', 16, $blue_wp_logo_url ) ) . '" alt="Blavatar" width="16" height="16" />'; 182 $blavatar = '<img src="' . esc_url($blue_wp_logo_url) . '" alt="' . esc_attr__( 'Blavatar' ) . '" width="16" height="16" class="blavatar"/>'; 134 183 135 184 $blogname = empty( $blog->blogname ) ? $blog->domain : $blog->blogname; 136 185 … … 144 193 145 194 $wp_admin_bar->add_menu( array( 'parent' => 'blog-' . $blog->userblog_id, 'id' => 'blog-' . $blog->userblog_id . '-v', 'title' => __( 'Visit Site' ), 'href' => get_home_url($blog->userblog_id) ) ); 146 195 } 196 197 // Add WordPress.org link 198 $wp_admin_bar->add_menu( array( 199 'parent' => 'my-blogs', 200 'id' => 'wporg', 201 'title' => __('WordPress.org'), 202 'href' => 'http://wordpress.org', 203 ) ); 147 204 } 148 205 149 206 /** … … 280 337 return; 281 338 282 339 $awaiting_mod = wp_count_comments(); 283 $awaiting_mod = $awaiting_mod->moderated;340 $awaiting_mod = number_format_i18n( $awaiting_mod->moderated ); 284 341 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') ) ); 342 $bubble = "<div class='ab-comments-bubble'>"; 343 $bubble .= "<div class='ab-comments-count'>$awaiting_mod</div>"; 344 $bubble .= "<div class='ab-comments-arrow'></div>"; 345 $bubble .= "</div>"; 346 347 $wp_admin_bar->add_menu( array( 348 'id' => 'comments', 349 'title' => $bubble, 350 'href' => admin_url('edit-comments.php'), 351 ) ); 287 352 } 288 353 289 354 /** … … 296 361 if ( ! current_user_can('switch_themes') && ! current_user_can( 'edit_theme_options' ) ) 297 362 return; 298 363 299 $wp_admin_bar->add_menu( array( 'id' => 'appearance', 'title' => __('Appearance'), 'href' => admin_url('themes.php') ) ); 364 $wp_admin_bar->add_menu( array( 365 'id' => 'appearance', 366 'title' => __('Appearance'), 367 'href' => admin_url('themes.php'), 368 'parent' => 'blog-name', 369 ) ); 300 370 301 371 if ( ! current_user_can( 'edit_theme_options' ) ) 302 372 return; … … 337 407 } 338 408 339 409 /** 410 * Add screen options link. 411 * 412 * @since 3.3.0 413 */ 414 function wp_admin_bar_screen_options_menu( $wp_admin_bar ) { 415 $wp_admin_bar->add_menu( array( 416 'id' => 'screen-options', 417 'title' => __('Screen Options'), 418 'href' => '#', 419 'meta' => array( 420 'class' => 'screen-meta-toggle hide-if-no-js', 421 ), 422 ) ); 423 } 424 425 /** 426 * Add help link. 427 * 428 * @since 3.3.0 429 */ 430 function wp_admin_bar_help_menu( $wp_admin_bar ) { 431 $wp_admin_bar->add_menu( array( 432 'id' => 'help', 433 'title' => __('Help'), 434 'href' => '#', 435 'meta' => array( 436 'class' => 'screen-meta-toggle hide-if-no-js', 437 ), 438 ) ); 439 } 440 441 /** 442 * Add search form. 443 * 444 * @since 3.3.0 445 */ 446 function wp_admin_bar_search_menu( $wp_admin_bar ) { 447 $form = '<div id="adminbarsearch-wrap">'; 448 $form .= '<form action="' . home_url() . '" method="get" id="adminbarsearch">'; 449 $form .= '<input class="adminbar-input" name="s" id="adminbar-search"'; 450 $form .= 'type="text" value="" maxlength="150" placeholder="' . esc_attr__( 'Search' ) . '" />'; 451 $form .= '<input type="submit" class="adminbar-button" value="' . __('Search') . '"/>'; 452 $form .= '</form>'; 453 $form .= '</div>'; 454 455 $wp_admin_bar->add_menu( array( 456 'id' => 'search', 457 'title' => $form, 458 'href' => '#', 459 'meta' => array( 460 'class' => 'admin-bar-search', 461 // @TODO: Replace me with something far less hacky 462 'onclick' => 'if ( event.target.value != "Search" ) { return false; }', 463 ), 464 ) ); 465 } 466 467 /** 340 468 * Style and scripts for the admin bar. 341 469 * 342 470 * @since 3.1.0 -
wp-includes/css/admin-bar.dev.css
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 } 297 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 372 298 373 /** 299 374 * IE 6-targeted rules 300 375 */ -
wp-includes/class-wp-admin-bar.php
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 … … 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 );179 add_action( 'admin_bar_menu', 'wp_admin_bar_blog_menu', 25 ); 187 180 add_action( 'admin_bar_menu', 'wp_admin_bar_edit_menu', 30 ); 188 add_action( 'admin_bar_menu', 'wp_admin_bar_shortlink_menu', 80 );189 181 add_action( 'admin_bar_menu', 'wp_admin_bar_updates_menu', 70 ); 182 add_action( 'admin_bar_menu', 'wp_admin_bar_shortlink_menu', 80 ); 190 183 191 if ( !is_network_admin() && !is_user_admin() ) { 184 if ( ! is_admin() ) { 185 add_action( 'admin_bar_menu', 'wp_admin_bar_blog_front_menu', 25 ); 192 186 add_action( 'admin_bar_menu', 'wp_admin_bar_new_content_menu', 40 ); 193 187 add_action( 'admin_bar_menu', 'wp_admin_bar_comments_menu', 50 ); 194 add_action( 'admin_bar_menu', 'wp_admin_bar_appearance_menu', 60 ); 188 add_action( 'admin_bar_menu', 'wp_admin_bar_search_menu', 100 ); 189 // add_action( 'admin_bar_menu', 'wp_admin_bar_appearance_menu', 60 ); 190 } else { 191 add_action( 'admin_bar_menu', 'wp_admin_bar_blog_admin_menu', 25 ); 192 add_action( 'admin_bar_menu', 'wp_admin_bar_view_site_menu', 25 ); 193 add_action( 'admin_bar_menu', 'wp_admin_bar_help_menu', 90 ); 195 194 } 196 195 197 196 do_action( 'add_admin_bar_menus' ); -
wp-admin/includes/template.php
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 ) : ?> … … 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 … … 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
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; … … 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-admin/admin-header.php
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 … … 118 118 <div id="wpwrap"> 119 119 <?php require(ABSPATH . 'wp-admin/menu-header.php'); ?> 120 120 <div id="wpcontent"> 121 <div id="wphead">122 <?php123 121 124 if ( is_network_admin() )125 $blog_name = sprintf( __('%s Network Admin'), esc_html($current_site->site_name) );126 elseif ( is_user_admin() )127 $blog_name = sprintf( __('%s Global Dashboard'), esc_html($current_site->site_name) );128 else129 $blog_name = get_bloginfo('name', 'display');130 if ( '' == $blog_name ) {131 $blog_name = __( 'Visit Site' );132 } else {133 $blog_name_excerpt = wp_html_excerpt($blog_name, 40);134 if ( $blog_name != $blog_name_excerpt )135 $blog_name_excerpt = trim($blog_name_excerpt) . '…';136 $blog_name = $blog_name_excerpt;137 unset($blog_name_excerpt);138 }139 $title_class = '';140 if ( function_exists('mb_strlen') ) {141 if ( mb_strlen($blog_name, 'UTF-8') > 30 )142 $title_class = 'class="long-title"';143 } else {144 if ( strlen($blog_name) > 30 )145 $title_class = 'class="long-title"';146 }147 ?>148 149 <img id="header-logo" src="<?php echo esc_url( includes_url( 'images/blank.gif' ) ); ?>" alt="" width="16" height="16" />150 <h1 id="site-heading" <?php echo $title_class ?>>151 <a href="<?php echo trailingslashit( get_bloginfo( 'url' ) ); ?>" title="<?php esc_attr_e('Visit Site') ?>">152 <span id="site-title"><?php echo $blog_name ?></span>153 </a>154 </h1>155 156 122 <?php 157 158 123 do_action('in_admin_header'); 159 160 $links = array();161 162 // Generate user profile and info links.163 $links[5] = sprintf( __('Howdy, %1$s'), $user_identity );164 165 $links[8] = '<a href="profile.php" title="' . esc_attr__('Edit your profile') . '">' . __('Your Profile') . '</a>';166 167 if ( is_multisite() && is_super_admin() ) {168 if ( !is_network_admin() )169 $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>';170 else171 $links[10] = '<a href="' . get_dashboard_url( get_current_user_id() ) . '" title="' . esc_attr__('Site Admin') . '">' . __('Site Admin') . '</a>';172 }173 174 $links[15] = '<a href="' . wp_logout_url() . '" title="' . esc_attr__('Log Out') . '">' . __('Log Out') . '</a>';175 176 $links = apply_filters( 'admin_user_info_links', $links, $current_user );177 ksort( $links );178 179 // Trim whitespace and pipes from links, then convert to list items.180 $links = array_map( 'trim', $links, array_fill( 0, count( $links ), " |\n\t" ) );181 182 $howdy = array_shift( $links );183 184 $links_no_js = implode( ' | ', $links );185 $links_js = '<li>' . implode( '</li><li>', $links ) . '</li>';186 187 124 ?> 188 125 189 <div id="wphead-info">190 <div id="user_info">191 <p class="hide-if-js"><?php echo "$howdy | $links_no_js"; ?></p>192 193 <div class="hide-if-no-js">194 <p><?php echo $howdy; ?></p>195 <div id="user_info_arrow"></div>196 <div id="user_info_links_wrap"><div id="user_info_links">197 <ul><?php echo $links_js; ?></ul>198 </div></div>199 </div>200 </div>201 </div>202 203 </div>204 205 126 <div id="wpbody"> 206 127 <?php 207 128 unset($title_class, $blog_name, $total_update_count, $update_title); -
wp-admin/css/wp-admin-rtl.dev.css
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; … … 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
545 545 } 546 546 547 547 .wrap { 548 margin: 015px 0 0;548 margin: 4px 15px 0 0; 549 549 } 550 550 551 551 div.updated, … … 1465 1465 #adminmenu a, 1466 1466 #sidemenu a, 1467 1467 #taglist a, 1468 #catlist a, 1469 #show-settings a { 1468 #catlist a { 1470 1469 text-decoration: none; 1471 1470 } 1472 1471 … … 1576 1575 ------------------------------------------------------------------------------*/ 1577 1576 1578 1577 #screen-meta { 1579 position: relative; 1580 clear: both; 1578 position: fixed; 1579 max-height: 200px; 1580 top: -250px; 1581 left: 0; 1582 right: 0; 1583 margin-top: 28px; 1584 z-index: 200; 1585 max-height: 200px; 1586 overflow: auto; 1587 border-style: solid; 1588 border-width: 0 0 1px; 1581 1589 } 1582 1590 1583 #screen-meta-links {1584 margin: 0 24px 0 0;1585 }1586 1587 1591 #screen-meta .screen-reader-text { 1588 1592 visibility: hidden; 1589 1593 } 1590 1594 1591 #screen-options-link-wrap,1592 #contextual-help-link-wrap {1593 float: right;1594 height: 22px;1595 padding: 0;1596 margin: 0 0 0 6px;1597 font-family: sans-serif;1598 -moz-border-radius-bottomleft: 3px;1599 -moz-border-radius-bottomright: 3px;1600 -webkit-border-bottom-left-radius: 3px;1601 -webkit-border-bottom-right-radius: 3px;1602 border-bottom-left-radius: 3px;1603 border-bottom-right-radius: 3px;1604 }1605 1606 1595 #contextual-help-wrap li { 1607 1596 list-style-type: disc; 1608 1597 margin-left: 18px; … … 1618 1607 .toggle-arrow-active { 1619 1608 background-position: bottom left; 1620 1609 } 1621 #screen-meta a.show-settings {1622 text-decoration: none;1623 z-index: 1;1624 padding: 0 16px 0 6px;1625 height: 22px;1626 line-height: 22px;1627 font-size: 12px;1628 display: block;1629 text-shadow: rgba(255,255,255,0.7) 0 1px 0;1630 }1631 1610 1632 #screen-meta a.show-settings:hover {1633 text-decoration: none;1634 }1635 1636 1611 #screen-options-wrap h5, 1637 1612 #contextual-help-wrap h5 { 1638 1613 margin: 8px 0; … … 1641 1616 1642 1617 #screen-options-wrap, 1643 1618 #contextual-help-wrap { 1644 border-style: none solid solid; 1645 border-top: 0 none; 1646 border-width: 0 1px 1px; 1647 margin: 0 20px 0 0; 1619 margin: 0; 1648 1620 padding: 8px 12px 12px; 1649 1621 } 1650 1622 … … 2065 2037 8.0 - Layout Blocks 2066 2038 ------------------------------------------------------------------------------*/ 2067 2039 2068 body.admin-bar #wp head,2040 body.admin-bar #wpcontent, 2069 2041 body.admin-bar #adminmenu { 2070 2042 padding-top: 28px; 2071 2043 } -
wp-admin/css/colors-classic.dev.css
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. … … 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; … … 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 } … … 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
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 } … … 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 ); … … 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; … … 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 } … … 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 }