/** * The form shown on the admins widget page. Here settings can be changed. * * @since 1.2.0 * @param mixed array $instance * @return string */ function form($instance) { // Defaults $defaults = array('title' => __(self::$widgetName, 'slideshow-jquery-image-gallery'), 'slideshowId' => -1); // Merge database settings with defaults $instance = wp_parse_args((array) $instance, $defaults); // Get slideshows $slideshows = get_posts(array('numberposts' => -1, 'offset' => 0, 'post_type' => SlideshowPluginPostType::$postType)); $data = new stdClass(); $data->widget = $this; $data->instance = $instance; $data->slideshows = $slideshows; // Include form SlideshowPluginMain::outputView(__CLASS__ . DIRECTORY_SEPARATOR . 'form.php', $data); }
/** * Shows settings for particular slideshow * * @since 1.0.0 */ static function settingsMetaBox() { global $post; // Nonce wp_nonce_field(SlideshowPluginSlideshowSettingsHandler::$nonceAction, SlideshowPluginSlideshowSettingsHandler::$nonceName); $data = new stdClass(); $data->settings = SlideshowPluginSlideshowSettingsHandler::getSettings($post->ID, true); SlideshowPluginMain::outputView(__CLASS__ . DIRECTORY_SEPARATOR . 'settings.php', $data); }
<p><?php _e('Add slides to this slideshow by using one of the buttons above.', 'slideshow-jquery-image-gallery'); ?> </p> <?php } ?> <div class="sortable-slides-list"> <?php if (is_array($data->slides)) { $i = 0; foreach ($data->slides as $slide) { $data = new stdClass(); $data->name = SlideshowPluginSlideshowSettingsHandler::$slidesKey . '[' . $i . ']'; $data->properties = $slide; SlideshowPluginMain::outputView('SlideshowPluginSlideshowSlide' . DIRECTORY_SEPARATOR . 'backend_' . $slide['type'] . '.php', $data); $i++; } } ?> </div> <?php SlideshowPluginMain::outputView('SlideshowPluginSlideshowSlide' . DIRECTORY_SEPARATOR . 'backend_templates.php'); ?> <?php }
<div class="slideshow_loading_icon"></div> <?php } ?> <div class="slideshow_content" style="display: none;"> <?php if (is_array($data->slides) && count($data->slides) > 0) { $i = 0; for ($i; $i < count($data->slides); $i++) { echo '<div class="slideshow_view">'; for ($i; $i < count($data->slides); $i++) { $slideData = new stdClass(); $slideData->properties = $data->slides[$i]; SlideshowPluginMain::outputView('SlideshowPluginSlideshowSlide' . DIRECTORY_SEPARATOR . 'frontend_' . $data->slides[$i]['type'] . '.php', $slideData); if (($i + 1) % $data->settings['slidesPerView'] == 0) { break; } } echo '<div style="clear: both;"></div></div>'; } } ?> </div> <div class="slideshow_controlPanel slideshow_transparent" style="display: none;"><ul><li class="slideshow_togglePlay" data-play-text="<?php _e('Play', 'slideshow-jquery-image-gallery'); ?> " data-pause-text="<?php
/** * Shows the general settings page. * * @since 2.1.22 */ static function generalSettings() { SlideshowPluginMain::outputView(__CLASS__ . DIRECTORY_SEPARATOR . 'general-settings.php'); }
/** * Hooked on the admin's 'media_buttons' hook, outputs the shortcode inserter media button * * @since 2.1.16 */ static function shortcodeInserter() { $data = new stdClass(); $data->slideshows = new WP_Query(array('post_type' => SlideshowPluginPostType::$postType, 'orderby' => 'post_date', 'posts_per_page' => -1, 'order' => 'DESC')); SlideshowPluginMain::outputView(__CLASS__ . DIRECTORY_SEPARATOR . 'shortcode-inserter.php', $data); }
_e('Default Slideshow Settings', 'slideshow-jquery-image-gallery'); ?> </a> <a href="#custom-styles-tab" class="nav-tab"><?php _e('Custom Styles', 'slideshow-jquery-image-gallery'); ?> </a> <?php submit_button(null, 'primary', null, false, 'style="float: right;"'); ?> </h2> <?php // General Settings SlideshowPluginMain::outputView('SlideshowPluginGeneralSettings' . DIRECTORY_SEPARATOR . 'general-settings-tab.php'); // Default slideshow settings SlideshowPluginMain::outputView('SlideshowPluginGeneralSettings' . DIRECTORY_SEPARATOR . 'default-slideshow-settings-tab.php'); // Custom styles SlideshowPluginMain::outputView('SlideshowPluginGeneralSettings' . DIRECTORY_SEPARATOR . 'custom-styles-tab.php'); ?> <p> <?php submit_button(null, 'primary', null, false); ?> </p> </form> </div> <?php }