1 | <?php |
||
23 | final class Siteorigin_Panels { |
||
24 | |||
25 | /** |
||
26 | * The single instance of the class |
||
27 | * |
||
28 | * @var object |
||
29 | * @since 3.0.0 |
||
30 | */ |
||
31 | protected static $_instance = null; |
||
32 | |||
33 | /** |
||
34 | * Return the single class instance |
||
35 | * |
||
36 | * @return object |
||
37 | * @since 2.4.0 |
||
38 | */ |
||
39 | public static function instance() { |
||
45 | |||
46 | /** |
||
47 | * Class constructor |
||
48 | * |
||
49 | * @uses is_admin() |
||
50 | * @uses add_action() |
||
51 | * |
||
52 | * @since 3.0.0 |
||
53 | */ |
||
54 | protected function __construct() { |
||
63 | |||
64 | /** |
||
65 | * Prevent the class from being cloned |
||
66 | * |
||
67 | * @return void |
||
68 | * @since 3.0.0 |
||
69 | */ |
||
70 | protected function __clone() { |
||
73 | |||
74 | /** |
||
75 | * Initialize compatibility for Page Builder (SiteOrigin Panels) |
||
76 | * |
||
77 | * @uses add_filter() |
||
78 | * @uses remove_filter() |
||
79 | * @uses is_plugin_active() |
||
80 | * |
||
81 | * @return void |
||
82 | * @since 3.0.0 |
||
83 | */ |
||
84 | public function admin_init() { |
||
95 | |||
96 | /** |
||
97 | * Remove widget number to prevent translation when using Page Builder (SiteOrigin Panels) + WPML String Translation |
||
98 | * |
||
99 | * @param object $widget Widget object. |
||
100 | * @return object |
||
101 | * @since 3.0.0 |
||
102 | */ |
||
103 | public function widget_object( $widget ) { |
||
109 | |||
110 | /** |
||
111 | * Add selector for widget detection for Page Builder (SiteOrigin Panels) |
||
112 | * |
||
113 | * @param string[] $selectors Array of selectors. |
||
114 | * @return string[] |
||
115 | * @since 3.0.0 |
||
116 | */ |
||
117 | public function container_selectors( $selectors ) { |
||
121 | |||
122 | /** |
||
123 | * Add activate events for Page Builder (SiteOrigin Panels) |
||
124 | * |
||
125 | * @param string[] $events Array of events. |
||
126 | * @return string[] |
||
127 | * @since 3.0.0 |
||
128 | */ |
||
129 | public function activate_events( $events ) { |
||
133 | |||
134 | /** |
||
135 | * Add deactivate events for Page Builder (SiteOrigin Panels) |
||
136 | * |
||
137 | * @param string[] $events Array of events. |
||
138 | * @return string[] |
||
139 | * @since 3.0.0 |
||
140 | */ |
||
141 | public function deactivate_events( $events ) { |
||
145 | |||
146 | /** |
||
147 | * Add pages filter to enable editor for Page Builder (SiteOrigin Panels) |
||
148 | * |
||
149 | * @param string[] $pages Array of pages. |
||
150 | * @return string[] |
||
151 | * @since 3.0.0 |
||
152 | */ |
||
153 | public function enable_pages( $pages ) { |
||
162 | |||
163 | /** |
||
164 | * Add widget field for Page Builder (SiteOrigin Panels) |
||
165 | * |
||
166 | * @param string[] $fields Array of fields. |
||
167 | * @return string[] |
||
168 | * @since 3.0.0 |
||
169 | */ |
||
170 | public function additional_fields( $fields ) { |
||
174 | |||
175 | /** |
||
176 | * Disable old compatibility code provided by Page Builder (SiteOrigin Panels) |
||
177 | * |
||
178 | * @uses remove_action() |
||
179 | * |
||
180 | * @return void |
||
181 | * @since 3.0.0 |
||
182 | */ |
||
183 | public function disable_compat() { |
||
187 | |||
188 | } // END class |
||
189 | |||
191 |