Пример #1
0
    /**
     * Shows slides currently in slideshow
     *
     * TODO Tidy up, it's probably best to move all to 'slides.php'
     *
     * @since 1.0.0
     */
    static function slidesMetaBox()
    {
        global $post;
        // Get views
        $views = SlideshowPluginSlideshowSettingsHandler::getViews($post->ID);
        // Insert slide buttons
        echo '<p style="text-align: center;">
			<i>' . __('Insert', 'slideshow-plugin') . ':</i><br/>' . SlideshowPluginSlideInserter::getImageSlideInsertButton() . SlideshowPluginSlideInserter::getTextSlideInsertButton() . SlideshowPluginSlideInserter::getVideoSlideInsertButton() . '</p>';
        // No views/slides message
        if (count($views) <= 0) {
            echo '<p>' . __('Add slides to this slideshow by using one of the buttons above.', 'slideshow-plugin') . '</p>';
        }
        // Style
        echo '<style type="text/css">
			.sortable li {
				cursor: pointer;
			}

			.sortable-slide-placeholder {
				border: 1px solid #f00;
			}
		</style>';
        // Start list
        echo '<ul class="sortable-slides-list">';
        // Print views
        if (is_array($views)) {
            foreach ($views as $view) {
                if (!$view instanceof SlideshowPluginSlideshowView) {
                    continue;
                }
                echo $view->toBackEndHTML();
            }
        }
        // End list
        echo '</ul>';
        // Templates
        SlideshowPluginSlideshowSlide::getBackEndTemplates(false);
    }
Пример #2
0
<p style="text-align: center;" xmlns="http://www.w3.org/1999/html" xmlns="http://www.w3.org/1999/html">
	<i><?php 
_e('Insert', 'slideshow-plugin');
?>
:</i><br/>

	<?php 
echo SlideshowPluginSlideInserter::getImageSlideInsertButton();
?>
	<?php 
echo SlideshowPluginSlideInserter::getTextSlideInsertButton();
?>
	<?php 
echo SlideshowPluginSlideInserter::getVideoSlideInsertButton();
?>
</p>

<?php 
if (count($slides) <= 0) {
    ?>
	<p><?php 
    _e('Add slides to this slideshow by using one of the buttons above.', 'slideshow-plugin');
    ?>
</p>
<?php 
}
?>

<style type="text/css">
	.sortable li {
		cursor: pointer;
    /**
     * Shows slides currently in slideshow
     *
     * TODO Tidy up, it's probably best to move all to 'slides.php'
     *
     * @since 1.0.0
     */
    static function slidesMetaBox()
    {
        global $post;
        // Get views
        $views = SlideshowPluginSlideshowSettingsHandler::getViews($post->ID);
        // Insert slide buttons
        echo '<p style="text-align: center;">
			<i>' . __('Insert', 'slideshow-plugin') . ':</i><br/>' . SlideshowPluginSlideInserter::getImageSlideInsertButton() . SlideshowPluginSlideInserter::getTextSlideInsertButton() . SlideshowPluginSlideInserter::getVideoSlideInsertButton() . '</p>';
        // Toggle slides open/closed
        echo '<p style="text-align: center;">
			<a href="#" class="open-slides-button">' . __('Open all', 'slideshow-plugin') . '</a>
			|
			<a href="#" class="close-slides-button">' . __('Close all', 'slideshow-plugin') . '</a>
		</p>';
        // No views/slides message
        if (count($views) <= 0) {
            echo '<p>' . __('Add slides to this slideshow by using one of the buttons above.', 'slideshow-plugin') . '</p>';
        }
        // Start list
        echo '<div class="sortable-slides-list">';
        // Print views
        if (is_array($views)) {
            foreach ($views as $view) {
                if (!$view instanceof SlideshowPluginSlideshowView) {
                    continue;
                }
                echo $view->toBackEndHTML();
            }
        }
        // End list
        echo '</div>';
        // Templates
        SlideshowPluginSlideshowSlide::getBackEndTemplates(false);
    }