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

git-svn-id: https://develop.svn.wordpress.org/trunk@18749 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Daryl Koopersmith
2011-09-22 06:23:10 +00:00
parent 23824f9f30
commit f30457e6d3
6 changed files with 61 additions and 2 deletions
+31
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
}
?>