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

Remove auto_sizes_get_layout_settings() #1743

Merged
merged 2 commits into from
Dec 16, 2024
Merged
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
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' ) );
}
Loading