| @@ -23,8 +23,13 @@ | ||
| 23 | 23 | * ProductsGrid class. |
| 24 | 24 | */ |
| 25 | 25 | abstract class AdditionalQueryCustomLayout extends ElementorWidgetBase { |
| 26 | 26 | /** |
| 27 | + * Control Fields | |
| 28 | + * | |
| 29 | + * @var array | |
| 30 | + */ | |
| 31 | + /** | |
| 27 | 32 | * Action Button Traits. |
| 28 | 33 | */ |
| 29 | 34 | use ActionBtnTraits; |
| 30 | 35 | |
| @@ -111,9 +116,9 @@ | ||
| 111 | 116 | Controls\SettingsFields::section_title( $this ), |
| 112 | 117 | Controls\SettingsFields::product_title( $this ), |
| 113 | 118 | Controls\SettingsFields::product_excerpt( $this ), |
| 114 | 119 | Controls\SettingsFields::badges( $this ), |
| 115 | - $this->variation_swatch_conditionaly(), | |
| 120 | + Controls\SettingsFields::variation_swatch( $this ), | |
| 116 | 121 | Controls\SettingsFields::links( $this ) |
| 117 | 122 | ); |
| 118 | 123 | return apply_filters( 'rtsb/elements/elementor/product_custom_settings_tab', $sections, $this ); |
| 119 | 124 | } |
| @@ -124,18 +129,8 @@ | ||
| 124 | 129 | */ |
| 125 | 130 | protected function widget_layout() { |
| 126 | 131 | return Controls\LayoutFields::grid_layout( $this ); |
| 127 | 132 | } |
| 128 | - public function variation_swatch_conditionaly() { | |
| 129 | - if ( ! function_exists( 'rtwpvsp' ) ) { | |
| 130 | - return []; | |
| 131 | - } | |
| 132 | - $swatches_controls = Controls\SettingsFields::variation_swatch( $this ); | |
| 133 | - $swatches_controls['swatch_position']['condition'] = [ | |
| 134 | - 'layout' => [ 'grid-layout1' ], | |
| 135 | - ]; | |
| 136 | - return $swatches_controls; | |
| 137 | - } | |
| 138 | 133 | /** |
| 139 | 134 | * Controls for layout tab |
| 140 | 135 | * |
| 141 | 136 | * @return array |
| @@ -201,9 +196,9 @@ | ||
| 201 | 196 | $this->render_start(); |
| 202 | 197 | $args = [ |
| 203 | 198 | 'posts_per_page' => $settings['posts_limit'], |
| 204 | 199 | 'columns' => $settings['posts_limit'], |
| 205 | - 'orderby' => $settings['posts_order_by'], | |
| 200 | + 'orderby' => $settings['posts_order_by'], // @codingStandardsIgnoreLine. | |
| 206 | 201 | 'order' => $settings['posts_order'], |
| 207 | 202 | ]; |
| 208 | 203 | |
| 209 | 204 | $settings['query_products'] = $this->get_the_products( $args ); |
| @@ -220,5 +215,6 @@ | ||
| 220 | 215 | |
| 221 | 216 | $this->action_button_icon_set_default(); |
| 222 | 217 | $this->render_end(); |
| 223 | 218 | } |
| 219 | + | |
| 224 | 220 | } |