Skip to content

Commit abcbd16

Browse files
v3.0.5
1 parent 3b25a69 commit abcbd16

11 files changed

+5013
-1187
lines changed

includes/admin/class-alg-wc-wish-list-settings-style.php

+175-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* Wish List for WooCommerce Pro - General Section Settings
44
*
5-
* @version 2.3.7
5+
* @version 3.0.5
66
* @since 1.0.0
77
* @author WPFactory.
88
*/
@@ -64,6 +64,7 @@ class Alg_WC_Wish_List_Settings_Style extends Alg_WC_Wish_List_Settings_Section
6464

6565
// Wishlist options
6666
const OPTION_STYLE_WISH_LIST_SHARE_ICON_COLOR = 'alg_wc_wl_style_wish_list_share_icon_color';
67+
const OPTION_STYLE_WISH_LIST_SHARE_ICON_COLOR_HOVER = 'alg_wc_wl_style_wish_list_share_icon_color_hover';
6768
const OPTION_STYLE_WISH_LIST_SHOW_TABLE_TITLES_DESKTOP = 'alg_wc_wl_style_wish_list_t_titles_desktop';
6869
const OPTION_STYLE_WISH_LIST_SHOW_TABLE_TITLES_MOBILE = 'alg_wc_wl_style_wish_list_t_titles_mobile';
6970
const OPTION_REMOVE_BTN_ICON_CLASS = 'alg_wc_wl_style_wish_list_remove_btn_icon_class';
@@ -78,11 +79,25 @@ class Alg_WC_Wish_List_Settings_Style extends Alg_WC_Wish_List_Settings_Section
7879
const OPTION_MULTIPLE_TAB_BG_COLOR = 'alg_wc_wl_style_wish_list_multiple_tab_bg_color';
7980
const OPTION_MULTIPLE_TAB_ACTIVE_FONT_COLOR = 'alg_wc_wl_style_wish_list_multiple_tab_active_font_color';
8081
const OPTION_MULTIPLE_TAB_ACTIVE_BG_COLOR = 'alg_wc_wl_style_wish_list_multiple_tab_active_bg_color';
82+
const OPTION_MULTIPLE_TAB_DELETE_BUTTON_COLOR = 'alg_wc_wl_style_wish_list_multiple_tab_delete_button_color';
83+
const OPTION_MULTIPLE_TAB_DELETE_BUTTON_HOVER_COLOR = 'alg_wc_wl_style_wish_list_multiple_tab_delete_button_hover_color';
8184

8285
// My account tab
8386
const OPTION_STYLE_MY_ACCOUNT_TAB_ICON_ENABLE = 'alg_wc_wl_style_my_account_tab_icon_enable';
8487
const OPTION_STYLE_MY_ACCOUNT_TAB_ICON = 'alg_wc_wl_style_my_account_tab_icon';
8588
const OPTION_STYLE_MY_ACCOUNT_TAB_ICON_ELEMENT = 'alg_wc_wl_style_my_account_tab_icon_element';
89+
90+
// Style Customization
91+
const OPTION_STYLE_CUSTOMIZED_CSS = 'alg_wc_wl_style_customized_css';
92+
93+
// Multiple Wishlist Modal Color Option
94+
const OPTION_MULTIPLE_POPUP_BG_COLOR = 'alg_wc_wl_style_popup_bg_color';
95+
const OPTION_MULTIPLE_POPUP_FONT_COLOR = 'alg_wc_wl_style_popup_font_color';
96+
const OPTION_MULTIPLE_POPUP_LIST_ITEM_COLOR = 'alg_wc_wl_style_popup_list_item_color';
97+
const OPTION_MULTIPLE_POPUP_CHECKBOX_CHECKED_COLOR = 'alg_wc_wl_style_popup_checkbox_checked_color';
98+
const OPTION_MULTIPLE_POPUP_CHECKBOX_UNCHECKED_COLOR = 'alg_wc_wl_style_popup_checkbox_unchecked_color';
99+
const OPTION_MULTIPLE_POPUP_CHECKBOX_TICK_COLOR = 'alg_wc_wl_style_popup_checkbox_tick_color';
100+
const OPTION_MULTIPLE_POPUP_BUTTON_COLOR = 'alg_wc_wl_style_popup_button_color';
86101

87102
/**
88103
* Constructor.
@@ -117,7 +132,7 @@ function get_section_priority() {
117132
/**
118133
* get_settings.
119134
*
120-
* @version 2.3.7
135+
* @version 3.0.5
121136
* @since 1.0.0
122137
*/
123138
function get_settings( $settings = null ) {
@@ -159,6 +174,17 @@ function get_settings( $settings = null ) {
159174
'data-alpha-enabled' => "true",
160175
)
161176
),
177+
array(
178+
'title' => __( 'Social icons hover colors', 'wish-list-for-woocommerce' ),
179+
'desc' => __( 'Color for social icons' ),
180+
'id' => self::OPTION_STYLE_WISH_LIST_SHARE_ICON_COLOR_HOVER,
181+
'default' => '#a0a0a0',
182+
'class' => 'color-picker',
183+
'type' => 'text',
184+
'custom_attributes' => array(
185+
'data-alpha-enabled' => "true",
186+
)
187+
),
162188
array(
163189
'type' => 'sectionend',
164190
'id' => 'alg_wc_wl_general_style_opts',
@@ -719,6 +745,103 @@ function get_settings( $settings = null ) {
719745
),
720746
);
721747

748+
$multiple_wishlist_modal_options = array(
749+
750+
// My account tab
751+
array(
752+
'title' => __( 'Multiple Wishlist Modal Color Option', 'wish-list-for-woocommerce' ),
753+
'type' => 'title',
754+
'desc' => __( 'Multiple wishlist popup', 'wish-list-for-woocommerce' ),
755+
'id' => 'alg_wc_wl_style_multiple_wishlist_popup',
756+
),
757+
array(
758+
'title' => __( 'Popup Background Color', 'wish-list-for-woocommerce' ),
759+
//'desc' => __( 'Thumb button color when an item is on wishlist. ' ),
760+
'id' => self::OPTION_MULTIPLE_POPUP_BG_COLOR,
761+
'default' => '#ffffff',
762+
'class' => 'color-picker',
763+
'type' => 'text',
764+
'custom_attributes' => array(
765+
'data-alpha-enabled' => "true",
766+
)
767+
),
768+
769+
array(
770+
'title' => __( 'Popup Font Color', 'wish-list-for-woocommerce' ),
771+
//'desc' => __( 'Thumb button color when an item is on wishlist. ' ),
772+
'id' => self::OPTION_MULTIPLE_POPUP_FONT_COLOR,
773+
'default' => '#000',
774+
'class' => 'color-picker',
775+
'type' => 'text',
776+
'custom_attributes' => array(
777+
'data-alpha-enabled' => "true",
778+
)
779+
),
780+
781+
array(
782+
'title' => __( 'Popup List Item Color', 'wish-list-for-woocommerce' ),
783+
//'desc' => __( 'Thumb button color when an item is on wishlist. ' ),
784+
'id' => self::OPTION_MULTIPLE_POPUP_LIST_ITEM_COLOR,
785+
'default' => '#eee',
786+
'class' => 'color-picker',
787+
'type' => 'text',
788+
'custom_attributes' => array(
789+
'data-alpha-enabled' => "true",
790+
)
791+
),
792+
793+
array(
794+
'title' => __( 'Checkbox checked Color', 'wish-list-for-woocommerce' ),
795+
//'desc' => __( 'Thumb button color when an item is on wishlist. ' ),
796+
'id' => self::OPTION_MULTIPLE_POPUP_CHECKBOX_CHECKED_COLOR,
797+
'default' => '#255cd2',
798+
'class' => 'color-picker',
799+
'type' => 'text',
800+
'custom_attributes' => array(
801+
'data-alpha-enabled' => "true",
802+
)
803+
),
804+
array(
805+
'title' => __( 'Checkbox unchecked Color', 'wish-list-for-woocommerce' ),
806+
//'desc' => __( 'Thumb button color when an item is on wishlist. ' ),
807+
'id' => self::OPTION_MULTIPLE_POPUP_CHECKBOX_UNCHECKED_COLOR,
808+
'default' => '#47474936',
809+
'class' => 'color-picker',
810+
'type' => 'text',
811+
'custom_attributes' => array(
812+
'data-alpha-enabled' => "true",
813+
)
814+
),
815+
816+
array(
817+
'title' => __( 'Checkbox tick Color', 'wish-list-for-woocommerce' ),
818+
//'desc' => __( 'Thumb button color when an item is on wishlist. ' ),
819+
'id' => self::OPTION_MULTIPLE_POPUP_CHECKBOX_TICK_COLOR,
820+
'default' => '#fff',
821+
'class' => 'color-picker',
822+
'type' => 'text',
823+
'custom_attributes' => array(
824+
'data-alpha-enabled' => "true",
825+
)
826+
),
827+
array(
828+
'title' => __( 'Checkbox button Color', 'wish-list-for-woocommerce' ),
829+
//'desc' => __( 'Thumb button color when an item is on wishlist. ' ),
830+
'id' => self::OPTION_MULTIPLE_POPUP_BUTTON_COLOR,
831+
'default' => '#eeeeee',
832+
'class' => 'color-picker',
833+
'type' => 'text',
834+
'custom_attributes' => array(
835+
'data-alpha-enabled' => "true",
836+
)
837+
838+
),
839+
array(
840+
'type' => 'sectionend',
841+
'id' => 'alg_wc_wl_style_multiple_wishlist_popup',
842+
),
843+
);
844+
722845

723846
$multiple_wishlist_color_opts = array(
724847
// Thumb button - back layer
@@ -777,11 +900,58 @@ function get_settings( $settings = null ) {
777900
)
778901
),
779902

903+
array(
904+
'title' => __( 'Tab Delete Button Color', 'wish-list-for-woocommerce' ),
905+
//'desc' => __( 'Thumb button color when an item is on wishlist. ' ),
906+
'id' => self::OPTION_MULTIPLE_TAB_DELETE_BUTTON_COLOR,
907+
'default' => '#DC3232',
908+
'class' => 'color-picker',
909+
'type' => 'text',
910+
'custom_attributes' => array(
911+
'data-alpha-enabled' => "true",
912+
)
913+
),
914+
915+
array(
916+
'title' => __( 'Tab Delete Button Hover Color', 'wish-list-for-woocommerce' ),
917+
//'desc' => __( 'Thumb button color when an item is on wishlist. ' ),
918+
'id' => self::OPTION_MULTIPLE_TAB_DELETE_BUTTON_HOVER_COLOR,
919+
'default' => '#DC3232',
920+
'class' => 'color-picker',
921+
'type' => 'text',
922+
'custom_attributes' => array(
923+
'data-alpha-enabled' => "true",
924+
)
925+
),
926+
780927
array(
781928
'type' => 'sectionend',
782929
'id' => 'alg_wc_wl_style_multi_wishlist_opt',
783930
),
784931
);
932+
933+
$wishlist_customized_css = array(
934+
// Customized CSS
935+
array(
936+
'title' => __( 'Style Customization', 'wish-list-for-woocommerce' ),
937+
'type' => 'title',
938+
/*'desc' => __( '', 'wish-list-for-woocommerce' ),*/
939+
'id' => 'alg_wc_wl_style_customized_css',
940+
),
941+
942+
array(
943+
'title' => __( 'Add customized css', 'wish-list-for-woocommerce' ),
944+
'desc' => __( 'Apply customized css for wishlist', 'wish-list-for-woocommerce' ),
945+
'id' => self::OPTION_STYLE_CUSTOMIZED_CSS,
946+
'type' => 'textarea',
947+
),
948+
949+
array(
950+
'type' => 'sectionend',
951+
'id' => 'alg_wc_wl_style_customized_css',
952+
),
953+
954+
);
785955

786956
return parent::get_settings( array_merge( $settings, array_merge(
787957
$style_section_opts,
@@ -793,7 +963,9 @@ function get_settings( $settings = null ) {
793963
$wish_list_table_opts,
794964
$remove_button_opts,
795965
$multiple_wishlist_color_opts,
796-
$my_account_tab_options
966+
$multiple_wishlist_modal_options,
967+
$wishlist_customized_css,
968+
$my_account_tab_options,
797969
) ) );
798970
}
799971

includes/class-alg-wc-wish-list-core.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* Wish List for WooCommerce - Core Class.
44
*
5-
* @version 3.0.4
5+
* @version 3.0.5
66
* @since 1.0.0
77
* @author WPFactory.
88
*/
@@ -21,7 +21,7 @@ final class Alg_WC_Wish_List_Core {
2121
* @var string
2222
* @since 1.0.0
2323
*/
24-
public $version = '3.0.4';
24+
public $version = '3.0.5';
2525

2626
/**
2727
* @var Alg_WC_Wish_List_Core The single instance of the class

includes/free/class-alg-wc-wish-list-customization-wish-list.php

+74-14
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* Wish List for WooCommerce Pro - Wish list customization
44
*
5-
* @version 2.2.1
5+
* @version 3.0.5
66
* @since 1.0.0
77
* @author WPFactory.
88
*/
@@ -18,22 +18,38 @@ class Alg_WC_Wish_List_Customization_Wish_List {
1818
/**
1919
* Get custom style for wish list
2020
*
21-
* @version 2.2.1
21+
* @version 3.0.5
2222
* @since 1.0.0
2323
* @return string
2424
*/
2525
public static function get_wish_list_custom_style() {
2626
// Options
27-
$icon_color = sanitize_text_field( get_option( Alg_WC_Wish_List_Settings_Style::OPTION_STYLE_WISH_LIST_SHARE_ICON_COLOR ) );
28-
$titles_desktop_enabled = get_option( Alg_WC_Wish_List_Settings_Style::OPTION_STYLE_WISH_LIST_SHOW_TABLE_TITLES_DESKTOP, 'yes' );
29-
$titles_mobile_enabled = get_option( Alg_WC_Wish_List_Settings_Style::OPTION_STYLE_WISH_LIST_SHOW_TABLE_TITLES_MOBILE, 'yes' );
30-
$titles_desktop_style = 'yes' === $titles_desktop_enabled ? '' : 'display:none !important;';
31-
$titles_mobile_style = 'yes' === $titles_mobile_enabled ? '' : 'content:none !important;';
32-
$remove_btn_icon_color = get_option( Alg_WC_Wish_List_Settings_Style::OPTION_REMOVE_BTN_ICON_COLOR, '#DC3232' );
33-
$remove_btn_hover_color = get_option( Alg_WC_Wish_List_Settings_Style::OPTION_REMOVE_BTN_ICON_COLOR_HOVER, '#DC3232' );
34-
$remove_btn_hover_size = filter_var( get_option( Alg_WC_Wish_List_Settings_Style::OPTION_REMOVE_BTN_HOVER_SIZE, 145 ), FILTER_VALIDATE_INT );
35-
$remove_btn_hover_size_converted = $remove_btn_hover_size / 100;
36-
$remove_btn_font_size = filter_var( get_option( Alg_WC_Wish_List_Settings_Style::OPTION_REMOVE_BTN_ICON_FONT_SIZE, 30 ), FILTER_VALIDATE_INT );
27+
$icon_color = sanitize_text_field( get_option( Alg_WC_Wish_List_Settings_Style::OPTION_STYLE_WISH_LIST_SHARE_ICON_COLOR ) );
28+
$icon_hover_color = sanitize_text_field( get_option( Alg_WC_Wish_List_Settings_Style::OPTION_STYLE_WISH_LIST_SHARE_ICON_COLOR_HOVER ) );
29+
$titles_desktop_enabled = get_option( Alg_WC_Wish_List_Settings_Style::OPTION_STYLE_WISH_LIST_SHOW_TABLE_TITLES_DESKTOP, 'yes' );
30+
$titles_mobile_enabled = get_option( Alg_WC_Wish_List_Settings_Style::OPTION_STYLE_WISH_LIST_SHOW_TABLE_TITLES_MOBILE, 'yes' );
31+
$titles_desktop_style = 'yes' === $titles_desktop_enabled ? '' : 'display:none !important;';
32+
$titles_mobile_style = 'yes' === $titles_mobile_enabled ? '' : 'content:none !important;';
33+
$remove_btn_icon_color = get_option( Alg_WC_Wish_List_Settings_Style::OPTION_REMOVE_BTN_ICON_COLOR, '#DC3232' );
34+
$remove_btn_hover_color = get_option( Alg_WC_Wish_List_Settings_Style::OPTION_REMOVE_BTN_ICON_COLOR_HOVER, '#DC3232' );
35+
$remove_btn_hover_size = filter_var( get_option( Alg_WC_Wish_List_Settings_Style::OPTION_REMOVE_BTN_HOVER_SIZE, 145 ), FILTER_VALIDATE_INT );
36+
$remove_btn_hover_size_converted = $remove_btn_hover_size / 100;
37+
$remove_btn_font_size = filter_var( get_option( Alg_WC_Wish_List_Settings_Style::OPTION_REMOVE_BTN_ICON_FONT_SIZE, 30 ), FILTER_VALIDATE_INT );
38+
39+
40+
$tab_delete_btn_color = sanitize_text_field( get_option( Alg_WC_Wish_List_Settings_Style::OPTION_MULTIPLE_TAB_DELETE_BUTTON_COLOR ) );
41+
$tab_delete_btn_hover_color = sanitize_text_field( get_option( Alg_WC_Wish_List_Settings_Style::OPTION_MULTIPLE_TAB_DELETE_BUTTON_HOVER_COLOR ) );
42+
43+
$popup_bg_color = sanitize_text_field( get_option( Alg_WC_Wish_List_Settings_Style::OPTION_MULTIPLE_POPUP_BG_COLOR ) );
44+
$popup_font_color = sanitize_text_field( get_option( Alg_WC_Wish_List_Settings_Style::OPTION_MULTIPLE_POPUP_FONT_COLOR ) );
45+
$popup_list_item_color = sanitize_text_field( get_option( Alg_WC_Wish_List_Settings_Style::OPTION_MULTIPLE_POPUP_LIST_ITEM_COLOR ) );
46+
$popup_checkbox_checked_color = sanitize_text_field( get_option( Alg_WC_Wish_List_Settings_Style::OPTION_MULTIPLE_POPUP_CHECKBOX_CHECKED_COLOR ) );
47+
$popup_checkbox_unchecked_color = sanitize_text_field( get_option( Alg_WC_Wish_List_Settings_Style::OPTION_MULTIPLE_POPUP_CHECKBOX_UNCHECKED_COLOR ) );
48+
$popup_checkbox_tick_color = sanitize_text_field( get_option( Alg_WC_Wish_List_Settings_Style::OPTION_MULTIPLE_POPUP_CHECKBOX_TICK_COLOR ) );
49+
$popup_btn_color = sanitize_text_field( get_option( Alg_WC_Wish_List_Settings_Style::OPTION_MULTIPLE_POPUP_BUTTON_COLOR ) );
50+
51+
52+
$customized_css = sanitize_text_field( get_option( Alg_WC_Wish_List_Settings_Style::OPTION_STYLE_CUSTOMIZED_CSS ) );
3753

3854
// style
3955
$custom_css = "
@@ -47,11 +63,55 @@ public static function get_wish_list_custom_style() {
4763
transform: translateZ(0) scale({$remove_btn_hover_size_converted}, {$remove_btn_hover_size_converted});
4864
color:{$remove_btn_hover_color} !important;
4965
}
50-
.alg-wc-wl-social-li i{
51-
color:{$icon_color} !important;
66+
.alg-wc-wl-social-li i, .alg-wc-wl-social-li a{
67+
color: {$icon_color};
5268
}
69+
.alg-wc-wl-social-li i:hover, .alg-wc-wl-social-li a:hover{
70+
color: {$icon_hover_color};
71+
}
72+
.alg-wc-wl-social-li i{
73+
pointer-events: all;
74+
}
5375
.alg-wc-wl-view-table th{{$titles_desktop_style}}
5476
.alg-wc-wl-responsive .alg-wc-wl-view-table tr td:before{{$titles_mobile_style}}
77+
.algwcwishlistmodal{
78+
background: {$popup_bg_color} !important;
79+
color: {$popup_font_color} !important;
80+
}
81+
.algwcwishlistmodal h2, .algwcwishlistmodal-checkbox-wrapper span.titlebox{
82+
color: {$popup_font_color} !important;
83+
}
84+
ul.algwc-wishlist-collections-wrapper li {
85+
border: 2px solid {$popup_list_item_color} !important;
86+
background: {$popup_list_item_color} !important;
87+
}
88+
89+
.algwcwishlistmodal-checkbox-wrapper input[type=checkbox]:checked+.cbx{
90+
background-image: linear-gradient({$popup_checkbox_checked_color}, {$popup_checkbox_checked_color}) !important;
91+
background-color: {$popup_checkbox_checked_color} !important;
92+
}
93+
94+
.algwcwishlistmodal-checkbox-wrapper .cbx{
95+
background-image: linear-gradient({$popup_checkbox_unchecked_color}, {$popup_checkbox_unchecked_color}) !important;
96+
background-color: {$popup_checkbox_unchecked_color} !important;
97+
}
98+
.algwcwishlistmodal-checkbox-wrapper .cbx svg{
99+
stroke: {$popup_checkbox_tick_color} !important;
100+
}
101+
.algwcwishlistmodal .page__btn{
102+
background-color: {$popup_btn_color} !important;
103+
border-color: {$popup_btn_color} !important;
104+
color: {$popup_font_color} !important;
105+
}
106+
.alg-wc-delete-wishlist a{
107+
background-color: {$tab_delete_btn_color} !important;
108+
}
109+
.alg-wc-delete-wishlist a:hover{
110+
background-color: {$tab_delete_btn_hover_color} !important;
111+
}
112+
113+
{$customized_css}
114+
55115
";
56116

57117
if ( 'default' !== ( $wl_table_align_mobile = get_option( 'alg_wc_wl_style_wish_list_t_alignment_mobile', 'default' ) ) ) {
8.96 KB
Binary file not shown.

0 commit comments

Comments
 (0)