PluginProbe
King Addons for Elementor – 80+ Elementor Widgets, 4 000+ Elementor Templates, WooCommerce, Mega Menu, Popup Builder / 51.1.78
King Addons for Elementor – 80+ Elementor Widgets, 4 000+ Elementor Templates, WooCommerce, Mega Menu, Popup Builder v51.1.78
51.1.83 51.1.82 51.1.81 51.1.79 51.1.78 51.1.77 51.1.76 51.1.74 51.1.75 51.1.65 51.1.64 51.1.63 trunk 51.1.14 51.1.2 51.1.35 51.1.36 51.1.37 51.1.38 51.1.39 51.1.44 51.1.45 51.1.46 51.1.47 51.1.49 All 37 releases
king-addons / includes / helpers / Woo_Builder / Document.php

Document.php in King Addons for Elementor – 80+ Elementor Widgets, 4 000+ Elementor Templates, WooCommerce, Mega Menu, Popup Builder 51.1.78, at includes/helpers/Woo_Builder/Document.php

77 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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 $properties = parent::get_properties();
49
50 return array_merge($properties, [
51 'location' => 'woo-builder',
52 'support_wp_page_templates' => true,
53 'support_site_editor' => false,
54 'has_elements' => true,
55 'support_kit' => true,
56 'cpt' => ['elementor_library'],
57 ]);
58 }
59
60 /**
61 * Get the document edit URL.
62 *
63 * @return string
64 */
65 public function get_edit_url(): string
66 {
67 $url = parent::get_edit_url();
68
69 if ($url) {
70 $url = add_query_arg('action', 'elementor', $url);
71 }
72
73 return $url;
74 }
75 }
76
77