Make WordPress Core


Ignore:
Timestamp:
07/10/2023 10:58:33 PM (12 months ago)
Author:
audrasjb
Message:

Docs: Replace multiple single line comments with multi-line comments.

This changeset updates various comments as per WordPress PHP Inline Documentation Standards.
See https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/#5-inline-comments.

Follow-up to [56174], [56175], [56176], [56177], [56178], [56179], [56180], [56191], [56192].

Props costdev, audrasjb.
See #58459.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php

    r56168 r56193  
    203203
    204204        if ( defined( 'REST_REQUEST' ) && REST_REQUEST ) {
    205             // Set a custom header with the attachment_id.
    206             // Used by the browser/client to resume creating image sub-sizes after a PHP fatal error.
     205            /*
     206             * Set a custom header with the attachment_id.
     207             * Used by the browser/client to resume creating image sub-sizes after a PHP fatal error.
     208             */
    207209            header( 'X-WP-Upload-Attachment-ID: ' . $attachment_id );
    208210        }
     
    212214        require_once ABSPATH . 'wp-admin/includes/image.php';
    213215
    214         // Post-process the upload (create image sub-sizes, make PDF thumbnails, etc.) and insert attachment meta.
    215         // At this point the server may run out of resources and post-processing of uploaded images may fail.
     216        /*
     217         * Post-process the upload (create image sub-sizes, make PDF thumbnails, etc.) and insert attachment meta.
     218         * At this point the server may run out of resources and post-processing of uploaded images may fail.
     219         */
    216220        wp_update_attachment_metadata( $attachment_id, wp_generate_attachment_metadata( $attachment_id, $file ) );
    217221
     
    563567        $image_name = wp_basename( $image_file, ".{$image_ext}" );
    564568
    565         // Do not append multiple `-edited` to the file name.
    566         // The user may be editing a previously edited image.
     569        /*
     570         * Do not append multiple `-edited` to the file name.
     571         * The user may be editing a previously edited image.
     572         */
    567573        if ( preg_match( '/-edited(-\d+)?$/', $image_name ) ) {
    568574            // Remove any `-1`, `-2`, etc. `wp_unique_filename()` will add the proper number.
     
    626632
    627633        if ( defined( 'REST_REQUEST' ) && REST_REQUEST ) {
    628             // Set a custom header with the attachment_id.
    629             // Used by the browser/client to resume creating image sub-sizes after a PHP fatal error.
     634            /*
     635             * Set a custom header with the attachment_id.
     636             * Used by the browser/client to resume creating image sub-sizes after a PHP fatal error.
     637             */
    630638            header( 'X-WP-Upload-Attachment-ID: ' . $new_attachment_id );
    631639        }
Note: See TracChangeset for help on using the changeset viewer.