$fval){ if(is_array($fval)){ $update_data[$fkey] = array_map('advpsSanit',$fval); } else { $update_data[$fkey] = sanitize_text_field($fval); } } $update_data = serialize($update_data); //$q_upd = "update ".$wpdb->prefix."advps_optionset set opt_data = '".$update_data ."' where id =".$optID; $q_upd = $wpdb->prepare("update ".$wpdb->prefix."advps_optionset set opt_data = '%s' where id = %d",$update_data,$optID); if($wpdb->query($q_upd)){ $stsMgs = "Updated successfully."; } } elseif($_POST['advps_submit'] == 'Add'){ if ( !isset($_POST['advps_wpnonce']) || !wp_verify_nonce($_POST['advps_wpnonce'],'advps-checkauthnonce') ) { print 'Sorry, your nonce did not verify.'; exit; } $all_field = $_POST; $tem_list = array('one','two','three'); $template = sanitize_text_field($_POST['template']); if( ! in_array( $template, $tem_list )){ exit; } unset($all_field['template']); unset($all_field['advps_submit']); unset($all_field['advps_wpnonce']); unset($all_field['_wp_http_referer']); $postdata = array(); foreach($all_field as $fkey => $fval){ if(is_array($fval)){ $postdata[$fkey] = array_map('advpsSanit',$fval); } else { $postdata[$fkey] = sanitize_text_field($fval); } } $postdata = serialize($postdata); $q_add = $wpdb->prepare("insert into ".$wpdb->prefix."advps_optionset (template,opt_data) values(%s,%s)",$template,$postdata); if($wpdb->query($q_add)){ $stsMgs = "Added successfully."; } } } if(isset($_POST['advps_add_thumb'])){ if($_POST['advps_add_thumb'] == 'Add'){ if ( !isset($_POST['advps_wpnonce']) || !wp_verify_nonce($_POST['advps_wpnonce'],'advps-checkauthnonce') ) { print 'Sorry, your nonce did not verify.'; exit; } $thumb_name = sanitize_text_field($_POST['advps_thumb_name']); $width = sanitize_text_field($_POST['advps_thumb_width']); $height = sanitize_text_field($_POST['advps_thumb_height']); $crop = sanitize_text_field($_POST['advps_crop']); $q = $wpdb->prepare("insert into ".$wpdb->prefix."advps_thumbnail (thumb_name,width,height,crop) values(%s,%d,%d,%s)",$thumb_name,$width,$height,$crop); if($wpdb->query($q)){ $stsMgs = "Added successfully."; } } } if(isset($_POST['update_thumb'])){ if ( !isset($_POST['advps_wpnonce']) || !wp_verify_nonce($_POST['advps_wpnonce'],'advps-checkauthnonce') ) { print 'Sorry, your nonce did not verify.'; exit; } $thumb_id = sanitize_text_field($_POST['thumb_id']); $thumb_name = sanitize_text_field($_POST['advps_thumb_name']); $width = sanitize_text_field($_POST['advps_thumb_width']); $height = sanitize_text_field($_POST['advps_thumb_height']); $crop = sanitize_text_field($_POST['advps_crop']); $q = $wpdb->prepare("update ".$wpdb->prefix."advps_thumbnail set thumb_name = '%s',width = %d, height = %d, crop = '%s' where id = %d",$thumb_name,$width,$height,$crop,$thumb_id); if($wpdb->query($q)){ $stsMgs = "Updated successfully."; } } $q1 = "select id,opt_data from ".$wpdb->prefix."advps_optionset where template = 'one'"; $q2 = "select id,opt_data from ".$wpdb->prefix."advps_optionset where template = 'two'"; $q3 = "select id,opt_data from ".$wpdb->prefix."advps_optionset where template = 'three'"; $res1 = $wpdb->get_results($q1); $res2 = $wpdb->get_results($q2); $res3 = $wpdb->get_results($q3); $q_thumb = "select * from ".$wpdb->prefix."advps_thumbnail"; $res_thumb = $wpdb->get_results($q_thumb); $catList = get_categories(); $customPostTypes = get_post_types(array('public' => true, '_builtin' => false)); ?>

opt_data);?>

Option Set

ID = id;?>
Query
Post Type
Category [ * You can select multiple category ]
Max. Number of post
Exclude [ Ex. 1,5,10 Comma separated post IDs that need to exclude from slideshow ]
Order by
Order
Effects
Effect
Timeout [ 0 to disable auto advance.]
Easing
Speed
Enable pause on hover
Container & Thumbnail
Select Thumbnail
Default image url [ N.B. If any post doesn't have featured image then default image will be shown.]
Slide Container Width  px   Height  px
Padding px    px   px   px  
Background Color
Border px      
Remove Border
Box Shadow px    px   px  
Remove Shadow
Title & Excerpt
Overlay size Width  %   Height  %
Overlay color
Overlay opacity  [ 0 - 1 ]
Text opacity  [ 0 - 1 ]
Title tag
Title font Color
Title hover Color
Title font size px
Excerpt font color
Excerpt font size px
Excerpt length  words
Excerpt visibility
Excerpt Position
Enable/Disable link
link type [ N.B. For custom link create a custom field with name 'advps_custom_link' ]
link target
Navigation
Exclude pager
Pager type Number > Bullet >
Pager position Right  px   Bottom  px
Exclude Next/Previous
Exclude Play/Pause


Add new option set

Query
Post Type
Category [ * You can select multiple category ]
Max. Number of post
Exclude [ Ex. 1,5,10 Comma separated post IDs that need to exclude from slideshow ]
Order by
Order
Effects
Effect
Timeout [ 0 to disable auto advance.]
Easing
Speed
Enable pause on hover
Container & Thumbnail
Select Thumbnail
Default image url [ N.B. If any post doesn't have featured image then default image will be shown.]
Slide Container Width  px   Height  px
Padding px    px   px   px  
Background Color
Border px      
Remove Border
Box Shadow px    px   px  
Remove Shadow
Title & Excerpt
Overlay size Width  %   Height  %
Overlay color
Overlay opacity  [ 0 - 1 ]
Text opacity  [ 0 - 1 ]
Title tag
Title font Color
Title hover Color
Title font size px
Excerpt font color
Excerpt font size px
Excerpt length  words
Excerpt visibility
Excerpt Position
Enable/Disable link
link type [ N.B. For custom link create a custom field with name 'advps_custom_link' ]
link target
Navigation
Exclude pager
Pager type Number Bullet
Pager position Right  px   Bottom  px
Exclude Next/Previous
Exclude Play/Pause

opt_data);?>

Option Set

ID = id;?>
Query
Post Type
Category [ * You can select multiple category ]
Max. Number of post [ * Maximum Slides]
Post per Slide
Exclude [ Ex. 1,5,10 Comma separated post IDs that need to exclude from slideshow ]
Order by
Order
Effects
Effect
Timeout [ 0 to disable auto advance.]
Easing
Speed
Enable pause on hover
Container & Thumbnail
Select Thumbnail
Slide Container Width  px   Height  px
Padding px    px   px   px  
Background Color
Border px      
Remove Border
Box Shadow px    px   px  
Remove Shadow
Image Orientation [ * Skip this if you want to show single image per slide.]
Margin between Images px   [ * Skip this if you want to show single image per slide.]
Enable/Disable link
link type [ N.B. For custom link create a custom field with name 'advps_custom_link' ]
link target
Navigation
Exclude pager
Pager type Number > Bullet >
Pager position Right  px   Bottom  px
Exclude Next/Previous
Exclude Play/Pause


Add new option set

Query
Post Type
Category [ * You can select multiple category ]
Max. Number of post
Post per Slide
Exclude [ Ex. 1,5,10 Comma separated post IDs that need to exclude from slideshow ]
Order by
Order
Effects
Effect
Timeout [ 0 to disable auto advance.]
Easing
Speed
Enable pause on hover
Container & Thumbnail
Select Thumbnail
Slide Container Width  px   Height  px
Padding px    px   px   px  
Background Color
Border px      
Remove Border
Box Shadow px    px   px  
Remove Shadow
Image Orientation [ * Skip this if you want to show single image per slide.]
Margin between Images px   [ * Skip this if you want to show single image per slide.]
Enable/Disable link
link type [ N.B. For custom link create a custom field with name 'advps_custom_link' ]
link target
Navigation
Exclude pager
Pager type Number Bullet
Pager position Right  px   Bottom  px
Exclude Next/Previous
Exclude Play/Pause

opt_data)?>

Option Set

ID = id;?>
Query
Post Type
Category [ * You can select multiple category ]
Max. Number of post
Exclude [ Ex. 1,5,10 Comma separated post IDs that need to exclude from slideshow ]
Order by
Order
Effects
Effect
Timeout [ 0 to disable auto advance.]
Easing
Speed
Enable pause on hover
Content
Show on slide [ * You can select multiple ]
Select Thumbnail
Slide Container Width  px   Height  px
Padding px    px   px   px  
Background Color
Border px      
Remove Border
Box Shadow px    px   px  
Remove Shadow
Content width px
Title tag
Title font Color
Title hover Color
Title font size px
Excerpt/Content font color
Excerpt/Content font size px
Excerpt length  words
Enable/Disable link
link type [ N.B. For custom link create a custom field with name 'advps_custom_link' ]
link target
Navigation
Exclude pager
Pager type Number > Bullet >
Pager position Right  px   Bottom  px
Exclude Next/Previous
Exclude Play/Pause


Add new option set

Query
Post Type
Category [ * You can select multiple category ]
Max. Number of post
Exclude [ Ex. 1,5,10 Comma separated post IDs that need to exclude from slideshow ]
Order by
Order
Effects
Effect
Timeout [ 0 to disable auto advance.]
Easing
Speed
Enable pause on hover
Content
Show on slide [ * You can select multiple ]
Select Thumbnail
Slide Container Width  px   Height  px
Padding px    px   px   px  
Background Color
Border px      
Remove Border
Box Shadow px    px   px  
Remove Shadow
Content width px
Title tag
Title font Color
Title hover Color
Title font size px
Excerpt/Content font color
Excerpt/Content font size px
Excerpt length  words
Enable/Disable link
link type [ N.B. For custom link create a custom field with name 'advps_custom_link' ]
link target
Navigation
Exclude pager
Pager type Number Bullet
Pager position Right  px   Bottom  px
Exclude Next/Previous
Exclude Play/Pause

Thumbnail settings

Name  Width  px   Height  px Crop 

Add thumbnail

Name  Width  px   Height  px Crop