/**
     * run
     * @return void
     */
    public function run()
    {
        $this->prepare_items();
        ?>
		<div class="wrap">
			<h2><?php 
        _e('Sliders', 'framework');
        ?>
 <a href="admin.php?page=flexslider&action=new" class="add-new-h2"><?php 
        _e('Add Slider', 'framework');
        ?>
</a></h2>
			<?php 
        FlexSliderInit::displayMessage();
        ?>
			<form method="get" id="slides-list">
				<input type="hidden" name="page" value="<?php 
        echo $_REQUEST['page'];
        ?>
" />
				<?php 
        $this->display();
        ?>
			</form>
		</div>
		<script type="text/javascript">
			jQuery(document).ready(function() {
				
				jQuery(".remove").click(function() {
					
					if (confirm("<?php 
        _e('You are about to permanently delete the selected items.\\n\'Cancel\' to stop, \'OK\' to delete.', 'framework');
        ?>
"))
					{
						return true;
					}
					return false;
				});
			});
		</script>
	<?php 
    }
    /**
     * run
     * @return void
     */
    public function run()
    {
        //check if can load form
        if ($this->checkIfCanLoad() !== true) {
            return false;
        }
        if ($this->_iId == 0) {
            $this->_oRecord = new stdClass();
            $this->_oRecord->animation = null;
            $this->_oRecord->name = null;
            $this->_oRecord->direction = null;
            $this->_oRecord->slideshow_speed = null;
            $this->_oRecord->animation_speed = null;
            $this->_oRecord->reverse = null;
            $this->_oRecord->randomize = null;
            $this->_oRecord->control_nav = null;
            $this->_oRecord->direction_nav = null;
            $this->_oRecord->background = null;
        } else {
            $this->_oRecord = $this->_getRecord();
        }
        ?>
		<div class="wrap">
			<h2><?php 
        if ($this->_iId == 0) {
            _e('Add Slider', 'framework');
        } else {
            _e('Edit Slider', 'framework');
        }
        ?>
 <a href="admin.php?page=flexslider" class="add-new-h2"><?php 
        _e('Back to the list', 'framework');
        ?>
</a></h2>
			<?php 
        FlexSliderInit::displayMessage();
        ?>
			<form id="slider" action="<?php 
        echo $_SERVER['REQUEST_URI'];
        ?>
" method="post" class="wrap">
				<input type="hidden" name="flexslider" value="1">
				<input type="hidden" name="page" value="<?php 
        echo $_GET['page'];
        ?>
">
				<input type="hidden" name="posted" value="1">
				<div id="poststuff">
					<div id="post-body" class="metabox-holder columns-2">
						<div id="postbox-container-1" class="postbox-container">
							<?php 
        $this->displayColumn1();
        ?>
						</div>
						<div id="postbox-container-2" class="postbox-container">
							<?php 
        $this->displayColumn2();
        ?>
						</div>
					</div>
				</div>
			</form>
		</div>
		<?php 
    }
Example #3
0
<?php

/**
 * Flexslider
 *
 * @package framework
 * @since framework 1.0
 */
if (is_admin()) {
    require_once 'class/FlexSliderInit.class.php';
    $oFlexSlider = new FlexSliderInit();
    $oFlexSlider->init();
}