Example #1
0
function wds_activate()
{
    global $wpdb;
    wds_install();
    if (!$wpdb->get_var("SELECT * FROM " . $wpdb->prefix . "wdsslider")) {
        $wpdb->insert($wpdb->prefix . 'wdsslider', array('id' => 1, 'name' => 'Default slider', 'published' => 1, 'full_width' => 0, 'width' => 800, 'height' => 300, 'bg_fit' => 'cover', 'align' => 'center', 'effect' => 'none', 'time_intervval' => 5, 'autoplay' => 1, 'shuffle' => 0, 'music' => 0, 'music_url' => '', 'preload_images' => 1, 'background_color' => '000000', 'background_transparent' => 100, 'glb_border_width' => 0, 'glb_border_style' => 'none', 'glb_border_color' => 'FFFFFF', 'glb_border_radius' => '', 'glb_margin' => 0, 'glb_box_shadow' => '', 'image_right_click' => 0, 'layer_out_next' => 1, 'prev_next_butt' => 1, 'play_paus_butt' => 0, 'navigation' => 'hover', 'rl_butt_style' => 'fa-angle', 'rl_butt_size' => 40, 'pp_butt_size' => 40, 'butts_color' => 'FFFFFF', 'butts_transparent' => 100, 'hover_color' => 'CCCCCC', 'nav_border_width' => 0, 'nav_border_style' => 'none', 'nav_border_color' => 'FFFFFF', 'nav_border_radius' => '20px', 'nav_bg_color' => 'FFFFFF', 'bull_position' => 'bottom', 'bull_style' => 'fa-square-o', 'bull_size' => 20, 'bull_color' => 'FFFFFF', 'bull_act_color' => 'FFFFFF', 'bull_margin' => 3, 'film_pos' => 'none', 'film_thumb_width' => 100, 'film_thumb_height' => 50, 'film_bg_color' => '000000', 'film_tmb_margin' => 0, 'film_act_border_width' => 0, 'film_act_border_style' => 'none', 'film_act_border_color' => 'FFFFFF', 'film_dac_transparent' => 50, 'timer_bar_type' => 'none', 'timer_bar_size' => 5, 'timer_bar_color' => 'FFFFFF', 'timer_bar_transparent' => 50, 'built_in_watermark_type' => 'none', 'built_in_watermark_position' => 'middle-center', 'built_in_watermark_size' => 15, 'built_in_watermark_url' => WD_S_URL . '/images/watermark.png', 'built_in_watermark_text' => 'web-dorado.com', 'built_in_watermark_font_size' => 20, 'built_in_watermark_font' => '', 'built_in_watermark_color' => 'FFFFFF', 'built_in_watermark_opacity' => 70, 'css' => '', 'stop_animation' => 0, 'spider_uploader' => 1, 'right_butt_url' => WD_S_URL . '/images/arrow/arrow11/1/2.png', 'left_butt_url' => WD_S_URL . '/images/arrow/arrow11/1/1.png', 'right_butt_hov_url' => WD_S_URL . '/images/arrow/arrow11/1/4.png', 'left_butt_hov_url' => WD_S_URL . '/images/arrow/arrow11/1/3.png', 'rl_butt_img_or_not' => 'style', 'bullets_img_main_url' => WD_S_URL . '/images/bullet/bullet1/1/1.png', 'bullets_img_hov_url' => WD_S_URL . '/images/bullet/bullet1/1/2.png', 'bull_butt_img_or_not' => 'style', 'play_butt_url' => WD_S_URL . '/images/button/button4/1/1.png', 'paus_butt_url' => WD_S_URL . '/images/button/button4/1/3.png', 'play_butt_hov_url' => WD_S_URL . '/images/button/button4/1/2.png', 'paus_butt_hov_url' => WD_S_URL . '/images/button/button4/1/4.png', 'play_paus_butt_img_or_not' => 'style', 'start_slide_num' => 1, 'effect_duration' => 800, 'carousel' => 0, 'carousel_image_counts' => 7, 'carousel_image_parameters' => '0.85', 'carousel_fit_containerWidth' => 0, 'carousel_width' => 1000, 'parallax_effect' => 0, 'mouse_swipe_nav' => 0, 'bull_hover' => 1, 'touch_swipe_nav' => 1, 'mouse_wheel_nav' => 0, 'keyboard_nav' => 0, 'possib_add_ffamily' => ''));
    }
    if (!$wpdb->get_var("SELECT * FROM " . $wpdb->prefix . "wdsslide")) {
        $wpdb->query('INSERT INTO `' . $wpdb->prefix . 'wdsslide` VALUES(1, 1, "Slide 1", "image", "' . WD_S_URL . '/demo/1.jpg", "' . WD_S_URL . '/demo/1-150x150.jpg", 1, "", 1, 0)');
        $wpdb->query('INSERT INTO `' . $wpdb->prefix . 'wdsslide` VALUES(2, 1, "Slide 2", "image", "' . WD_S_URL . '/demo/2.jpg", "' . WD_S_URL . '/demo/2-150x150.jpg", 1, "", 2, 0)');
        $wpdb->query('INSERT INTO `' . $wpdb->prefix . 'wdsslide` VALUES(3, 1, "Slide 3", "image", "' . WD_S_URL . '/demo/3.jpg", "' . WD_S_URL . '/demo/3-150x150.jpg", 1, "", 3, 0)');
    }
}
function wds_activate()
{
    wds_install();
}