/** * Callback for displaying the default slider UI. * * @since 1.0.0 * * @param object $post The current post object. */ public function do_default_display($post) { // Output the custom media upload form. Soliloquy_Media::get_instance()->media_upload_form(); // Prepare output data. $slider_data = get_post_meta($post->ID, '_sol_slider_data', true); ?> <ul id="soliloquy-output" class="soliloquy-clear"> <?php if (!empty($slider_data['slider'])) { ?> <?php foreach ($slider_data['slider'] as $id => $data) { ?> <?php echo $this->get_slider_item($id, $data, !empty($data['type']) ? $data['type'] : 'image', $post->ID); ?> <?php } ?> <?php } ?> </ul> <?php $this->media_library($post); }
/** * Returns the singleton instance of the class. * * @since 1.0.0 * * @return object The Soliloquy_Media object. */ public static function get_instance() { if (!isset(self::$instance) && !self::$instance instanceof Soliloquy_Media) { self::$instance = new Soliloquy_Media(); } return self::$instance; }