Skip to content
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
7 changes: 0 additions & 7 deletions public_html/wp-content/themes/pattern-directory/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,6 @@ function generate_block_editor_styles_html() {
wp_styles()->do_items( $handles );
wp_styles()->done = $done;

// Build up the alignment styles to match the layout set in theme.json.
// See https://github.com/WordPress/gutenberg/blob/9d4b83cbbafcd6c6cbd20c86b572f458fc65ff16/lib/block-supports/layout.php#L38
$block_gap = wp_get_global_styles( array( 'spacing', 'blockGap' ) );
$layout = wp_get_global_settings( array( 'layout' ) );
$style = gutenberg_get_layout_style( 'body > div', $layout, true, $block_gap );
echo '<style>' . $style . '</style>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped

wp_add_inline_script(
'wporg-pattern-script',
sprintf(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ function Iframe(
align-items: center;
justify-content: center;
background-color: white;
/* Override the Twenty Twenty-One sizes with our custom sizes. */
--responsive--aligndefault-width: 800px;
--responsive--alignwide-width: 1000px;
}
.${ BODY_CLASS_NAME } {
padding: 0;
Expand Down Expand Up @@ -136,7 +139,6 @@ function Iframe(
}

setHead( contentDocument, headHTML );
setBodyClassName( contentDocument );
bubbleEvents( contentDocument );
setBodyClassName( contentDocument );
setIframeDocument( contentDocument );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ function Canvas( { html } ) {
headHTML={ window.__editorStyles.html }
>
<div
className="entry-content"
dangerouslySetInnerHTML={ {
__html: html,
} }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ function PatternThumbnail( { className, html } ) {
headHTML={ window.__editorStyles.html }
>
<div
className="entry-content"
dangerouslySetInnerHTML={ {
__html: shouldLoad ? html : '',
} }
Expand Down