PluginProbe
Elementor Website Builder – more than just a page builder / 3.0.13
Elementor Website Builder – more than just a page builder v3.0.13
4.3.2 4.3.1 4.3.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 All 455 releases
← All changes | core/kits/documents/tabs/settings-site-identity.php +18 -50 4.3.0 → 3.0.13 View file →
@@ -2,13 +2,13 @@
2 2
3 3 namespace Elementor\Core\Kits\Documents\Tabs;
4 4
5 5 use Elementor\Controls_Manager;
6 -use Elementor\Core\Base\Document;
7 -use Elementor\Core\Files\Uploads_Manager;
6 +use Elementor\DB;
7 +use Elementor\Core\Files\Assets\Files_Upload_Handler;
8 8
9 9 if ( ! defined( 'ABSPATH' ) ) {
10 - exit; // Exit if accessed directly.
10 + exit; // Exit if accessed directly
11 11 }
12 12
13 13 class Settings_Site_Identity extends Tab_Base {
14 14
@@ -16,23 +16,11 @@
16 16 return 'settings-site-identity';
17 17 }
18 18
19 19 public function get_title() {
20 - return esc_html__( 'Site Identity', 'elementor' );
20 + return __( 'Site Identity', 'elementor' );
21 21 }
22 22
23 - public function get_group() {
24 - return 'settings';
25 - }
26 -
27 - public function get_icon() {
28 - return 'eicon-site-identity';
29 - }
30 -
31 - public function get_help_url() {
32 - return 'https://go.elementor.com/global-site-identity/';
33 - }
34 -
35 23 protected function register_tab_controls() {
36 24 $custom_logo_id = get_theme_mod( 'custom_logo' );
37 25 $custom_logo_src = wp_get_attachment_image_src( $custom_logo_id, 'full' );
38 26
@@ -39,9 +27,9 @@
39 27 $site_icon_id = get_option( 'site_icon' );
40 28 $site_icon_src = wp_get_attachment_image_src( $site_icon_id, 'full' );
41 29
42 30 // If CANNOT upload svg normally, it will add a custom inline option to force svg upload if requested. (in logo and favicon)
43 - $should_include_svg_inline_option = ! Uploads_Manager::are_unfiltered_uploads_enabled();
31 + $should_include_svg_inline_option = ! Files_Upload_Handler::is_enabled();
44 32
45 33 $this->start_controls_section(
46 34 'section_' . $this->get_id(),
47 35 [
@@ -52,17 +40,11 @@
52 40
53 41 $this->add_control(
54 42 $this->get_id() . '_refresh_notice',
55 43 [
56 - 'type' => Controls_Manager::ALERT,
57 - 'alert_type' => 'info',
58 - 'content' => sprintf(
59 - /* translators: 1: Link open tag, 2: Link open tag, 3: Link close tag. */
60 - esc_html__( 'Changes will be reflected only after %1$s saving %3$s and %2$s reloading %3$s preview.', 'elementor' ),
61 - '<a href="javascript: $e.run( \'document/save/default\' )">',
62 - '<a href="javascript: $e.run( \'preview/reload\' )">',
63 - '</a>'
64 - ),
44 + 'type' => Controls_Manager::RAW_HTML,
45 + 'raw' => __( 'Changes will be reflected in the preview only after the page reloads.', 'elementor' ),
46 + 'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',
65 47 ]
66 48 );
67 49
68 50 $this->add_control(
@@ -67,13 +49,12 @@
67 49
68 50 $this->add_control(
69 51 'site_name',
70 52 [
71 - 'label' => esc_html__( 'Site Name', 'elementor' ),
53 + 'label' => __( 'Site Name', 'elementor' ),
72 54 'default' => get_option( 'blogname' ),
73 - 'placeholder' => esc_html__( 'Choose name', 'elementor' ),
55 + 'placeholder' => __( 'Choose name', 'elementor' ),
74 56 'label_block' => true,
75 - 'export' => false,
76 57 ]
77 58 );
78 59
79 60 $this->add_control(
@@ -78,13 +59,12 @@
78 59
79 60 $this->add_control(
80 61 'site_description',
81 62 [
82 - 'label' => esc_html__( 'Site Description', 'elementor' ),
63 + 'label' => __( 'Site Description', 'elementor' ),
83 64 'default' => get_option( 'blogdescription' ),
84 - 'placeholder' => esc_html__( 'Choose description', 'elementor' ),
65 + 'placeholder' => __( 'Choose description', 'elementor' ),
85 66 'label_block' => true,
86 - 'export' => false,
87 67 ]
88 68 );
89 69
90 70 $this->add_control(
@@ -89,9 +69,9 @@
89 69
90 70 $this->add_control(
91 71 'site_logo',
92 72 [
93 - 'label' => esc_html__( 'Site Logo', 'elementor' ),
73 + 'label' => __( 'Site Logo', 'elementor' ),
94 74 'type' => Controls_Manager::MEDIA,
95 75 'should_include_svg_inline_option' => $should_include_svg_inline_option,
96 76 'default' => [
97 77 'id' => $custom_logo_id,
@@ -96,20 +76,9 @@
96 76 'default' => [
97 77 'id' => $custom_logo_id,
98 78 'url' => $custom_logo_src ? $custom_logo_src[0] : '',
99 79 ],
100 - 'description' => sprintf(
101 - /* translators: 1: Width number pixel, 2: Height number pixel. */
102 - esc_html__( 'Suggested image dimensions: %1$s × %2$s pixels.', 'elementor' ),
103 - '350',
104 - '100'
105 - ),
106 - 'export' => false,
107 - 'ai' => [
108 - 'active' => true,
109 - 'type' => 'media',
110 - 'category' => 'vector',
111 - ],
80 + 'description' => __( 'Suggested image dimensions: 350 × 100 pixels.', 'elementor' ),
112 81 ]
113 82 );
114 83
115 84 $this->add_control(
@@ -114,9 +83,9 @@
114 83
115 84 $this->add_control(
116 85 'site_favicon',
117 86 [
118 - 'label' => esc_html__( 'Site Favicon', 'elementor' ),
87 + 'label' => __( 'Site Favicon', 'elementor' ),
119 88 'type' => Controls_Manager::MEDIA,
120 89 'should_include_svg_inline_option' => $should_include_svg_inline_option,
121 90 'default' => [
122 91 'id' => $site_icon_id,
@@ -121,10 +90,9 @@
121 90 'default' => [
122 91 'id' => $site_icon_id,
123 92 'url' => $site_icon_src ? $site_icon_src[0] : '',
124 93 ],
125 - 'description' => esc_html__( 'Suggested favicon dimensions: 512 × 512 pixels.', 'elementor' ),
126 - 'export' => false,
94 + 'description' => __( 'Suggested favicon dimensions: 512 × 512 pixels.', 'elementor' ),
127 95 ]
128 96 );
129 97
130 98 $this->end_controls_section();
@@ -131,10 +99,10 @@
131 99 }
132 100
133 101 public function on_save( $data ) {
134 102 if (
135 - ! isset( $data['settings']['post_status'] ) ||
136 - Document::STATUS_PUBLISH !== $data['settings']['post_status'] ||
103 + ! isset( $data['settings'] ) ||
104 + DB::STATUS_PUBLISH !== $data['settings']['post_status'] ||
137 105 // Should check for the current action to avoid infinite loop
138 106 // when updating options like: "blogname" and "blogdescription".
139 107 strpos( current_action(), 'update_option_' ) === 0
140 108 ) {