| @@ -7,9 +7,9 @@ | ||
| 7 | 7 | |
| 8 | 8 | namespace RadiusTheme\SB\Abstracts; |
| 9 | 9 | |
| 10 | 10 | use RadiusTheme\SB\Helpers\Fns; |
| 11 | -use RadiusTheme\SB\Elementor\Render\WCRender; | |
| 11 | +use RadiusTheme\SB\Elementor\Render\Render; | |
| 12 | 12 | use RadiusTheme\SB\Elementor\Widgets\Controls; |
| 13 | 13 | use RadiusTheme\SB\Controllers\Hooks\FilterHooks; |
| 14 | 14 | use RadiusTheme\SB\Traits\ActionBtnTraits; |
| 15 | 15 | |
| @@ -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 | |
| @@ -105,9 +110,8 @@ | ||
| 105 | 110 | unset( $content_visibility['show_title']['separator'] ); |
| 106 | 111 | |
| 107 | 112 | $sections = array_merge( |
| 108 | 113 | $content_visibility, |
| 109 | - Controls\SettingsFields::content_ordering( $this ), | |
| 110 | 114 | Controls\SettingsFields::image( $this ), |
| 111 | 115 | Controls\SettingsFields::action_buttons( $this ), |
| 112 | 116 | Controls\SettingsFields::section_title( $this ), |
| 113 | 117 | Controls\SettingsFields::product_title( $this ), |
| @@ -112,9 +116,9 @@ | ||
| 112 | 116 | Controls\SettingsFields::section_title( $this ), |
| 113 | 117 | Controls\SettingsFields::product_title( $this ), |
| 114 | 118 | Controls\SettingsFields::product_excerpt( $this ), |
| 115 | 119 | Controls\SettingsFields::badges( $this ), |
| 116 | - $this->variation_swatch_conditionaly(), | |
| 120 | + Controls\SettingsFields::variation_swatch( $this ), | |
| 117 | 121 | Controls\SettingsFields::links( $this ) |
| 118 | 122 | ); |
| 119 | 123 | return apply_filters( 'rtsb/elements/elementor/product_custom_settings_tab', $sections, $this ); |
| 120 | 124 | } |
| @@ -125,18 +129,8 @@ | ||
| 125 | 129 | */ |
| 126 | 130 | protected function widget_layout() { |
| 127 | 131 | return Controls\LayoutFields::grid_layout( $this ); |
| 128 | 132 | } |
| 129 | - public function variation_swatch_conditionaly() { | |
| 130 | - if ( ! function_exists( 'rtwpvsp' ) ) { | |
| 131 | - return []; | |
| 132 | - } | |
| 133 | - $swatches_controls = Controls\SettingsFields::variation_swatch( $this ); | |
| 134 | - $swatches_controls['swatch_position']['condition'] = [ | |
| 135 | - 'layout' => [ 'grid-layout1' ], | |
| 136 | - ]; | |
| 137 | - return $swatches_controls; | |
| 138 | - } | |
| 139 | 133 | /** |
| 140 | 134 | * Controls for layout tab |
| 141 | 135 | * |
| 142 | 136 | * @return array |
| @@ -202,9 +196,9 @@ | ||
| 202 | 196 | $this->render_start(); |
| 203 | 197 | $args = [ |
| 204 | 198 | 'posts_per_page' => $settings['posts_limit'], |
| 205 | 199 | 'columns' => $settings['posts_limit'], |
| 206 | - 'orderby' => $settings['posts_order_by'], | |
| 200 | + 'orderby' => $settings['posts_order_by'], // @codingStandardsIgnoreLine. | |
| 207 | 201 | 'order' => $settings['posts_order'], |
| 208 | 202 | ]; |
| 209 | 203 | |
| 210 | 204 | $settings['query_products'] = $this->get_the_products( $args ); |
| @@ -216,11 +210,11 @@ | ||
| 216 | 210 | if ( $this->is_builder_mode() ) { |
| 217 | 211 | add_filter( 'wp_kses_allowed_html', [ FilterHooks::class, 'custom_wpkses_post_tags' ], 10, 2 ); |
| 218 | 212 | } |
| 219 | 213 | |
| 220 | - // Call the template rendering method. | |
| 221 | - Fns::print_html( WCRender::instance()->setup_loop_for_product_view( $this->render_template_file(), $settings, $this ), true ); | |
| 214 | + Fns::print_html( Render::instance()->setup_loop_for_product_view( $this->render_template_file(), $settings, $this ), true ); | |
| 222 | 215 | |
| 223 | 216 | $this->action_button_icon_set_default(); |
| 224 | 217 | $this->render_end(); |
| 225 | 218 | } |
| 219 | + | |
| 226 | 220 | } |