Skip to content

Commit

Permalink
Update class-wpzoom-portfolio-shortcode.php
Browse files Browse the repository at this point in the history
Enqueue scripts in shortcodes
  • Loading branch information
Alexus450 committed Oct 8, 2024
1 parent e370464 commit 19fd3f4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions classes/class-wpzoom-portfolio-shortcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ public static function render_shortcode( $atts, $content = '' ) {
$block_portfolio = new WPZOOM_Blocks_Portfolio;
$block_portfolio_render = $block_portfolio->render( $shortcode_args, $content );

wp_enqueue_script( 'masonry' );

wp_enqueue_script( 'wpzoom-blocks-js-script-main' );
wp_enqueue_style( 'wpzoom-blocks-css-style-main' );

return sprintf(
'<div class="wpzoom-block-portfolio-shortcode">%1$s</div>',
$block_portfolio_render
Expand Down Expand Up @@ -135,6 +140,11 @@ public static function render_portfolio_layout_shortcode( $atts ) {
$output .= render_block( $block );
}

wp_enqueue_script( 'masonry' );

wp_enqueue_script( 'wpzoom-blocks-js-script-main' );
wp_enqueue_style( 'wpzoom-blocks-css-style-main' );

return sprintf(
'<div class="wpzoom-portfolio-layout-shortcode-content">%1$s</div>',
$output
Expand Down

0 comments on commit 19fd3f4

Please sign in to comment.