Welcome panel contents and functionality. see #11651.

git-svn-id: https://develop.svn.wordpress.org/trunk@19007 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Daryl Koopersmith
2011-10-19 16:41:26 +00:00
parent 267579fc1e
commit c1945d5c69
10 changed files with 135 additions and 28 deletions
+14 -1
View File
@@ -612,7 +612,7 @@ case 'get-comments' :
$x = new WP_Ajax_Response();
ob_start();
foreach ( $wp_list_table->items as $comment ) {
if ( ! current_user_can( 'edit_comment', $comment->comment_ID ) )
if ( ! current_user_can( 'edit_comment', $comment->comment_ID ) )
continue;
get_comment( $comment );
$wp_list_table->single_row( $comment );
@@ -1059,6 +1059,19 @@ case 'hidden-columns' :
if ( is_array($hidden) )
update_user_option($user->ID, "manage{$page}columnshidden", $hidden, true);
die('1');
break;
case 'update-welcome-panel' :
check_ajax_referer( 'welcome-panel-nonce', 'welcomepanelnonce' );
if ( ! current_user_can( 'edit_theme_options' ) )
die('-1');
if ( empty( $_POST['visible'] ) )
delete_user_option( get_current_user_id(), 'show_welcome_panel' );
else
update_user_option( get_current_user_id(), 'show_welcome_panel', 1 );
die('1');
break;
case 'menu-get-metabox' :