Skip to content

Commit

Permalink
Addressing #39 #38 #40
Browse files Browse the repository at this point in the history
  • Loading branch information
shramee committed Mar 7, 2018
1 parent 754e728 commit 3c7eef4
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions inc/class-public.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ public function live_editor_scripts() {
* @return bool
*/
public function pootlepb_dump_ppb_content( $bool, $post_id ) {
if ( WooBuilder::is_ppb_product( $post_id ) ) {
if ( 'product' == get_post_type( $post_id ) ) {
return false;
}

Expand Down Expand Up @@ -312,19 +312,25 @@ public function process_shortcode( $data ) {
}
foreach ( $shortcodes as $shortcode ) {
$code = str_replace( array( '[', ']' ), '', $shortcode ); // Remove square brackets
$code = explode( $code, ' ' )[0]; // Get shortcode name
$code = explode( ' ', $code )[0]; // Get shortcode name
$shortcode = str_replace( '%id%', get_the_ID(), $shortcode );
add_filter( 'woocommerce_gallery_image_size', [ $this, 'woocommerce_gallery_image_size' ] );
?>
<div id="woobuilder-<?php echo $code ?>" class="woobuilder-module">
<!--<?php echo $shortcode ?>-->
<?php echo do_shortcode( $shortcode ); ?>
</div>
<?php
remove_filter( 'woocommerce_gallery_image_size', [ $this, 'woocommerce_gallery_image_size' ] );
}
}
}

public function woocommerce_gallery_image_size() {
return 'large';
}

public function init() {

}
}

0 comments on commit 3c7eef4

Please sign in to comment.