Add frame for welcome panel on dashboard (currently hidden). see #11651.

git-svn-id: http://svn.automattic.com/wordpress/trunk@18749 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
koopersmith 2011-09-22 06:23:10 +00:00
parent 29f13c28b3
commit d7ce0f762b
6 changed files with 61 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@ -689,6 +689,10 @@ table.widefat span.spam a,
color: #bc0b0b;
}
.welcome-panel {
border-color: #ccc;
}
.widget,
#widget-list .widget-top,
.postbox,

File diff suppressed because one or more lines are too long

View File

@ -2071,6 +2071,28 @@ body.admin-bar #adminmenu {
word-wrap: break-word;
}
.welcome-panel {
margin: 20px 8px;
padding: 0 10px;
border-width: 3px;
border-style: double;
position: relative;
display: none;
}
.welcome-panel h3 {
font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
font-size: 24px;
font-weight: normal;
}
.welcome-panel .welcome-panel-close {
position: absolute;
top: 10px;
right: 10px;
text-decoration: none;
}
/*------------------------------------------------------------------------------
10.0 - List Posts (/Pages/etc)

View File

@ -1259,4 +1259,35 @@ function wp_check_browser_version() {
*/
function wp_dashboard_empty() {}
/**
* Displays a welcome panel to introduce users to WordPress.
*
* @since 3.3
*/
function wp_welcome_panel() {
?>
<div class="welcome-panel">
<h3><?php _e( 'Welcome to WordPress!' ); ?></h3>
<a class="welcome-panel-close" href="#"><?php _e('Close'); ?></a>
<?php
// For now, we'll just approximate capabilities for each role.
?>
<?php if ( current_user_can('switch_themes') ): ?>
<p>[admin placeholder]</p>
<?php elseif ( current_user_can('edit_others_posts') ): ?>
<p>[editor placeholder]</p>
<?php elseif ( current_user_can('publish_posts') ): ?>
<p>[author placeholder]</p>
<?php elseif ( current_user_can('edit_posts') ): ?>
<p>[contributor placeholder]</p>
<?php else: ?>
<p>[subscriber placeholder]</p>
<?php endif; ?>
</div>
<?php
}
?>

View File

@ -56,6 +56,8 @@ $today = current_time('mysql', 1);
<?php screen_icon(); ?>
<h2><?php echo esc_html( $title ); ?></h2>
<?php wp_welcome_panel(); ?>
<div id="dashboard-widgets-wrap">
<?php wp_dashboard(); ?>