/** * Callback for displaying the UI for main images tab. * * @since 1.0.0 * * @param object $post The current post object. */ public function images_tab($post) { ?> <div class="envira-alert envira-clear" style="margin-bottom:10px;"> <?php _e('<em>Want to make your gallery workflow even better?</em> By upgrading to Envira Pro, you can get access to numerous other features, including: <strong>a fully featured gallery widget</strong>, <strong>complete gallery API</strong>, <strong>powerful gallery documentation</strong>, <strong>full mobile and Retina support</strong>, <strong>dedicated customer support</strong> and so much more! <a href="http://enviragallery.com/lite/?utm_source=liteplugin&utm_medium=link&utm_campaign=WordPress" title="Click here to upgrade to Envira Pro!" target="_blank">Click here to upgrade to Envira Pro!</a>', 'envira-gallery-lite'); ?> </div> <?php // Output the custom media upload form. Envira_Gallery_Media_Lite::get_instance()->media_upload_form(); // Prepare output data. $gallery_data = get_post_meta($post->ID, '_eg_gallery_data', true); ?> <ul id="envira-gallery-output" class="envira-clear"> <?php if (!empty($gallery_data['gallery'])) { ?> <?php foreach ($gallery_data['gallery'] as $id => $data) { ?> <?php echo $this->get_gallery_item($id, $data, $post->ID); ?> <?php } ?> <?php } ?> </ul> <?php $this->media_library($post); }
/** * Returns the singleton instance of the class. * * @since 1.0.0 * * @return object The Envira_Gallery_Media_Lite object. */ public static function get_instance() { if (!isset(self::$instance) && !self::$instance instanceof Envira_Gallery_Media_Lite) { self::$instance = new Envira_Gallery_Media_Lite(); } return self::$instance; }
/** * Callback for displaying the UI for main images tab. * * @since 1.0.0 * * @param object $post The current post object. */ public function images_tab($post) { // Output the custom media upload form. Envira_Gallery_Media_Lite::get_instance()->media_upload_form(); // Prepare output data. $gallery_data = get_post_meta($post->ID, '_eg_gallery_data', true); ?> <ul id="envira-gallery-output" class="envira-clear"> <?php if (!empty($gallery_data['gallery'])) { ?> <?php foreach ($gallery_data['gallery'] as $id => $data) { ?> <?php echo $this->get_gallery_item($id, $data, $post->ID); ?> <?php } ?> <?php } ?> </ul> <?php $this->media_library($post); }