|
@@ -216,7 +216,7 @@ function dalston_editor_styles() {
|
|
|
add_action( 'enqueue_block_editor_assets', 'dalston_editor_styles' );
|
|
|
|
|
|
/**
|
|
|
- * Enqueue Custom Cover Block Styles and Scripts
|
|
|
+ * Enqueue Custom Cover Block Scripts
|
|
|
*/
|
|
|
function dalston_block_extends() {
|
|
|
|
|
@@ -232,11 +232,6 @@ function dalston_block_extends() {
|
|
|
array( 'wp-blocks' )
|
|
|
);
|
|
|
|
|
|
- wp_enqueue_style(
|
|
|
- 'dalston-extend-cover-block-style',
|
|
|
- get_stylesheet_directory_uri() . '/block-extends/extend-cover-block.css'
|
|
|
- );
|
|
|
-
|
|
|
// Columns Block Tweaks
|
|
|
wp_enqueue_script(
|
|
|
'dalston-extend-columns-block',
|
|
@@ -244,24 +239,41 @@ function dalston_block_extends() {
|
|
|
array( 'wp-blocks' )
|
|
|
);
|
|
|
|
|
|
- wp_enqueue_style(
|
|
|
- 'dalston-extend-cover-columns-style',
|
|
|
- get_stylesheet_directory_uri() . '/block-extends/extend-columns-block.css'
|
|
|
- );
|
|
|
-
|
|
|
- // Columns Block Tweaks
|
|
|
+ // Media & Text Block Tweaks
|
|
|
wp_enqueue_script(
|
|
|
'dalston-extend-media-text-block',
|
|
|
get_stylesheet_directory_uri() . '/block-extends/extend-media-text-block.js',
|
|
|
array( 'wp-blocks' )
|
|
|
);
|
|
|
+}
|
|
|
+add_action( 'enqueue_block_editor_assets', 'dalston_block_extends' );
|
|
|
+
|
|
|
+/**
|
|
|
+ * Enqueue Custom Cover Block Styles
|
|
|
+ */
|
|
|
+function dalston_block_extends_styles() {
|
|
|
+
|
|
|
+ // Bail out early while in AMP endpoint.
|
|
|
+ if ( dalston_is_amp() ) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ wp_enqueue_style(
|
|
|
+ 'dalston-extend-cover-block-style',
|
|
|
+ get_stylesheet_directory_uri() . '/block-extends/extend-cover-block.css'
|
|
|
+ );
|
|
|
+
|
|
|
+ wp_enqueue_style(
|
|
|
+ 'dalston-extend-cover-columns-style',
|
|
|
+ get_stylesheet_directory_uri() . '/block-extends/extend-columns-block.css'
|
|
|
+ );
|
|
|
|
|
|
wp_enqueue_style(
|
|
|
'dalston-extend-cover-media-text-style',
|
|
|
get_stylesheet_directory_uri() . '/block-extends/extend-media-text-block.css'
|
|
|
);
|
|
|
}
|
|
|
-add_action( 'enqueue_block_assets', 'dalston_block_extends' );
|
|
|
+add_action( 'enqueue_block_assets', 'dalston_block_extends_styles' );
|
|
|
|
|
|
/**
|
|
|
* Whether this is an AMP endpoint.
|