0 ), $atts, 'panorama' ); $id = absint( $atts['id'] ); if ( ! $id ) { return ''; } $bppiv_block = null; // Check Post-Type. $post_type = get_post_type( $id ); if ( 'bppiv-image-viewer' !== $post_type ) { return ''; } // Meta Data. $bppiv_meta = get_post_meta( $id, '_bppivimages_', true ); if ( ! is_array( $bppiv_meta ) ) { $bppiv_meta = array(); } $bppiv_width = '100%'; $bppiv_height = '320px'; if ( isset( $bppiv_meta['bppiv_image_width']['width'] ) ) { $bppiv_width = $bppiv_meta['bppiv_image_width']['width'] . $bppiv_meta['bppiv_image_width']['unit']; } if ( isset( $bppiv_meta['bppiv_image_height']['height'] ) ) { $bppiv_height = $bppiv_meta['bppiv_image_height']['height'] . $bppiv_meta['bppiv_image_height']['unit']; } $pan_type = isset( $bppiv_meta['bppiv_type'] ) ? sanitize_key( $bppiv_meta['bppiv_type'] ) : ''; $get_value = bppiv_isset( $bppiv_meta ); if ( file_exists( BPPIV_PATH . "blocks/{$pan_type}.php" ) ) { include BPPIV_PATH . "blocks/{$pan_type}.php"; } return render_block( $bppiv_block ); } add_shortcode( 'panorama', 'bppiv_image_viewer' ); // Shortcode for Product Spot Panorama viewer (Pro Feature). function bppiv_panorama_product_viewer_callback( $attrs ) { return '