From 39f37871f9c583b966377b9f525d410fae5d494e Mon Sep 17 00:00:00 2001 From: tellthemachines Date: Thu, 29 Feb 2024 14:30:33 +1100 Subject: [PATCH] Format PHP inline comments correctly --- lib/block-supports/layout.php | 18 +++++++++--------- lib/class-wp-theme-json-gutenberg.php | 1 - lib/global-styles-and-settings.php | 2 +- lib/script-loader.php | 6 +++--- 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/lib/block-supports/layout.php b/lib/block-supports/layout.php index 48cb206fd7894e..30b5d8d02084a8 100644 --- a/lib/block-supports/layout.php +++ b/lib/block-supports/layout.php @@ -594,7 +594,7 @@ function gutenberg_render_layout_support_flag( $block_content, $block ) { 'declarations' => $child_layout_declarations, ); - /** + /* * If columnSpan is set, and the parent grid is responsive, i.e. if it has a minimumColumnWidth set, * the columnSpan should be removed on small grids. If there's a minimumColumnWidth, the grid is responsive. * But if the minimumColumnWidth value wasn't changed, it won't be set. In that case, if columnCount doesn't @@ -606,7 +606,7 @@ function gutenberg_render_layout_support_flag( $block_content, $block ) { $parent_column_value = floatval( $parent_column_width ); $parent_column_unit = explode( $parent_column_value, $parent_column_width ); - /** + /* * If there is no unit, the width has somehow been mangled so we reset both unit and value * to defaults. * Additionally, the unit should be one of px, rem or em, so that also needs to be checked. @@ -622,7 +622,7 @@ function gutenberg_render_layout_support_flag( $block_content, $block ) { } } - /** + /* * A default gap value is used for this computation because custom gap values may not be * viable to use in the computation of the container query value. */ @@ -639,7 +639,7 @@ function gutenberg_render_layout_support_flag( $block_content, $block ) { ); } - /** + /* * Add to the style engine store to enqueue and render layout styles. * Return styles here just to check if any exist. */ @@ -800,7 +800,7 @@ function gutenberg_render_layout_support_flag( $block_content, $block ) { } } - /** + /* * Attempts to refer to the inner-block wrapping element by its class attribute. * * When examining a block's inner content, if a block has inner blocks, then @@ -890,13 +890,13 @@ function gutenberg_render_layout_support_flag( $block_content, $block ) { return $processor->get_updated_html(); } -/** +/* * Add a `render_block_data` filter to fetch the parent block layout data. */ add_filter( 'render_block_data', function ( $parsed_block, $source_block, $parent_block ) { - /** + /* * Check if the parent block exists and if it has a layout attribute. * If it does, add the parent layout to the parsed block. */ @@ -945,7 +945,7 @@ function gutenberg_restore_group_inner_container( $block_content, $block ) { return $block_content; } - /** + /* * This filter runs after the layout classnames have been added to the block, so they * have to be removed from the outer wrapper and then added to the inner. */ @@ -961,7 +961,7 @@ function gutenberg_restore_group_inner_container( $block_content, $block ) { } } } else { - /** + /* * The class_list method was only added in 6.4 so this needs a temporary fallback. * This fallback should be removed when the minimum supported version is 6.4. */ diff --git a/lib/class-wp-theme-json-gutenberg.php b/lib/class-wp-theme-json-gutenberg.php index 10c29a78d6ff6a..2a3fd1f873c531 100644 --- a/lib/class-wp-theme-json-gutenberg.php +++ b/lib/class-wp-theme-json-gutenberg.php @@ -1334,7 +1334,6 @@ public function get_block_custom_css_nodes() { return $block_nodes; } - /** * Returns the global styles custom CSS for a single block. * diff --git a/lib/global-styles-and-settings.php b/lib/global-styles-and-settings.php index 3aeaf745fe49f1..9419ae4a716b98 100644 --- a/lib/global-styles-and-settings.php +++ b/lib/global-styles-and-settings.php @@ -224,7 +224,7 @@ function gutenberg_add_global_styles_block_custom_css() { $stylesheet_handle = 'global-styles'; - /** + /* * When `wp_should_load_separate_core_block_assets()` is true, follow a similar * logic to the one in `gutenberg_add_global_styles_for_blocks` to add the custom * css only when the block is rendered. diff --git a/lib/script-loader.php b/lib/script-loader.php index 1c0e5f5a941fe6..01008a0da8967e 100644 --- a/lib/script-loader.php +++ b/lib/script-loader.php @@ -54,18 +54,18 @@ function gutenberg_enqueue_global_styles() { // Add each block as an inline css. gutenberg_add_global_styles_for_blocks(); - /** + /* * Add the custom CSS for the global styles. * Before that, dequeue the Customizer's custom CSS * and add it before the global styles custom CSS. + * Don't enqueue Customizer's custom CSS separately. */ - // Don't enqueue Customizer's custom CSS separately. remove_action( 'wp_head', 'wp_custom_css_cb', 101 ); $custom_css = wp_get_custom_css(); if ( ! wp_should_load_separate_core_block_assets() ) { - /** + /* * If loading all block assets together, add both * the base and block custom CSS at once. Else load * the base custom CSS only, and the block custom CSS