default.php
19 lines
| 1 | <?php |
| 2 | defined('ABSPATH') || exit; |
| 3 | // Editor Mode Check. |
| 4 | $in_editor_mode = \ShopEngine\Core\Template_Cpt::TYPE == get_post_type(); |
| 5 | ?> |
| 6 | <div class="shopengine-product-description"> |
| 7 | <?php |
| 8 | // Show only in the Editor and Preview Mode. |
| 9 | if ( $in_editor_mode ): |
| 10 | $product = \ShopEngine\Widgets\Products::instance()->get_product(get_post_type()); |
| 11 | shopengine_content_render(\ShopEngine\Utils\Helper::render($product->get_description())); |
| 12 | |
| 13 | else: // Show in the Frontend. |
| 14 | the_content(); |
| 15 | |
| 16 | endif; |
| 17 | ?> |
| 18 | </div> |
| 19 |