Skip to content

Instantly share code, notes, and snippets.

@blogjunkie
Last active September 14, 2020 10:13
Show Gist options
  • Save blogjunkie/71387d00004e33709edf621ec0795747 to your computer and use it in GitHub Desktop.
Save blogjunkie/71387d00004e33709edf621ec0795747 to your computer and use it in GitHub Desktop.
Astra enhancements for block editor
<?php // don't include this tag
add_filter( 'astra_block_editor_dynamic_css', 'child_block_editor_inline_styles' );
function child_block_editor_inline_styles( $styles ) {
$styles .= '
.editor-styles-wrapper .wp-block{
max-width: ' . astra_get_option('blog-single-max-width') . 'px;
}
.editor-styles-wrapper .wp-block[data-align=wide] {
max-width: ' . astra_get_option('site-content-width') . 'px;
}
';
return $styles;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment