/** * Widget logic * * @since 2.0 */ public function widget($args, $instance) { /** Extract arguments */ extract($args); /** Get widget title */ $title = apply_filters('widget_title', $instance['title']); /** Display widget header */ echo $before_widget; if (!empty($title)) { echo $before_title . $title . $after_title; } /** Display slideshow */ echo ESL_Slideshow::get_instance()->display_slideshow(); /** Display widget footer */ echo $after_widget; }
function easing_slider() { echo ESL_Slideshow::get_instance()->display_slideshow(); }
/** * Executes a shortcode handler * * @since 2.0 */ public function do_shortcode() { /** Get the slideshow */ $slideshow = ESL_Slideshow::get_instance()->display_slideshow(); /** Display the slideshow (or error message if it doesn't exist) */ if (is_wp_error($slideshow)) { return $slideshow->get_error_message(); } else { return trim($slideshow); } }
</a> </div> <input type="hidden" name="customizations" id="customizations" value=""> <?php /** This ensures that the JSON is encoded correctly. Using PHP JSON encode can cause magic quote issues */ ?> <script type="text/javascript">document.getElementById('customizations').value = '<?php echo addslashes(json_encode($customizations)); ?> ';</script> </form> <div id="customize-preview" class="wp-full-overlay-main" style="position: relative;"> <div style="position: absolute; top: 0; left: 0; margin: 45px; width: 100%; height: 100%;"> <script type="text/javascript"> /** Disable automatic playback */ jQuery(document).ready(function($) { setTimeout(function() { $('.easingsliderlite').data('easingsliderlite').endPlayback(); }, 1000); }); </script> <?php /** Display the slideshow */ echo ESL_Slideshow::get_instance()->display_slideshow(); ?> </div> </div> </div> </div>