PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 3.4.0
ShopBuilder – WooCommerce Builder For Elementor v3.4.0
3.4.2 3.4.1 3.4.0 2.0.1 2.0.2 2.0.3 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 All 63 releases
← All changes | app/Abstracts/AdditionalQueryCustomLayout.php +24 -16 2.0.33.4.0 View file →
@@ -23,13 +23,8 @@
23 23 * ProductsGrid class.
24 24 */
25 25 abstract class AdditionalQueryCustomLayout extends ElementorWidgetBase {
26 26 /**
27 - * Control Fields
28 - *
29 - * @var array
30 - */
31 - /**
32 27 * Action Button Traits.
33 28 */
34 29 use ActionBtnTraits;
35 30
@@ -82,10 +77,8 @@
82 77 $this->widget_query()
83 78 )
84 79 );
85 80
86 - unset( $fields['grid_style'] );
87 -
88 81 return $fields;
89 82 }
90 83
91 84 /**
@@ -110,11 +103,12 @@
110 103 unset( $content_visibility['show_title']['separator'] );
111 104
112 105 $sections = array_merge(
113 106 $content_visibility,
107 + Controls\SettingsFields::content_ordering( $this ),
108 + Controls\SettingsFields::section_title( $this ),
114 109 Controls\SettingsFields::image( $this ),
115 110 Controls\SettingsFields::action_buttons( $this ),
116 - Controls\SettingsFields::section_title( $this ),
117 111 Controls\SettingsFields::product_title( $this ),
118 112 Controls\SettingsFields::product_excerpt( $this ),
119 113 Controls\SettingsFields::badges( $this ),
120 114 $this->variation_swatch_conditionaly(),
@@ -129,16 +123,24 @@
129 123 */
130 124 protected function widget_layout() {
131 125 return Controls\LayoutFields::grid_layout( $this );
132 126 }
127 +
128 + /**
129 + * Controls for layout tab
130 + *
131 + * @return array
132 + */
133 133 public function variation_swatch_conditionaly() {
134 - if ( ! function_exists( 'rtwpvsp' ) ) {
134 + if ( ! function_exists( 'rtwpvsp' ) && ! rtsb()->has_pro() ) {
135 135 return [];
136 136 }
137 - $swatches_controls = Controls\SettingsFields::variation_swatch( $this );
138 - $swatches_controls['swatch_position']['condition'] = [
139 - 'layout' => [ 'grid-layout1' ],
140 - ];
137 + $swatches_controls = Controls\SettingsFields::variation_swatch( $this );
138 + if ( ! empty( $swatches_controls['swatch_position'] ) ) {
139 + $swatches_controls['swatch_position']['condition'] = [
140 + 'layout' => [ 'grid-layout1' ],
141 + ];
142 + }
141 143 return $swatches_controls;
142 144 }
143 145 /**
144 146 * Controls for layout tab
@@ -150,8 +152,13 @@
150 152 $additional_query['posts_limit']['separator'] = 'default';
151 153 return $additional_query;
152 154 }
153 155
156 + /**
157 + * Controls for style tab
158 + *
159 + * @return array
160 + */
154 161 protected function pagination_navigation() {
155 162 return Controls\StyleFields::pagination( $this );
156 163 }
157 164
@@ -176,8 +183,9 @@
176 183 Controls\StyleFields::product_add_to_cart( $this ),
177 184 Controls\StyleFields::product_wishlist( $this ),
178 185 Controls\StyleFields::product_quick_view( $this ),
179 186 Controls\StyleFields::product_compare( $this ),
187 + Controls\StyleFields::action_buttons( $this ),
180 188 Controls\StyleFields::product_badges( $this ),
181 189 $this->pagination_navigation(),
182 190 Controls\StyleFields::hover_icon_button( $this )
183 191 ),
@@ -187,9 +195,9 @@
187 195
188 196 /**
189 197 * Widget Field
190 198 *
191 - * @return void|array
199 + * @return string
192 200 */
193 201 protected function render_template_file() {
194 202 return 'elementor/general/grid/';
195 203 }
@@ -206,9 +214,9 @@
206 214 $this->render_start();
207 215 $args = [
208 216 'posts_per_page' => $settings['posts_limit'],
209 217 'columns' => $settings['posts_limit'],
210 - 'orderby' => $settings['posts_order_by'], // @codingStandardsIgnoreLine.
218 + 'orderby' => $settings['posts_order_by'],
211 219 'order' => $settings['posts_order'],
212 220 ];
213 221
214 222 $settings['query_products'] = $this->get_the_products( $args );
@@ -220,11 +228,11 @@
220 228 if ( $this->is_builder_mode() ) {
221 229 add_filter( 'wp_kses_allowed_html', [ FilterHooks::class, 'custom_wpkses_post_tags' ], 10, 2 );
222 230 }
223 231
232 + // Call the template rendering method.
224 233 Fns::print_html( Render::instance()->setup_loop_for_product_view( $this->render_template_file(), $settings, $this ), true );
225 234
226 235 $this->action_button_icon_set_default();
227 236 $this->render_end();
228 237 }
229 -
230 238 }