template-surecart-blank.php
2 years ago
template-surecart-collection.php
1 year ago
template-surecart-dashboard.php
5 days ago
template-surecart-product.php
1 year ago
template-surecart-product.php
30 lines
| 1 | <?php |
| 2 | $product = sc_get_product(); |
| 3 | global $content_width; |
| 4 | $template_id = $product->template_part_id ?? 'surecart/surecart//product-info'; |
| 5 | $block_template = get_block_template( $template_id, 'wp_template_part' ); |
| 6 | if ( empty( $block_template ) ) { |
| 7 | $block_template = get_block_template( 'surecart/surecart//product-info', 'wp_template_part' ); |
| 8 | } |
| 9 | $content = surecart_get_the_block_template_html( $block_template->content ?? '' ); |
| 10 | echo '<style> |
| 11 | .sc-template-wrapper, |
| 12 | .sc-template-container { |
| 13 | width: 100%; |
| 14 | } |
| 15 | .sc-template-wrapper .sc-template-container { |
| 16 | max-width: var(--wp--style--global--wide-size, ' . (int) ( $content_width ?? 1170 ) . 'px) !important; |
| 17 | margin-left: auto; |
| 18 | margin-right: auto; |
| 19 | } |
| 20 | </style>'; |
| 21 | get_header(); |
| 22 | ?> |
| 23 | <div class="wp-block-group is-layout-constrained sc-template-wrapper" style="margin-top:0;margin-bottom:0;padding-top:var(--wp--preset--spacing--70);padding-bottom:var(--wp--preset--spacing--70)"> |
| 24 | <div class="wp-block-group alignwide sc-template-container"> |
| 25 | <?php echo $content; // phpcs:ignore WordPress.Security.EscapeOutput ?> |
| 26 | </div> |
| 27 | </div> |
| 28 | <?php |
| 29 | get_footer(); |
| 30 |