/** * Add colors options to the panel. * * @return void * @access private * @since 1.0.0 */ private function _styles_options() { $colors = maybe_unserialize(get_option('yith_wcwl_frontend_css_colors')); foreach (YITH_WCWL_Init()->colors_options as $color => $attrs) { if (!isset($colors[$color])) { $colors[$color] = $attrs; } } ?> <div class="color-panel"> <div class="clear"></div> <h4><?php _e('"Add to wishlist" button', 'yit'); ?> </h4> <?php yith_frontend_css_color_picker(__('Background', 'yit'), 'yith_wcwl_color_add_to_wishlist_background', $colors['add_to_wishlist']['background']); yith_frontend_css_color_picker(__('Text', 'yit'), 'yith_wcwl_color_add_to_wishlist_color', $colors['add_to_wishlist']['color']); yith_frontend_css_color_picker(__('Border', 'yit'), 'yith_wcwl_color_add_to_wishlist_border_color', $colors['add_to_wishlist']['border_color']); ?> <div class="clear" style="height:10px;"></div> <?php // hover yith_frontend_css_color_picker(__('Background (hover)', 'yit'), 'yith_wcwl_color_add_to_wishlist_hover_background', $colors['add_to_wishlist_hover']['background']); yith_frontend_css_color_picker(__('Text (hover)', 'yit'), 'yith_wcwl_color_add_to_wishlist_hover_color', $colors['add_to_wishlist_hover']['color']); yith_frontend_css_color_picker(__('Border (hover)', 'yit'), 'yith_wcwl_color_add_to_wishlist_hover_border_color', $colors['add_to_wishlist_hover']['border_color']); ?> <div class="clear" style="height:30px;"></div> <h4><?php _e('"Add to Cart" button', 'yit'); ?> </h4> <?php yith_frontend_css_color_picker(__('Background', 'yit'), 'yith_wcwl_color_add_to_cart_background', $colors['add_to_cart']['background']); yith_frontend_css_color_picker(__('Text', 'yit'), 'yith_wcwl_color_add_to_cart_color', $colors['add_to_cart']['color']); yith_frontend_css_color_picker(__('Border', 'yit'), 'yith_wcwl_color_add_to_cart_border_color', $colors['add_to_cart']['border_color']); ?> <div class="clear" style="height:10px;"></div> <?php // hover yith_frontend_css_color_picker(__('Background (hover)', 'yit'), 'yith_wcwl_color_add_to_cart_hover_background', $colors['add_to_cart_hover']['background']); yith_frontend_css_color_picker(__('Text (hover)', 'yit'), 'yith_wcwl_color_add_to_cart_hover_color', $colors['add_to_cart_hover']['color']); yith_frontend_css_color_picker(__('Border (hover)', 'yit'), 'yith_wcwl_color_add_to_cart_hover_border_color', $colors['add_to_cart_hover']['border_color']); ?> <div class="clear" style="height:30px;"></div> <h4><?php _e('"Style 1" button', 'yit'); ?> </h4> <?php yith_frontend_css_color_picker(__('Background', 'yit'), 'yith_wcwl_color_button_style_1_background', $colors['button_style_1']['background']); yith_frontend_css_color_picker(__('Text', 'yit'), 'yith_wcwl_color_button_style_1_color', $colors['button_style_1']['color']); yith_frontend_css_color_picker(__('Border', 'yit'), 'yith_wcwl_color_button_style_1_border_color', $colors['button_style_1']['border_color']); ?> <div class="clear" style="height:10px;"></div> <?php // hover yith_frontend_css_color_picker(__('Background (hover)', 'yit'), 'yith_wcwl_color_button_style_1_hover_background', $colors['button_style_1_hover']['background']); yith_frontend_css_color_picker(__('Text (hover)', 'yit'), 'yith_wcwl_color_button_style_1_hover_color', $colors['button_style_1_hover']['color']); yith_frontend_css_color_picker(__('Border (hover)', 'yit'), 'yith_wcwl_color_button_style_1_hover_border_color', $colors['button_style_1_hover']['border_color']); ?> <div class="clear" style="height:30px;"></div> <h4><?php _e('"Style 2" button', 'yit'); ?> </h4> <?php yith_frontend_css_color_picker(__('Background', 'yit'), 'yith_wcwl_color_button_style_2_background', $colors['button_style_2']['background']); yith_frontend_css_color_picker(__('Text', 'yit'), 'yith_wcwl_color_button_style_2_color', $colors['button_style_2']['color']); yith_frontend_css_color_picker(__('Border', 'yit'), 'yith_wcwl_color_button_style_2_border_color', $colors['button_style_2']['border_color']); ?> <div class="clear" style="height:10px;"></div> <?php // hover yith_frontend_css_color_picker(__('Background (hover)', 'yit'), 'yith_wcwl_color_button_style_2_hover_background', $colors['button_style_2_hover']['background']); yith_frontend_css_color_picker(__('Text (hover)', 'yit'), 'yith_wcwl_color_button_style_2_hover_color', $colors['button_style_2_hover']['color']); yith_frontend_css_color_picker(__('Border (hover)', 'yit'), 'yith_wcwl_color_button_style_2_hover_border_color', $colors['button_style_2_hover']['border_color']); ?> <div class="clear" style="height:30px;"></div> <h4><?php _e('Wishlist table', 'yit'); ?> </h4> <?php yith_frontend_css_color_picker(__('Background', 'yit'), 'yith_wcwl_color_wishlist_table_background', $colors['wishlist_table']['background']); yith_frontend_css_color_picker(__('Text', 'yit'), 'yith_wcwl_color_wishlist_table_color', $colors['wishlist_table']['color']); yith_frontend_css_color_picker(__('Border', 'yit'), 'yith_wcwl_color_wishlist_table_border_color', $colors['wishlist_table']['border_color']); ?> <div class="clear" style="height:30px;"></div> <h4><?php _e('Headers', 'yit'); ?> </h4> <?php yith_frontend_css_color_picker(__('Background color', 'yit'), 'yith_wcwl_color_headers_background', $colors['headers']['background']); do_action('yith_wcwl_admin_color_pickers'); ?> <div class="clear"></div> </div> <div class="clear" style="height:30px;"></div> <?php }
/** * Add colors options to the panel. * * @return void * @access private * @since 1.0.0 */ private function _styles_options() { $colors = maybe_unserialize(get_option('yith_wcwl_frontend_css_colors')); foreach ($this->colors_options as $color => $attrs) { if (!isset($colors[$color])) { $colors[$color] = $attrs; } } ?> <div class="clear"></div><?php yith_frontend_css_color_picker(__('"Add to Wishlist" button background', 'yit'), 'yith_wcwl_color_add_to_wishlist_background', $colors['add_to_wishlist']['background']); yith_frontend_css_color_picker(__('"Add to Wishlist" button text', 'yit'), 'yith_wcwl_color_add_to_wishlist_color', $colors['add_to_wishlist']['color']); yith_frontend_css_color_picker(__('"Add to Wishlist" button border', 'yit'), 'yith_wcwl_color_add_to_wishlist_border_color', $colors['add_to_wishlist']['border_color']); ?> <div class="clear" style="height:10px;"></div><?php // hover yith_frontend_css_color_picker(__('"Add to Wishlist" button background (hover)', 'yit'), 'yith_wcwl_color_add_to_wishlist_hover_background', $colors['add_to_wishlist_hover']['background']); yith_frontend_css_color_picker(__('"Add to Wishlist" button text (hover)', 'yit'), 'yith_wcwl_color_add_to_wishlist_hover_color', $colors['add_to_wishlist_hover']['color']); yith_frontend_css_color_picker(__('"Add to Wishlist" button border (hover)', 'yit'), 'yith_wcwl_color_add_to_wishlist_hover_border_color', $colors['add_to_wishlist_hover']['border_color']); ?> <div class="clear" style="height:30px;"></div><?php yith_frontend_css_color_picker(__('"Add to Cart" button background', 'yit'), 'yith_wcwl_color_add_to_cart_background', $colors['add_to_cart']['background']); yith_frontend_css_color_picker(__('"Add to Cart" button text', 'yit'), 'yith_wcwl_color_add_to_cart_color', $colors['add_to_cart']['color']); yith_frontend_css_color_picker(__('"Add to Cart" button border', 'yit'), 'yith_wcwl_color_add_to_cart_border_color', $colors['add_to_cart']['border_color']); ?> <div class="clear" style="height:10px;"></div><?php // hover yith_frontend_css_color_picker(__('"Add to Cart" button background (hover)', 'yit'), 'yith_wcwl_color_add_to_cart_hover_background', $colors['add_to_cart_hover']['background']); yith_frontend_css_color_picker(__('"Add to Cart" button text (hover)', 'yit'), 'yith_wcwl_color_add_to_cart_hover_color', $colors['add_to_cart_hover']['color']); yith_frontend_css_color_picker(__('"Add to Cart" button border (hover)', 'yit'), 'yith_wcwl_color_add_to_cart_hover_border_color', $colors['add_to_cart_hover']['border_color']); ?> <div class="clear" style="height:30px;"></div><?php yith_frontend_css_color_picker(__('Wishlist table background', 'yit'), 'yith_wcwl_color_wishlist_table_background', $colors['wishlist_table']['background']); yith_frontend_css_color_picker(__('Wishlist table text', 'yit'), 'yith_wcwl_color_wishlist_table_color', $colors['wishlist_table']['color']); yith_frontend_css_color_picker(__('Wishlist table border', 'yit'), 'yith_wcwl_color_wishlist_table_border_color', $colors['wishlist_table']['border_color']); do_action('yith_wcwl_admin_color_pickers'); ?> <div class="clear"></div> <script type="text/javascript"> jQuery( 'input#yith_wcwl_frontend_css' ).on( 'change', function() { if( jQuery( this ).is( ':checked' ) ) { jQuery( '#yith_wcwl_styles_colors' ).hide(); jQuery( '#yith_wcwl_rounded_corners' ).parents( 'tr' ).hide(); jQuery( '#yith_wcwl_add_to_wishlist_icon' ).parents( 'tr' ).hide(); jQuery( '#yith_wcwl_add_to_cart_icon' ).parents( 'tr' ).hide(); } else { jQuery( '#yith_wcwl_styles_colors' ).show(); if( jQuery( '#yith_wcwl_use_button' ).is( ':checked' ) ) { jQuery( '#yith_wcwl_rounded_corners' ).parents( 'tr' ).show(); jQuery( '#yith_wcwl_add_to_wishlist_icon' ).parents( 'tr' ).show(); jQuery( '#yith_wcwl_add_to_cart_icon' ).parents( 'tr' ).show(); } } }).change(); jQuery( 'input#yith_wcwl_use_button' ).on( 'change', function() { if( jQuery( this ).is( ':checked' ) && !jQuery( '#yith_wcwl_frontend_css' ).is( ':checked' ) ) { jQuery( '#yith_wcwl_rounded_corners' ).parents( 'tr' ).show(); jQuery( '#yith_wcwl_add_to_wishlist_icon' ).parents( 'tr' ).show(); jQuery( '#yith_wcwl_add_to_cart_icon' ).parents( 'tr' ).show(); } else { jQuery( '#yith_wcwl_rounded_corners' ).parents( 'tr' ).hide(); jQuery( '#yith_wcwl_add_to_wishlist_icon' ).parents( 'tr' ).hide(); jQuery( '#yith_wcwl_add_to_cart_icon' ).parents( 'tr' ).hide(); } }).change(); </script> <?php }
/** * Add colors options to the panel. * * @return void * @access private * @since 1.0.0 */ private function _styles_options() { $colors = maybe_unserialize(get_option('yith_wcwl_frontend_css_colors')); foreach (YITH_WCWL_Init()->colors_options as $color => $attrs) { if (!isset($colors[$color])) { $colors[$color] = $attrs; } } ?> <div class="color-panel"> <div class="clear"></div> <h4><?php _e('"Add to wishlist" button', 'yit'); ?> </h4> <?php yith_frontend_css_color_picker(__('Background', 'yit'), 'yith_wcwl_color_add_to_wishlist_background', $colors['add_to_wishlist']['background']); yith_frontend_css_color_picker(__('Text', 'yit'), 'yith_wcwl_color_add_to_wishlist_color', $colors['add_to_wishlist']['color']); yith_frontend_css_color_picker(__('Border', 'yit'), 'yith_wcwl_color_add_to_wishlist_border_color', $colors['add_to_wishlist']['border_color']); ?> <div class="clear" style="height:10px;"></div> <?php // hover yith_frontend_css_color_picker(__('Background (hover)', 'yit'), 'yith_wcwl_color_add_to_wishlist_hover_background', $colors['add_to_wishlist_hover']['background']); yith_frontend_css_color_picker(__('Text (hover)', 'yit'), 'yith_wcwl_color_add_to_wishlist_hover_color', $colors['add_to_wishlist_hover']['color']); yith_frontend_css_color_picker(__('Border (hover)', 'yit'), 'yith_wcwl_color_add_to_wishlist_hover_border_color', $colors['add_to_wishlist_hover']['border_color']); ?> <div class="clear" style="height:30px;"></div> <h4><?php _e('"Add to Cart" button', 'yit'); ?> </h4> <?php yith_frontend_css_color_picker(__('Background', 'yit'), 'yith_wcwl_color_add_to_cart_background', $colors['add_to_cart']['background']); yith_frontend_css_color_picker(__('Text', 'yit'), 'yith_wcwl_color_add_to_cart_color', $colors['add_to_cart']['color']); yith_frontend_css_color_picker(__('Border', 'yit'), 'yith_wcwl_color_add_to_cart_border_color', $colors['add_to_cart']['border_color']); ?> <div class="clear" style="height:10px;"></div> <?php // hover yith_frontend_css_color_picker(__('Background (hover)', 'yit'), 'yith_wcwl_color_add_to_cart_hover_background', $colors['add_to_cart_hover']['background']); yith_frontend_css_color_picker(__('Text (hover)', 'yit'), 'yith_wcwl_color_add_to_cart_hover_color', $colors['add_to_cart_hover']['color']); yith_frontend_css_color_picker(__('Border (hover)', 'yit'), 'yith_wcwl_color_add_to_cart_hover_border_color', $colors['add_to_cart_hover']['border_color']); ?> <div class="clear" style="height:30px;"></div> <h4><?php _e('"Style 1" button', 'yit'); ?> </h4> <?php yith_frontend_css_color_picker(__('Background', 'yit'), 'yith_wcwl_color_button_style_1_background', $colors['button_style_1']['background']); yith_frontend_css_color_picker(__('Text', 'yit'), 'yith_wcwl_color_button_style_1_color', $colors['button_style_1']['color']); yith_frontend_css_color_picker(__('Border', 'yit'), 'yith_wcwl_color_button_style_1_border_color', $colors['button_style_1']['border_color']); ?> <div class="clear" style="height:10px;"></div> <?php // hover yith_frontend_css_color_picker(__('Background (hover)', 'yit'), 'yith_wcwl_color_button_style_1_hover_background', $colors['button_style_1_hover']['background']); yith_frontend_css_color_picker(__('Text (hover)', 'yit'), 'yith_wcwl_color_button_style_1_hover_color', $colors['button_style_1_hover']['color']); yith_frontend_css_color_picker(__('Border (hover)', 'yit'), 'yith_wcwl_color_button_style_1_hover_border_color', $colors['button_style_1_hover']['border_color']); ?> <div class="clear" style="height:30px;"></div> <h4><?php _e('"Style 2" button', 'yit'); ?> </h4> <?php yith_frontend_css_color_picker(__('Background', 'yit'), 'yith_wcwl_color_button_style_2_background', $colors['button_style_2']['background']); yith_frontend_css_color_picker(__('Text', 'yit'), 'yith_wcwl_color_button_style_2_color', $colors['button_style_2']['color']); yith_frontend_css_color_picker(__('Border', 'yit'), 'yith_wcwl_color_button_style_2_border_color', $colors['button_style_2']['border_color']); ?> <div class="clear" style="height:10px;"></div> <?php // hover yith_frontend_css_color_picker(__('Background (hover)', 'yit'), 'yith_wcwl_color_button_style_2_hover_background', $colors['button_style_2_hover']['background']); yith_frontend_css_color_picker(__('Text (hover)', 'yit'), 'yith_wcwl_color_button_style_2_hover_color', $colors['button_style_2_hover']['color']); yith_frontend_css_color_picker(__('Border (hover)', 'yit'), 'yith_wcwl_color_button_style_2_hover_border_color', $colors['button_style_2_hover']['border_color']); ?> <div class="clear" style="height:30px;"></div> <h4><?php _e('Wishlist table', 'yit'); ?> </h4> <?php yith_frontend_css_color_picker(__('Background', 'yit'), 'yith_wcwl_color_wishlist_table_background', $colors['wishlist_table']['background']); yith_frontend_css_color_picker(__('Text', 'yit'), 'yith_wcwl_color_wishlist_table_color', $colors['wishlist_table']['color']); yith_frontend_css_color_picker(__('Border', 'yit'), 'yith_wcwl_color_wishlist_table_border_color', $colors['wishlist_table']['border_color']); ?> <div class="clear" style="height:30px;"></div> <h4><?php _e('Headers', 'yit'); ?> </h4> <?php yith_frontend_css_color_picker(__('Background color', 'yit'), 'yith_wcwl_color_headers_background', $colors['headers']['background']); do_action('yith_wcwl_admin_color_pickers'); ?> <div class="clear"></div> </div> <div class="clear" style="height:30px;"></div> <script type="text/javascript"> jQuery('input#yith_wcwl_frontend_css').on('change',function () { if (jQuery(this).is(':checked')) { jQuery('#yith_wcwl_styles_colors').hide(); jQuery('#yith_wcwl_rounded_corners').parents('tr').hide(); jQuery('#yith_wcwl_add_to_wishlist_icon').parents('tr').hide(); jQuery('#yith_wcwl_add_to_cart_icon').parents('tr').hide(); } else { jQuery('#yith_wcwl_styles_colors').show(); if (jQuery('#yith_wcwl_use_button').is(':checked')) { jQuery('#yith_wcwl_rounded_corners').parents('tr').show(); jQuery('#yith_wcwl_add_to_wishlist_icon').parents('tr').show(); jQuery('#yith_wcwl_add_to_cart_icon').parents('tr').show(); } } }).change(); jQuery('input#yith_wcwl_use_button').on('change',function () { if (jQuery(this).is(':checked') && !jQuery('#yith_wcwl_frontend_css').is(':checked')) { jQuery('#yith_wcwl_rounded_corners').parents('tr').show(); jQuery('#yith_wcwl_add_to_wishlist_icon').parents('tr').show(); jQuery('#yith_wcwl_add_to_cart_icon').parents('tr').show(); } else { jQuery('#yith_wcwl_rounded_corners').parents('tr').hide(); jQuery('#yith_wcwl_add_to_wishlist_icon').parents('tr').hide(); jQuery('#yith_wcwl_add_to_cart_icon').parents('tr').hide(); } }).change(); jQuery('#yith_wcwl_multi_wishlist_enable').on('change', function () { if (jQuery(this).is(':checked')) { jQuery('#yith_wcwl_wishlist_create_title').parents('tr').show(); jQuery('#yith_wcwl_wishlist_manage_title').parents('tr').show(); } else{ jQuery('#yith_wcwl_wishlist_create_title').parents('tr').hide(); jQuery('#yith_wcwl_wishlist_manage_title').parents('tr').hide(); } }).change(); </script> <?php }