Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format PHP inline comments correctly #59452

Merged
merged 1 commit into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions lib/block-supports/layout.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand All @@ -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.
*/
Expand All @@ -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.
*/
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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.
*/
Expand All @@ -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.
*/
Expand Down
1 change: 0 additions & 1 deletion lib/class-wp-theme-json-gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -1334,7 +1334,6 @@ public function get_block_custom_css_nodes() {
return $block_nodes;
}


/**
* Returns the global styles custom CSS for a single block.
*
Expand Down
2 changes: 1 addition & 1 deletion lib/global-styles-and-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions lib/script-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading