| 1 |
<?php |
| 2 |
/** |
| 3 |
* Elementor document type for Woo Builder templates. |
| 4 |
* |
| 5 |
* @package King_Addons |
| 6 |
*/ |
| 7 |
|
| 8 |
namespace King_Addons\Woo_Builder; |
| 9 |
|
| 10 |
use Elementor\Core\DocumentTypes\Post; |
| 11 |
|
| 12 |
if (!defined('ABSPATH')) { |
| 13 |
exit; |
| 14 |
} |
| 15 |
|
| 16 |
/** |
| 17 |
* Registers a custom document type for Woo Builder templates. |
| 18 |
*/ |
| 19 |
class Document extends Post |
| 20 |
{ |
| 21 |
/** |
| 22 |
* Document type name. |
| 23 |
* |
| 24 |
* @return string |
| 25 |
*/ |
| 26 |
public static function get_type(): string |
| 27 |
{ |
| 28 |
return 'king-addons-woo-builder'; |
| 29 |
} |
| 30 |
|
| 31 |
/** |
| 32 |
* Document type title. |
| 33 |
* |
| 34 |
* @return string |
| 35 |
*/ |
| 36 |
public static function get_title(): string |
| 37 |
{ |
| 38 |
return esc_html__('Woo Builder Template', 'king-addons'); |
| 39 |
} |
| 40 |
|
| 41 |
/** |
| 42 |
* Document properties. |
| 43 |
* |
| 44 |
* @return array<string,mixed> |
| 45 |
*/ |
| 46 |
public static function get_properties(): array |
| 47 |
{ |
| 48 |
return [ |
| 49 |
'location' => 'woo-builder', |
| 50 |
'support_wp_page_templates' => true, |
| 51 |
'support_site_editor' => false, |
| 52 |
'has_elements' => true, |
| 53 |
]; |
| 54 |
} |
| 55 |
} |
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|