mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-02 05:31:25 +01:00
Add user actions dropdown to admin header. see #17324.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17827 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b58636e914
commit
7a16085b8d
@ -141,30 +141,44 @@ if ( function_exists('mb_strlen') ) {
|
|||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<?php do_action('in_admin_header'); ?>
|
<?php
|
||||||
|
|
||||||
|
do_action('in_admin_header');
|
||||||
|
|
||||||
|
// Generate user profile and info links.
|
||||||
|
$howdy = sprintf( __('Howdy, <a href="%1$s" title="Edit your profile">%2$s</a>'), 'profile.php', $user_identity );
|
||||||
|
$links = array();
|
||||||
|
|
||||||
|
if ( is_multisite() && is_super_admin() ) {
|
||||||
|
if ( !is_network_admin() )
|
||||||
|
$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>';
|
||||||
|
else
|
||||||
|
$links[10] = '<a href="' . get_dashboard_url( get_current_user_id() ) . '" title="' . esc_attr__('Site Admin') . '">' . __('Site Admin') . '</a>';
|
||||||
|
}
|
||||||
|
$links[15] = '<a href="' . wp_logout_url() . '" title="' . esc_attr__('Log Out') . '">' . __('Log Out') . '</a>';
|
||||||
|
|
||||||
|
$links = apply_filters( 'admin_user_info_links', $links, $current_user );
|
||||||
|
ksort( $links );
|
||||||
|
|
||||||
|
// Trim whitespace and pipes from links, then convert to list items.
|
||||||
|
$links = array_map( 'trim', $links, array_fill( 0, count( $links ), " |\n\t" ) );
|
||||||
|
$links = '<li>' . implode( '</li><li>', $links ) . '</li>';
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
<div id="wphead-info">
|
<div id="wphead-info">
|
||||||
<div id="user_info">
|
<div id="user_info">
|
||||||
<p><?php
|
<p><?php echo $howdy; ?></p>
|
||||||
$links = array();
|
<div id="user_info_arrow">
|
||||||
$links[5] = sprintf(__('Howdy, <a href="%1$s" title="Edit your profile">%2$s</a>'), 'profile.php', $user_identity);
|
<div id="user_info_links_wrap"><div id="user_info_links">
|
||||||
if ( is_multisite() && is_super_admin() ) {
|
<ul><?php echo $links; ?></ul>
|
||||||
if ( !is_network_admin() )
|
</div></div>
|
||||||
$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>';
|
|
||||||
else
|
|
||||||
$links[10] = '| <a href="' . get_dashboard_url( get_current_user_id() ) . '" title="' . esc_attr__('Site Admin') . '">' . __('Site Admin') . '</a>';
|
|
||||||
}
|
|
||||||
$links[15] = '| <a href="' . wp_logout_url() . '" title="' . esc_attr__('Log Out') . '">' . __('Log Out') . '</a>';
|
|
||||||
|
|
||||||
$links = apply_filters('admin_user_info_links', $links, $current_user);
|
|
||||||
ksort($links);
|
|
||||||
|
|
||||||
echo implode(' ', $links);
|
|
||||||
?></p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
<div id="wpbody">
|
<div id="wpbody">
|
||||||
<?php
|
<?php
|
||||||
unset($title_class, $blog_name, $total_update_count, $update_title);
|
unset($title_class, $blog_name, $total_update_count, $update_title);
|
||||||
|
File diff suppressed because one or more lines are too long
@ -719,6 +719,33 @@ table.widefat span.spam a,
|
|||||||
color: #777;
|
color: #777;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#user_info_arrow {
|
||||||
|
background: transparent url(../images/arrows.png) no-repeat 6px 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#user_info_arrow:hover {
|
||||||
|
background: transparent url(../images/arrows-dark.png) no-repeat 6px 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#user_info_links ul {
|
||||||
|
background: #f9f9f9;
|
||||||
|
border-color: #dfdfdf;
|
||||||
|
-moz-box-shadow: inset 0 1px 0 #fff;
|
||||||
|
-webkit-box-shadow: inset 0 1px 0 #fff;
|
||||||
|
box-shadow: inset 0 1px 0 #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#user_info_links li:hover {
|
||||||
|
background-color: #EAF2FA;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
#user_info_links li:hover a,
|
||||||
|
#user_info_links li a:hover {
|
||||||
|
color: #333;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
#user_info a:link,
|
#user_info a:link,
|
||||||
#user_info a:visited,
|
#user_info a:visited,
|
||||||
#footer a:link,
|
#footer a:link,
|
||||||
@ -729,7 +756,7 @@ table.widefat span.spam a,
|
|||||||
#user_info a:hover,
|
#user_info a:hover,
|
||||||
#footer a:hover {
|
#footer a:hover {
|
||||||
color: #000;
|
color: #000;
|
||||||
text-decoration: underline !important;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
div#media-upload-error,
|
div#media-upload-error,
|
||||||
|
File diff suppressed because one or more lines are too long
@ -842,14 +842,82 @@ form.upgrade .hint {
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
line-height: 32px;
|
line-height: 32px;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
#user_info p {
|
#user_info p {
|
||||||
margin: 0;
|
margin: 0 20px 0 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
line-height: 32px;
|
line-height: 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#user_info_arrow {
|
||||||
|
height: 32px;
|
||||||
|
width: 24px;
|
||||||
|
position: absolute;
|
||||||
|
right: -2px;
|
||||||
|
top: 2px;
|
||||||
|
z-index: 999;
|
||||||
|
}
|
||||||
|
|
||||||
|
#user_info_links_wrap {
|
||||||
|
width: 160px;
|
||||||
|
position: absolute;
|
||||||
|
top: 30px;
|
||||||
|
right: 0;
|
||||||
|
padding: 0;
|
||||||
|
text-shadow: rgba(255,255,255,0.7) 0 1px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#user_info_links {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
#user_info_arrow:hover #user_info_links_wrap {
|
||||||
|
top: 22px;
|
||||||
|
right: -8px;
|
||||||
|
padding: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#user_info_arrow:hover #user_info_links ul {
|
||||||
|
margin-top: 0;
|
||||||
|
-moz-transition: margin-top 150ms ease-out;
|
||||||
|
-webkit-transition: margin-top 150ms ease-out;
|
||||||
|
-o-transition: margin-top 150ms ease-out;
|
||||||
|
transition: margin-top 150ms ease-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
#user_info_links ul {
|
||||||
|
border-width: 1px;
|
||||||
|
border-style: solid;
|
||||||
|
margin-top: -100%;
|
||||||
|
-moz-transition: margin-top 300ms ease-in;
|
||||||
|
-webkit-transition: margin-top 300ms ease-in;
|
||||||
|
-o-transition: margin-top 300ms ease-in;
|
||||||
|
transition: margin-top 300ms ease-in;
|
||||||
|
}
|
||||||
|
|
||||||
|
#user_info_links ul,
|
||||||
|
#user_info_links li:last-child {
|
||||||
|
-moz-border-radius: 0 0 3px 3px;
|
||||||
|
-webkit-border-bottom-right-radius: 3px;
|
||||||
|
-webkit-border-bottom-left-radius: 3px;
|
||||||
|
-khtml-border-bottom-right-radius: 3px;
|
||||||
|
-khtml-border-bottom-left-radius: 3px;
|
||||||
|
border-bottom-right-radius: 3px;
|
||||||
|
border-bottom-left-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#user_info_links li {
|
||||||
|
display: block;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#user_info_links a {
|
||||||
|
display: block;
|
||||||
|
padding: 6px 8px;
|
||||||
|
}
|
||||||
|
|
||||||
#wphead {
|
#wphead {
|
||||||
height: 32px;
|
height: 32px;
|
||||||
margin-right: 15px;
|
margin-right: 15px;
|
||||||
|
@ -485,13 +485,13 @@ function wp_default_styles( &$styles ) {
|
|||||||
// Any rtl stylesheets that don't have a .dev version for ltr
|
// Any rtl stylesheets that don't have a .dev version for ltr
|
||||||
$no_suffix = array( 'farbtastic' );
|
$no_suffix = array( 'farbtastic' );
|
||||||
|
|
||||||
$styles->add( 'wp-admin', "/wp-admin/css/wp-admin$suffix.css", array(), '20110506b' );
|
$styles->add( 'wp-admin', "/wp-admin/css/wp-admin$suffix.css", array(), '20110506c' );
|
||||||
|
|
||||||
$styles->add( 'ie', "/wp-admin/css/ie$suffix.css", array(), '20101102' );
|
$styles->add( 'ie', "/wp-admin/css/ie$suffix.css", array(), '20101102' );
|
||||||
$styles->add_data( 'ie', 'conditional', 'lte IE 7' );
|
$styles->add_data( 'ie', 'conditional', 'lte IE 7' );
|
||||||
|
|
||||||
// all colors stylesheets need to have the same query strings (cache manifest compat)
|
// all colors stylesheets need to have the same query strings (cache manifest compat)
|
||||||
$colors_version = '20110506b';
|
$colors_version = '20110506c';
|
||||||
|
|
||||||
// Register "meta" stylesheet for admin colors. All colors-* style sheets should have the same version string.
|
// Register "meta" stylesheet for admin colors. All colors-* style sheets should have the same version string.
|
||||||
$styles->add( 'colors', true, array(), $colors_version );
|
$styles->add( 'colors', true, array(), $colors_version );
|
||||||
|
Loading…
Reference in New Issue
Block a user