PluginProbe
Elementor Website Builder – more than just a page builder / 3.2.0
Elementor Website Builder – more than just a page builder v3.2.0
4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 All 452 releases
← All changes | core/kits/documents/kit.php +11 -23 4.1.53.2.0 View file →
@@ -2,14 +2,15 @@
2 2 namespace Elementor\Core\Kits\Documents;
3 3
4 4 use Elementor\Core\DocumentTypes\PageBase;
5 5 use Elementor\Core\Files\CSS\Post as Post_CSS;
6 +use Elementor\Core\Kits\Documents\Tabs;
6 7 use Elementor\Core\Settings\Manager as SettingsManager;
7 8 use Elementor\Core\Settings\Page\Manager as PageManager;
8 9 use Elementor\Plugin;
9 10
10 11 if ( ! defined( 'ABSPATH' ) ) {
11 - exit; // Exit if accessed directly.
12 + exit; // Exit if accessed directly
12 13 }
13 14
14 15 class Kit extends PageBase {
15 16 /**
@@ -34,14 +35,14 @@
34 35
35 36 return $properties;
36 37 }
37 38
38 - public static function get_type() {
39 + public function get_name() {
39 40 return 'kit';
40 41 }
41 42
42 43 public static function get_title() {
43 - return esc_html__( 'Kit', 'elementor' );
44 + return __( 'Kit', 'elementor' );
44 45 }
45 46
46 47 /**
47 48 * @return Tabs\Tab_Base[]
@@ -49,19 +50,8 @@
49 50 public function get_tabs() {
50 51 return $this->tabs;
51 52 }
52 53
53 - /**
54 - * Retrieve a tab by ID.
55 - *
56 - * @param $id
57 - *
58 - * @return Tabs\Tab_Base
59 - */
60 - public function get_tab( $id ) {
61 - return self::get_items( $this->get_tabs(), $id );
62 - }
63 -
64 54 protected function get_have_a_look_url() {
65 55 return '';
66 56 }
67 57
@@ -68,9 +58,9 @@
68 58 public static function get_editor_panel_config() {
69 59 $config = parent::get_editor_panel_config();
70 60 $config['default_route'] = 'panel/global/menu';
71 61
72 - $config['needHelpUrl'] = 'https://go.elementor.com/global-settings/';
62 + $config['needHelpUrl'] = 'https://go.elementor.com/global-settings';
73 63
74 64 return $config;
75 65 }
76 66
@@ -110,12 +100,12 @@
110 100 /**
111 101 * Register a kit settings menu.
112 102 *
113 103 * @param $id
114 - * @param $class_name
104 + * @param $class
115 105 */
116 - public function register_tab( $id, $class_name ) {
117 - $this->tabs[ $id ] = new $class_name( $this );
106 + public function register_tab( $id, $class ) {
107 + $this->tabs[ $id ] = new $class( $this );
118 108 }
119 109
120 110 /**
121 111 * @inheritDoc
@@ -124,9 +114,8 @@
124 114 $config = parent::get_initial_config();
125 115
126 116 foreach ( $this->tabs as $id => $tab ) {
127 117 $config['tabs'][ $id ] = [
128 - 'id' => $id,
129 118 'title' => $tab->get_title(),
130 119 'icon' => $tab->get_icon(),
131 120 'group' => $tab->get_group(),
132 121 'helpUrl' => $tab->get_help_url(),
@@ -150,10 +139,10 @@
150 139 }
151 140
152 141 protected function get_post_statuses() {
153 142 return [
154 - 'draft' => sprintf( '%s (%s)', esc_html__( 'Disabled', 'elementor' ), esc_html__( 'Draft', 'elementor' ) ),
155 - 'publish' => esc_html__( 'Published', 'elementor' ),
143 + 'draft' => sprintf( '%s (%s)', __( 'Disabled', 'elementor' ), __( 'Draft', 'elementor' ) ),
144 + 'publish' => __( 'Published', 'elementor' ),
156 145 ];
157 146 }
158 147
159 148 public function add_repeater_row( $control_id, $item ) {
@@ -172,9 +161,9 @@
172 161
173 162 $page_settings_manager = SettingsManager::get_settings_managers( 'page' );
174 163 $page_settings_manager->save_settings( $document_settings, $this->get_id() );
175 164
176 - /** @var Kit $autosave */
165 + /** @var Kit $autosave **/
177 166 $autosave = $this->get_autosave();
178 167
179 168 if ( $autosave ) {
180 169 $autosave->add_repeater_row( $control_id, $item );
@@ -207,9 +196,8 @@
207 196 'settings-site-identity' => Tabs\Settings_Site_Identity::class,
208 197 'settings-background' => Tabs\Settings_Background::class,
209 198 'settings-layout' => Tabs\Settings_Layout::class,
210 199 'settings-lightbox' => Tabs\Settings_Lightbox::class,
211 - 'settings-page-transitions' => Tabs\Settings_Page_Transitions::class,
212 200 'settings-custom-css' => Tabs\Settings_Custom_CSS::class,
213 201 ];
214 202
215 203 foreach ( $tabs as $id => $class ) {