Make WordPress Core

Changeset 56195


Ignore:
Timestamp:
07/10/2023 11:17:05 PM (11 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], [56193], [56194].

Props costdev, audrasjb.
See #58459.

Location:
trunk/src/wp-includes
Files:
5 edited

Legend:

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

    r55200 r56195  
    262262     */
    263263    protected function do_permissions_check() {
    264         // Verify if the current user has edit_theme_options capability.
    265         // This capability is required to access the widgets screen.
     264        /*
     265         * Verify if the current user has edit_theme_options capability.
     266         * This capability is required to access the widgets screen.
     267         */
    266268        if ( ! current_user_can( 'edit_theme_options' ) ) {
    267269            return new WP_Error(
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php

    r56051 r56195  
    102102                '/%s/(?P<id>%s%s)',
    103103                $this->rest_base,
    104                 // Matches theme's directory: `/themes/<subdirectory>/<theme>/` or `/themes/<theme>/`.
    105                 // Excludes invalid directory name characters: `/:<>*?"|`.
     104                /*
     105                 * Matches theme's directory: `/themes/<subdirectory>/<theme>/` or `/themes/<theme>/`.
     106                 * Excludes invalid directory name characters: `/:<>*?"|`.
     107                 */
    106108                '([^\/:<>\*\?"\|]+(?:\/[^\/:<>\*\?"\|]+)?)',
    107109                // Matches the template name.
     
    178180     */
    179181    protected function permissions_check( $request ) {
    180         // Verify if the current user has edit_theme_options capability.
    181         // This capability is required to edit/view/delete templates.
     182        /*
     183         * Verify if the current user has edit_theme_options capability.
     184         * This capability is required to edit/view/delete templates.
     185         */
    182186        if ( ! current_user_can( 'edit_theme_options' ) ) {
    183187            return new WP_Error(
     
    503507            }
    504508
    505             // (Note that internally this falls through to `wp_delete_post()`
    506             // if the Trash is disabled.)
     509            /*
     510             * (Note that internally this falls through to `wp_delete_post()`
     511             * if the Trash is disabled.)
     512             */
    507513            $result           = wp_trash_post( $id );
    508514            $template->status = 'trash';
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php

    r55988 r56195  
    684684            $request_params = array_keys( $request->get_params() );
    685685            sort( $request_params );
    686             // If only 'id' and 'roles' are specified (we are only trying to
    687             // edit roles), then only the 'promote_user' cap is required.
     686            /*
     687             * If only 'id' and 'roles' are specified (we are only trying to
     688             * edit roles), then only the 'promote_user' cap is required.
     689             */
    688690            if ( array( 'id', 'roles' ) === $request_params ) {
    689691                return true;
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php

    r54971 r56195  
    465465        }
    466466
    467         // Set the widget's number so that the id attributes in the HTML that we
    468         // return are predictable.
     467        /*
     468         * Set the widget's number so that the id attributes in the HTML that we
     469         * return are predictable.
     470         */
    469471        if ( isset( $request['number'] ) && is_numeric( $request['number'] ) ) {
    470472            $widget_object->_set( (int) $request['number'] );
  • trunk/src/wp-includes/sitemaps/class-wp-sitemaps-provider.php

    r54896 r56195  
    7070        $object_subtypes = $this->get_object_subtypes();
    7171
    72         // If there are no object subtypes, include a single sitemap for the
    73         // entire object type.
     72        /*
     73         * If there are no object subtypes, include a single sitemap for the
     74         * entire object type.
     75         */
    7476        if ( empty( $object_subtypes ) ) {
    7577            $sitemap_data[] = array(
Note: See TracChangeset for help on using the changeset viewer.