Make Slidedeck responsive and touch enabled by default

August 13, 2013


// makes insterted slidedeck responsive by default
function slidedeck_filter_shortcodes($post_id) {
 $edited_post = get_post($my_postid);
 $post_content = $_POST['post_content'] ;
 $post_content = str_replace(' = $post_id;
 $post_to_filter['post_content'] = $post_content;
 // unhook this function so it doesn't loop infinitely
 remove_action('post_updated', 'hassel_filter_shortcodes');
 // update the post, which calls save_post again
 wp_update_post($post_to_filter);
 // re-hook this function
 add_action('post_updated', 'slidedeck_filter_shortcodes');
}
add_action('post_updated', 'slidedeck_filter_shortcodes');
// enables touch for slidedeck by default
 function slidedeck_after_get( $slidedeck ) {
 global $SlideDeckPlugin;
 $slidedeck['options']['touch'] = true;
 return $slidedeck;
 }
 add_filter( 'slidedeck_after_get', 'slidedeck_after_get', 10, 5 );

Tags: , , ,

Leave a Comment