Skip to content

Commit

Permalink
Merge pull request #1743 from WordPress/update/1737-follow-up
Browse files Browse the repository at this point in the history
Remove `auto_sizes_get_layout_settings()`
  • Loading branch information
felixarntz authored Dec 16, 2024
2 parents 1d44f3a + 28f6c39 commit efabb2b
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions plugins/auto-sizes/includes/improve-calculate-sizes.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ function auto_sizes_calculate_better_sizes( int $id, $size, string $align, int $
* @return string The alignment width based.
*/
function auto_sizes_get_layout_width( string $alignment ): string {
$layout = auto_sizes_get_layout_settings();
$layout = wp_get_global_settings( array( 'layout' ) );

$layout_widths = array(
'full' => '100vw', // Todo: incorporate useRootPaddingAwareAlignments.
Expand Down Expand Up @@ -295,14 +295,3 @@ function auto_sizes_filter_render_block_context( array $context, array $block ):

return $context;
}

/**
* Retrieves the layout settings defined in theme.json.
*
* @since n.e.x.t
*
* @return array<string, mixed> Associative array of layout settings.
*/
function auto_sizes_get_layout_settings(): array {
return wp_get_global_settings( array( 'layout' ) );
}

0 comments on commit efabb2b

Please sign in to comment.