WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/17/2014 09:13:53 AM (6 years ago)
Author:
DrewAPicture
Message:

Fix syntax for single- and multi-line comments in wp-admin-directory files.

See #28931.

File:
1 edited

Legend:

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

    r29178 r29206  
    2222    $response = array();
    2323
    24     // screen_id is the same as $current_screen->id and the JS global 'pagenow'
     24    // screen_id is the same as $current_screen->id and the JS global 'pagenow'.
    2525    if ( ! empty($_POST['screen_id']) )
    2626        $screen_id = sanitize_key($_POST['screen_id']);
     
    6565    do_action( 'heartbeat_nopriv_tick', $response, $screen_id );
    6666
    67     // send the current time according to the server
     67    // Send the current time according to the server.
    6868    $response['server_time'] = time();
    6969
     
    363363        $comment_count = wp_count_comments($post_id);
    364364
    365         if ( isset( $comment_count->$status ) ) // We're looking for a known type of comment count
     365        // We're looking for a known type of comment count.
     366        if ( isset( $comment_count->$status ) )
    366367            $total = $comment_count->$status;
    367             // else use the decremented value from above
    368     }
    369 
    370     $time = time(); // The time since the last comment count
     368            // Else use the decremented value from above.
     369    }
     370
     371    // The time since the last comment count.
     372    $time = time();
    371373
    372374    $x = new WP_Ajax_Response( array(
    373375        'what' => 'comment',
    374         'id' => $comment_id, // here for completeness - not used
     376        // Here for completeness - not used.
     377        'id' => $comment_id,
    375378        'supplemental' => array(
    376379            'total_items_i18n' => sprintf( _n( '1 item', '%s items', $total ), number_format_i18n( $total ) ),
     
    956959    $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type', 'comment_parent', 'user_ID');
    957960
    958     // automatically approve parent comment
     961    // Automatically approve parent comment.
    959962    if ( !empty($_POST['approve_parent']) ) {
    960963        $parent = get_comment( $comment_parent );
     
    15131516
    15141517    $post = get_post( $post_ID, ARRAY_A );
    1515     $post = wp_slash($post); //since it is from db
     1518
     1519    // Since it's coming from the database.
     1520    $post = wp_slash($post);
    15161521
    15171522    $data['content'] = $post['post_content'];
    15181523    $data['excerpt'] = $post['post_excerpt'];
    15191524
    1520     // rename
     1525    // Rename.
    15211526    $data['user_ID'] = get_current_user_id();
    15221527
     
    15241529        $data['parent_id'] = $data['post_parent'];
    15251530
    1526     // status
     1531    // Status.
    15271532    if ( isset($data['keep_private']) && 'private' == $data['keep_private'] )
    15281533        $data['post_status'] = 'private';
     
    15411546    }
    15421547
    1543     // update the post
     1548    // Update the post.
    15441549    edit_post();
    15451550
     
    16871692    unset( $_POST['savewidgets'], $_POST['action'] );
    16881693
    1689     // save widgets order for all sidebars
     1694    // Save widgets order for all sidebars.
    16901695    if ( is_array($_POST['sidebars']) ) {
    16911696        $sidebars = array();
     
    17521757    $sidebar = isset($sidebars[$sidebar_id]) ? $sidebars[$sidebar_id] : array();
    17531758
    1754     // delete
     1759    // Delete.
    17551760    if ( isset($_POST['delete_widget']) && $_POST['delete_widget'] ) {
    17561761
     
    24122417
    24132418    $post = get_post( isset( $_POST['post_id'] ) ? $_POST['post_id'] : 0 );
    2414     // ping WordPress for an embed
     2419
     2420    // Ping WordPress for an embed.
    24152421    $check_embed = $wp_embed->run_shortcode( '[embed]'. $src .'[/embed]' );
    2416     // fallback that WordPress creates when no oEmbed was found
     2422
     2423    // Fallback that WordPress creates when no oEmbed was found.
    24172424    $fallback = $wp_embed->maybe_make_link( $src );
    24182425
     
    24572464    }
    24582465
    2459     // screen_id is the same as $current_screen->id and the JS global 'pagenow'
     2466    // screen_id is the same as $current_screen->id and the JS global 'pagenow'.
    24602467    if ( ! empty($_POST['screen_id']) )
    24612468        $screen_id = sanitize_key($_POST['screen_id']);
Note: See TracChangeset for help on using the changeset viewer.