Make WordPress Core


Ignore:
Timestamp:
01/29/2020 12:43:23 AM (6 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve inline comments per the documentation standards.

Includes minor code layout fixes for better readability.

See #48303.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/post.php

    r46603 r47122  
    7272switch ( $action ) {
    7373    case 'post-quickdraft-save':
    74         // Check nonce and capabilities
     74        // Check nonce and capabilities.
    7575        $nonce     = $_REQUEST['_wpnonce'];
    7676        $error_msg = false;
    7777
    78         // For output of the quickdraft dashboard widget
     78        // For output of the Quick Draft dashboard widget.
    7979        require_once ABSPATH . 'wp-admin/includes/dashboard.php';
    8080
     
    203203        check_admin_referer( 'update-post_' . $post_id );
    204204
    205         // Don't let these be changed
     205        // Don't let these be changed.
    206206        unset( $_POST['guid'] );
    207207        $_POST['post_type'] = 'attachment';
    208208
    209         // Update the thumbnail filename
     209        // Update the thumbnail filename.
    210210        $newmeta          = wp_get_attachment_metadata( $post_id, true );
    211211        $newmeta['thumb'] = wp_basename( $_POST['thumb'] );
     
    219219        $post_id = edit_post();
    220220
    221         // Session cookie flag that the post was saved
     221        // Session cookie flag that the post was saved.
    222222        if ( isset( $_COOKIE['wp-saving-post'] ) && $_COOKIE['wp-saving-post'] === $post_id . '-check' ) {
    223223            setcookie( 'wp-saving-post', $post_id . '-saved', time() + DAY_IN_SECONDS, ADMIN_COOKIE_PATH, COOKIE_DOMAIN, is_ssl() );
    224224        }
    225225
    226         redirect_post( $post_id ); // Send user on their way while we keep working
     226        redirect_post( $post_id ); // Send user on their way while we keep working.
    227227
    228228        exit();
     
    350350        wp_redirect( admin_url( 'edit.php' ) );
    351351        exit();
    352 } // end switch
     352} // End switch.
    353353include( ABSPATH . 'wp-admin/admin-footer.php' );
Note: See TracChangeset for help on using the changeset viewer.