Dalston: Skip enqueuing block JS and CSS files in AMP endpoint
This commit is contained in:
parent
46a770e359
commit
856ca6b4e5
1 changed files with 17 additions and 18 deletions
|
@ -196,37 +196,36 @@ add_action( 'enqueue_block_editor_assets', 'dalston_editor_styles' );
|
|||
*/
|
||||
function dalston_block_extends() {
|
||||
|
||||
// Cover Block Tweaks
|
||||
if ( ! dalston_is_amp() ) {
|
||||
wp_enqueue_script( 'dalston-extend-cover-block',
|
||||
get_stylesheet_directory_uri() . '/block-extends/extend-cover-block.js',
|
||||
array( 'wp-blocks' )
|
||||
);
|
||||
// Bail out early while in AMP endpoint.
|
||||
if ( dalston_is_amp() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Cover Block Tweaks
|
||||
wp_enqueue_script( 'dalston-extend-cover-block',
|
||||
get_stylesheet_directory_uri() . '/block-extends/extend-cover-block.js',
|
||||
array( 'wp-blocks' )
|
||||
);
|
||||
|
||||
wp_enqueue_style( 'dalston-extend-cover-block-style',
|
||||
get_stylesheet_directory_uri() . '/block-extends/extend-cover-block.css'
|
||||
);
|
||||
|
||||
// Columns Block Tweaks
|
||||
if ( ! dalston_is_amp() ) {
|
||||
wp_enqueue_script( 'dalston-extend-columns-block',
|
||||
get_stylesheet_directory_uri() . '/block-extends/extend-columns-block.js',
|
||||
array( 'wp-blocks' )
|
||||
);
|
||||
}
|
||||
wp_enqueue_script( 'dalston-extend-columns-block',
|
||||
get_stylesheet_directory_uri() . '/block-extends/extend-columns-block.js',
|
||||
array( 'wp-blocks' )
|
||||
);
|
||||
|
||||
wp_enqueue_style( 'dalston-extend-cover-columns-style',
|
||||
get_stylesheet_directory_uri() . '/block-extends/extend-columns-block.css'
|
||||
);
|
||||
|
||||
// Columns Block Tweaks
|
||||
if ( ! dalston_is_amp() ) {
|
||||
wp_enqueue_script( 'dalston-extend-media-text-block',
|
||||
get_stylesheet_directory_uri() . '/block-extends/extend-media-text-block.js',
|
||||
array( 'wp-blocks' )
|
||||
);
|
||||
}
|
||||
wp_enqueue_script( 'dalston-extend-media-text-block',
|
||||
get_stylesheet_directory_uri() . '/block-extends/extend-media-text-block.js',
|
||||
array( 'wp-blocks' )
|
||||
);
|
||||
|
||||
wp_enqueue_style( 'dalston-extend-cover-media-text-style',
|
||||
get_stylesheet_directory_uri() . '/block-extends/extend-media-text-block.css'
|
||||
|
|
Loading…
Reference in a new issue