PluginProbe
Slider Ultimate / 2.2.1
Slider Ultimate v2.2.1
2.2.10 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.19 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.2 All 54 releases
ultimate-slider / includes / BackwardsCompatibility.class.php
BackwardsCompatibility.class.php
80 lines 4.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) exit;
3
4 if ( ! class_exists( 'ewdusBackwardsCompatibility' ) ) {
5 /**
6 * Class to handle transforming the plugin settings from the
7 * previous style (individual options) to the new one (options array)
8 *
9 * @since 2.0.0
10 */
11 class ewdusBackwardsCompatibility {
12
13 public function __construct() {
14
15 if ( empty( get_option( 'ewd-us-settings' ) ) and get_option( 'EWD_US_Full_Version' ) ) { $this->run_backwards_compat(); }
16 }
17
18 public function run_backwards_compat() {
19
20 $settings = array(
21 'custom-css' => get_option( 'EWD_US_Custom_CSS' ),
22 'autoplay-slideshow' => get_option( 'EWD_US_Autoplay_Slideshow' ) == 'Yes' ? true : false,
23 'autoplay-delay' => get_option( 'EWD_US_Autoplay_Delay' ) . '_undefined',
24 'autoplay-interval' => get_option( 'EWD_US_Autoplay_Interval' ) . '_undefined',
25 'autoplay-pause-hover' => get_option( 'EWD_US_Autoplay_Pause_Hover' ) == 'Yes' ? true : false,
26 'transition-time' => get_option( 'EWD_US_Transition_Time' ) . '_undefined',
27 'aspect-ratio' => get_option( 'EWD_US_Aspect_Ratio' ),
28 'carousel' => get_option( 'EWD_US_Carousel' ) == 'Yes' ? true : false,
29 'carousel-columns' => get_option( 'EWD_US_Carousel_Columns' ),
30 'carousel-link-to-full' => get_option( 'EWD_US_Carousel_Link_To_Full' ) == 'Yes' ? true : false,
31 'carousel-advance' => strtolower( get_option( 'EWD_US_Carousel_Advance' ) ),
32 'show-tinymce' => get_option( 'EWD_US_Show_TinyMCE' ) == 'Yes' ? true : false,
33 'timer-bar' => strtolower( get_option( 'EWD_US_Timer_Bar' ) ),
34 'slide-indicators' => strtolower( get_option( 'EWD_US_Slide_Indicators' ) ),
35 'link-action' => strtolower( get_option( 'EWD_US_Link_Action' ) ),
36 'slide-transition-effect' => get_option( 'EWD_US_Slide_Transition_Effect' ),
37 'wc-product-image-slider' => get_option( 'EWD_US_WC_Product_Image_Slider' ) == 'Yes' ? true : false,
38 'mobile-aspect-ratio' => get_option( 'EWD_US_Mobile_Aspect_Ratio' ),
39 'hide-from-slider' => get_option( 'EWD_US_Hide_From_Slider' ) ? get_option( 'EWD_US_Hide_From_Slider' ) : array(),
40 'hide-on-mobile' => get_option( 'EWD_US_Hide_On_Mobile' ) ? get_option( 'EWD_US_Hide_On_Mobile' ) : array(),
41 'mobile-link-to-full' => get_option( 'EWD_US_Mobile_Link_To_Full' ) == 'Yes' ? true : false,
42 'title-animate' => strtolower( get_option( 'EWD_US_Title_Animate' ) ),
43 'force-full-width' => get_option( 'EWD_US_Force_Full_Width' ) == 'Yes' ? true : false,
44 'add-watermark' => get_option( 'EWD_US_Add_Watermark' ) == 'Yes' ? true : false,
45 'lightbox' => get_option( 'EWD_US_Lightbox' ) == 'Yes' ? true : false,
46 'styling-slide-title-font' => get_option( 'EWD_us_Slide_Title_Font' ),
47 'styling-slide-title-font-size' => get_option( 'EWD_us_Slide_Title_Font_Size' ),
48 'styling-slide-title-font-color' => get_option( 'EWD_us_Slide_Title_Font_Color' ),
49 'styling-slide-text-font' => get_option( 'EWD_us_Slide_Text_Font' ),
50 'styling-slide-text-font-size' => get_option( 'EWD_us_Slide_Text_Font_Size' ),
51 'styling-slide-text-font-color' => get_option( 'EWD_us_Slide_Text_Font_Color' ),
52 'styling-button-font' => get_option( 'EWD_us_Button_Font' ),
53 'styling-button-font-size' => get_option( 'EWD_us_Button_Font_Size' ),
54 'styling-button-background-color' => get_option( 'EWD_us_Button_Background_Color' ),
55 'styling-button-border-color' => get_option( 'EWD_us_Button_Border_Color' ),
56 'styling-button-text-color' => get_option( 'EWD_us_Button_Text_Color' ),
57 'styling-button-background-hover-color' => get_option( 'EWD_us_Button_Background_Hover_Color' ),
58 'styling-button-border-hover-color' => get_option( 'EWD_us_Button_Border_Hover_Color' ),
59 'styling-button-text-hover-color' => get_option( 'EWD_us_Button_Text_Hover_Color' ),
60 'arrow' => get_option( 'EWD_us_Arrow' ) ? get_option( 'EWD_us_Arrow' ) : 'a',
61 'arrow-background-shape' => strtolower( get_option( 'EWD_us_Arrow_Background_Shape' ) ),
62 'styling-arrow-color' => get_option( 'EWD_us_Arrow_Color' ),
63 'styling-arrow-font-size' => get_option( 'EWD_us_Arrow_Font_Size' ),
64 'styling-arrow-background-color' => get_option( 'EWD_us_Arrow_Background_Color' ),
65 'styling-arrow-background-size' => get_option( 'EWD_us_Arrow_Background_Size' ),
66 'styling-clickable-area-background-color' => get_option( 'EWD_us_Clickable_Area_Background_Color' ),
67 'styling-clickable-area-size' => get_option( 'EWD_us_Clickable_Area_Size' ),
68 'styling-arrow-line-height' => get_option( 'EWD_us_Arrow_Line_Height' )
69 );
70
71 add_option( 'ewd-us-review-ask-time', get_option( 'EWD_US_Ask_Review_Date' ) );
72 add_option( 'ewd-us-installation-time', get_option( 'EWD_US_Install_Time' ) );
73
74 update_option( 'ewd-us-permission-level', get_option( 'EWD_US_Full_Version' ) == 'Yes' ? 2 : 1 );
75
76 update_option( 'ewd-us-settings', $settings );
77 }
78 }
79
80 }