PluginProbe
Elementor Website Builder – more than just a page builder / 3.11.2
Elementor Website Builder – more than just a page builder v3.11.2
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 4.0.7 All 451 releases
← All changes | modules/container-converter/module.php +2 -25 4.2.43.11.2 View file →
@@ -6,9 +6,9 @@
6 6 use Elementor\Controls_Stack;
7 7 use Elementor\Plugin;
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 Module extends \Elementor\Core\Base\Module {
14 14
@@ -101,9 +101,9 @@
101 101 *
102 102 * @return void
103 103 */
104 104 protected function add_page_convert_button( Controls_Stack $controls_stack ) {
105 - if ( ! Plugin::$instance->editor->is_edit_mode() || ! $this->page_contains_sections( $controls_stack ) || ! Plugin::$instance->role_manager->user_can( 'design' ) ) {
105 + if ( ! Plugin::$instance->editor->is_edit_mode() ) {
106 106 return;
107 107 }
108 108
109 109 $controls_stack->start_injection( [
@@ -124,31 +124,8 @@
124 124 ]
125 125 );
126 126
127 127 $controls_stack->end_injection();
128 - }
129 -
130 - /**
131 - * Checks if document has any Section elements.
132 - *
133 - * @param \Elementor\Controls_Stack $controls_stack
134 - *
135 - * @return bool
136 - */
137 - protected function page_contains_sections( $controls_stack ) {
138 - $data = $controls_stack->get_elements_data();
139 -
140 - if ( ! is_array( $data ) ) {
141 - return false;
142 - }
143 -
144 - foreach ( $data as $element ) {
145 - if ( isset( $element['elType'] ) && 'section' === $element['elType'] ) {
146 - return true;
147 - }
148 - }
149 -
150 - return false;
151 128 }
152 129
153 130 /**
154 131 * Initialize the Container-Converter module.