e_color = array( 'unselect_line_color' => array( 'label' => __( 'Line Color (Inactive)', 'woofunnels-order-bump' ), 'type' => 'color', 'key' => 'unselect_line_color', 'stylekey' => 'background-color', 'class' => 'bwf-field-one-half', 'selectors' => array( $bump_selector_wrapper . ' .wfob-switch + label span.sw', ), 'value' => 'background-color:{{value}}', ), 'select_line_color' => array( 'label' => __( 'Line Color (Active)', 'woofunnels-order-bump' ), 'type' => 'color', 'key' => 'select_line_color', 'stylekey' => 'background-color', 'class' => 'bwf-field-one-half', 'selectors' => array( $bump_selector_wrapper . ' .wfob-switch:checked + label span.sw', ), 'value' => 'background-color:{{value}}', ), 'switch_color_label_text' => array( 'label' => __( 'Switch Color', 'woofunnels-order-bump' ), 'type' => 'bwf-label', 'key' => 'switch_color_label_text', 'class' => 'has-border', 'value' => '', ), 'unselect_switch_color' => array( 'label' => __( 'Circle Color (Inactive)', 'woofunnels-order-bump' ), 'type' => 'color', 'key' => 'unselect_switch_color', 'stylekey' => 'background-color', 'class' => 'bwf-field-one-half', 'selectors' => array( $bump_selector_wrapper . ' .wfob-switch + label span.sw:before', ), 'value' => 'background-color:{{value}}', ), 'select_switch_color' => array( 'label' => __( 'Circle Color (Active)', 'woofunnels-order-bump' ), 'type' => 'color', 'key' => 'select_switch_color', 'stylekey' => 'background-color', 'class' => 'bwf-field-one-half', 'selectors' => array( $bump_selector_wrapper . ' .wfob-switch:checked + label span:before', ), 'value' => 'background-color:{{value}}', ), ); $final_fields = $layout + $title + $toggle_color + $image + $content + $price + $exclusive; } else { $final_fields = $layout + $title + $image + $content + $price + $exclusive; } /** * Add Social Proof setting */ // $final_fields = $social_proof_tooltip; if ( is_array( $social_proof_tooltip ) && count( $social_proof_tooltip ) > 0 ) { $final_fields = array_merge( $final_fields, $social_proof_tooltip ); } /** * Add Slider arrow settings (Skin 12 only, empty everywhere else) */ if ( count( $slider_arrows ) > 0 ) { $final_fields = array_merge( $final_fields, $slider_arrows ); } /*---------------------------------Remove Keys from template ------------------------------------------*/ if ( $selected_layout == 'layout_3' || $selected_layout == 'layout_4' || $selected_layout == 'layout_6' || $selected_layout == 'layout_9' || $selected_layout == 'layout_10' ) { $exclude_keys[] = 'heading_background'; $exclude_keys[] = 'heading_hover_background'; $exclude_keys[] = 'header_enable_pointing_arrow'; $exclude_keys[] = 'point_animation'; $exclude_keys[] = 'heading_box_border_style'; $exclude_keys[] = 'heading_box_border_color'; $exclude_keys[] = 'heading_box_border_width'; $exclude_keys[] = 'heading_box_border_radius'; } /* The pointing arrow sits beside the checkbox of a single card. A slider skin lays its products out in a scrollable track — every card carries its own checkbox, so the arrow has nothing to single out and the skin never paints one (see is_enable_pointer()). Drop the three controls rather than leave switches that change nothing on screen. */ if ( in_array( $selected_layout, $this->get_slider_layouts(), true ) ) { $exclude_keys[] = 'header_enable_pointing_arrow'; $exclude_keys[] = 'point_animation'; $exclude_keys[] = 'point_animation_color'; } if ( $selected_layout !== 'layout_3' && $selected_layout !== 'layout_4' ) { $exclude_keys[] = 'remove_button_label_text'; $exclude_keys[] = 'remove_button_color'; $exclude_keys[] = 'remove_button_bg_color'; } if ( is_array( $exclude_keys ) && count( $exclude_keys ) > 0 ) { foreach ( $exclude_keys as $index => $unset_key ) { if ( ! isset( $final_fields[ $unset_key ] ) ) { continue; } unset( $final_fields[ $unset_key ] ); } } $this->bump_all_selectors = $final_fields; } public function get_bump_design_selectors() { return $this->bump_all_selectors; } public function get_dynamic_inline_css() { return $this->dynamic_inline_css; } public function get_wfob_bump_css() { return $this->wfob_dynamic_css; } public function override_design_data_keys( $design_data, $layout ) { if ( ! is_array( $this->override_layout_design_data ) || count( $this->override_layout_design_data ) == 0 ) { return $design_data; } $overide_keys = array(); if ( isset( $this->override_layout_design_data[ $layout ] ) ) { $overide_keys = $this->override_layout_design_data[ $layout ]; } if ( is_array( $overide_keys ) && count( $overide_keys ) > 0 ) { foreach ( $overide_keys as $k => $v ) { $design_data[ $k ] = $v; } } return $design_data; } /** * @return boolean */ public function need_to_hide( $wc_product, $cart_item_key ) { $status = ( ! empty( $cart_item_key ) && isset( $this->settings['order_bump_auto_hide'] ) && wc_string_to_bool( $this->settings['order_bump_auto_hide'] ) ); // backward compatibility $status = apply_filters( 'wfob_hide_order_bump_after_selected', $status, $this->get_id(), $cart_item_key ); return apply_filters( 'wfob_do_not_display_order_bump_product', $status, $this->get_id(), $wc_product, $cart_item_key ); } } }