Make WordPress Core


Ignore:
Timestamp:
10/19/2011 04:41:26 PM (12 years ago)
Author:
koopersmith
Message:

Welcome panel contents and functionality. see #11651.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-ajax.php

    r18998 r19007  
    613613    ob_start();
    614614    foreach ( $wp_list_table->items as $comment ) {
    615         if ( ! current_user_can( 'edit_comment', $comment->comment_ID ) ) 
     615        if ( ! current_user_can( 'edit_comment', $comment->comment_ID ) )
    616616            continue;
    617617        get_comment( $comment );
     
    10621062    die('1');
    10631063    break;
     1064case 'update-welcome-panel' :
     1065    check_ajax_referer( 'welcome-panel-nonce', 'welcomepanelnonce' );
     1066
     1067    if ( ! current_user_can( 'edit_theme_options' ) )
     1068        die('-1');
     1069
     1070    if ( empty( $_POST['visible'] ) )
     1071        delete_user_option( get_current_user_id(), 'show_welcome_panel' );
     1072    else
     1073        update_user_option( get_current_user_id(), 'show_welcome_panel', 1 );
     1074
     1075    die('1');
     1076    break;
    10641077case 'menu-get-metabox' :
    10651078    if ( ! current_user_can( 'edit_theme_options' ) )
Note: See TracChangeset for help on using the changeset viewer.