Plugin Directory

Changeset 671289


Ignore:
Timestamp:
02/21/2013 04:33:21 PM (13 years ago)
Author:
matchalabs
Message:

Refactoring

Location:
ml-slider/branches/refactor
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • ml-slider/branches/refactor/assets/ml-slider.js

    r671267 r671289  
    5151            }
    5252        });
     53
    5354
    5455        $(".confirm").click(function() {
     
    134135                $(".ml-slider table.sortable").tableDnD({
    135136                    onDrop: function() {
    136                         updateSlideOrder()
     137                        updateSlideOrder();
    137138                    }
    138139                });
  • ml-slider/branches/refactor/inc/ml-slider.class.php

    r671229 r671289  
    2424        $this->settings = $this->get_settings();
    2525        $this->identifier = 'ml_slider_' . rand();
    26         $this->enqueue_scripts();
    2726    }
    2827
     
    8382
    8483    /**
    85      * Include the default CSS
    86      */
    87     private function enqueue_scripts() {
    88         wp_enqueue_style('ml-slider_display_css', plugins_url('ml-slider/assets/ml-slider-display.css'));
    89     }
    90 
    91     /**
    9284     * Get settings for the current slider
    9385     *
     
    10496     * @return string | bool setting value or fase
    10597     */
    106     protected function get_setting($name) {
     98    public function get_setting($name) {
    10799        return isset($this->settings[$name]) && strlen($this->settings[$name]) > 0 ? $this->settings[$name] : "false";
    108100    }
  • ml-slider/branches/refactor/inc/ml-slider.coin.class.php

    r671229 r671289  
    1212    }
    1313
     14    /**
     15     *
     16     */
    1417    public function output() {
    1518        return parent::wrap_html($this->get_html()) . parent::get_javascript('coinSlider');
     
    2528
    2629        if (parent::get_setting('printCss') == 'true') {
     30            wp_enqueue_style('ml-slider_display_css', plugins_url('ml-slider/assets/ml-slider-display.css'));
    2731            wp_enqueue_style('ml-slider_coin_slider_css', plugins_url('ml-slider/assets/coinslider/coin-slider-styles.css'));
    2832        }
     
    5155        return $retVal;
    5256    }
    53 
    54 
    55    
    5657}
    5758?>
  • ml-slider/branches/refactor/inc/ml-slider.flex.class.php

    r671229 r671289  
    1212    }
    1313
     14    /**
     15     *
     16     */
    1417    public function output() {
    1518        return parent::wrap_html($this->get_html()) . parent::get_javascript('flexSlider');
     
    2528
    2629        if (parent::get_setting('printCss') == 'true') {
     30            wp_enqueue_style('ml-slider_display_css', plugins_url('ml-slider/assets/ml-slider-display.css'));
    2731            wp_enqueue_style('ml-slider_flex_slider_css', plugins_url('ml-slider/assets/flexslider/flexslider.css'));
    2832        }
     
    5256        return $retVal;
    5357    }
    54 
    55 
    56    
    5758}
    5859?>
  • ml-slider/branches/refactor/inc/ml-slider.nivo.class.php

    r671229 r671289  
    1212    }
    1313
     14    /**
     15     *
     16     */
    1417    public function output() {
    1518        return parent::wrap_html($this->get_html()) . parent::get_javascript('nivoSlider');
     
    2528
    2629        if (parent::get_setting('printCss') == 'true') {
     30            wp_enqueue_style('ml-slider_display_css', plugins_url('ml-slider/assets/ml-slider-display.css'));
    2731            wp_enqueue_style('ml-slider_nivo_slider_css', plugins_url('ml-slider/assets/nivoslider/nivo-slider.css'));
    28             wp_enqueue_style('ml-slider_nivo_slider_theme_' . $this->get_setting('theme'), plugins_url('ml-slider/assets/nivoslider/themes/' . $this->get_setting('theme') . '/' . $this->get_setting('theme') . '.css'));
     32            wp_enqueue_style('ml-slider_nivo_slider_theme_' . $parent::get_setting('theme'), plugins_url('ml-slider/assets/nivoslider/themes/' . $parent::get_setting('theme') . '/' . $parent::get_setting('theme') . '.css'));
    2933        }
    3034    }
     
    5256        return $retVal;
    5357    }
    54    
    5558}
    5659?>
  • ml-slider/branches/refactor/inc/ml-slider.responsive.class.php

    r671229 r671289  
    1212    }
    1313
     14    /**
     15     *
     16     */
    1417    public function output() {
    1518        return parent::wrap_html($this->get_html()) . parent::get_javascript('responsiveSlides');
     
    2528
    2629        if (parent::get_setting('printCss') == 'true') {
     30            wp_enqueue_style('ml-slider_display_css', plugins_url('ml-slider/assets/ml-slider-display.css'));
    2731            wp_enqueue_style('ml-slider_responsive_slides_css', plugins_url('ml-slider/assets/responsiveslides/responsiveslides.css'));
    2832        }
  • ml-slider/branches/refactor/ml-slider.php

    r671267 r671289  
    6666        wp_enqueue_script('jquery-ui-sortable', array('jquery', 'jquery-ui-core'));
    6767        wp_enqueue_script('ml-slider-tipsy', plugins_url('ml-slider/assets/tipsy/jquery.tipsy.js'), array('jquery'));
    68         wp_enqueue_script('ml-slider-admin-script', plugins_url('ml-slider/assets/ml-slider.js'), array('jquery', 'jquery-ui-sortable', 'media-upload'));
    69        
     68        wp_enqueue_script('ml-slider-admin-script', plugins_url('ml-slider/assets/ml-slider.js'), array('jquery', 'ml-slider-tipsy', 'media-upload'));
    7069    }
    7170   
     
    8685        ), MLSLIDER_ASSETS_URL . 'matchalabs.png', 99999);
    8786
    88         add_action('admin_print_scripts-' . $page, array( $this, 'register_admin_scripts' ), 99999 );
     87        add_action('admin_print_scripts-' . $page, array( $this, 'register_admin_scripts' ) );
    8988    }
    9089   
     
    143142
    144143    /**
    145      * Get slide ID
    146      *
    147      * @return int the current slider ID
    148      */
    149     private function get_slider() {
    150         return $this->slider;
    151     }
    152 
    153     /**
    154144     * Get settings for the current slider
    155145     *
     
    157147     */
    158148    private function get_settings() {
    159         return get_post_meta($this->get_slider(), 'ml-slider_settings', true);
     149        return get_post_meta($this->slider->id, 'ml-slider_settings', true);
    160150    }
    161151
     
    211201       
    212202        while ($the_query->have_posts()) {
    213             if (!$this->get_slider()->id) {
     203            if (!$this->slider->id) {
    214204                $this->set_slider($the_query->post->ID);
    215205            }
    216206           
    217207            $the_query->the_post();
    218             $active = $this->get_slider()->id == $the_query->post->ID ? true : false;
     208            $active = $this->slider->id == $the_query->post->ID ? true : false;
    219209           
    220210            $sliders[] = array(
     
    237227
    238228        $args = array(
    239             'orderby' => $this->get_setting('random') == 'true' && !is_admin() ? 'rand' : 'menu_order',
     229            'orderby' => $this->slider->get_setting('random') == 'true' && !is_admin() ? 'rand' : 'menu_order',
    240230            'order' => 'ASC',
    241231            'post_type' => 'attachment',
     
    246236                    'taxonomy' => 'ml-slider',
    247237                    'field' => 'slug',
    248                     'terms' => $this->get_slider()->id
     238                    'terms' => $this->slider->id
    249239                )
    250240            )
     
    334324    private function handle_update_slider_settings() {
    335325        if (isset($_POST['settings'])) {
    336             $old_settings = get_post_meta($this->get_slider(), 'ml-slider_settings', true);
     326            $old_settings = get_post_meta($this->slider->id, 'ml-slider_settings', true);
    337327            $new_settings = $_POST['settings'];
    338328           
     
    349339           
    350340            // update the slider settings
    351             update_post_meta($this->get_slider(), 'ml-slider_settings', array_merge($old_settings, $new_settings));
     341            update_post_meta($this->slider->id, 'ml-slider_settings', array_merge($old_settings, $new_settings));
    352342
    353343            // update settings
    354             $this->settings = get_post_meta($this->get_slider(), 'ml-slider_settings', true);
     344            $this->settings = get_post_meta($this->slider->id, 'ml-slider_settings', true);
    355345        }
    356346    }
     
    362352        if (isset($_POST['title'])) {
    363353            $slide = array(
    364                 'ID' => $this->get_slider(),
     354                'ID' => $this->slider->id,
    365355                'post_title' => $_POST['title']
    366356            );
     
    383373            $new_terms = array();
    384374            $current_terms = wp_get_object_terms($slideToUntagFromCurrentSlider, 'ml-slider', array('fields' => 'ids'));
    385             $term = get_term_by('name', $this->get_slider(), 'ml-slider');
     375            $term = get_term_by('name', $this->slider->id, 'ml-slider');
    386376
    387377            foreach ($current_terms as $current_term) {
     
    404394            foreach ($_POST['attachment'] as $id => $fields) {
    405395                // get the term thats name is the same as the ID of the slider
    406                 $term = get_term_by('name', $this->get_slider(), 'ml-slider');
     396                $term = get_term_by('name', $this->slider->id, 'ml-slider');
    407397
    408398                // tag this slide to the taxonomy term
     
    428418
    429419                // add a new image size for the current slider
    430                 add_image_size('ml-slider-slide', $this->get_setting('width'), $this->get_setting('height'), true);
     420                add_image_size('ml-slider-slide', $this->slider->get_setting('width'), $this->slider->get_setting('height'), true);
    431421                $file = get_attached_file($id);
    432422                // ask WordPress to resize our slides for us
     
    505495        $this->set_slider($id);
    506496
    507         switch ($this->get_setting('type')) {
     497        switch ($this->slider->get_setting('type')) {
    508498            case('coin') :
    509499                $slider = new MLCoinSlider($id);
     
    537527
    538528        <div class="wrap ml-slider">
    539             <form enctype="multipart/form-data" action="?page=ml-slider&id=<?php echo $this->get_slider()->id ?>" method="post">
     529            <form enctype="multipart/form-data" action="?page=ml-slider&id=<?php echo $this->slider->id ?>" method="post">
    540530
    541531                <h2 class="nav-tab-wrapper" style="font-size: 13px;">
     
    556546
    557547                <?php
    558                     if (!$this->get_slider()->id) {
     548                    if (!$this->slider->id) {
    559549                        return;
    560550                    }
     
    572562                        <tbody>
    573563                            <?php
    574                                 $slides = $this->get_slider()->slides;
     564                                $slides = $this->slider->slides;
    575565
    576566                                foreach($slides as $slide) {
     
    579569                                    echo "<tr class='slide'>";
    580570                                    echo "<td>";
    581                                     echo "<div style='position: absolute'><a class='delete-slide confirm' href='?page=ml-slider&id={$this->get_slider()->id}&deleteSlide={$slide['id']}'>x</a></div>";
     571                                    echo "<div style='position: absolute'><a class='delete-slide confirm' href='?page=ml-slider&id={$this->slider->id}&deleteSlide={$slide['id']}'>x</a></div>";
    582572                                    echo "<img src='{$image_attributes[0]}' width='150px'></td>";
    583573                                    echo "<td>";
     
    609599                                    <div class='slider-lib nivo'>
    610600                                        <label for='nivo' title='Version: 3.2<br />Responsive: Yes<br />Effects: 14<br />Size: 12kb<br />Mobile Friendly: Yes<br />Themes: 4' class='tooltiptop'>NivoSlider</label>
    611                                         <input class="select-slider" id='nivo' rel='nivo' type='radio' name="settings[type]" <?php if ($this->get_setting('type') == 'nivo') echo 'checked=checked' ?> value='nivo' />
     601                                        <input class="select-slider" id='nivo' rel='nivo' type='radio' name="settings[type]" <?php if ($this->slider->get_setting('type') == 'nivo') echo 'checked=checked' ?> value='nivo' />
    612602                                    </div>
    613603                                    <div class='slider-lib coin'>
    614604                                        <label for='coin' title='Version: 1.0<br />Responsive: No<br />Effects: 4<br />Size: 8kb<br />Mobile Friendly: Yes' class='tooltiptop'>CoinSlider</label>
    615                                         <input class="select-slider" id='coin' rel='coin' type='radio' name="settings[type]" <?php if ($this->get_setting('type') == 'coin') echo 'checked=checked' ?> value='coin' />
     605                                        <input class="select-slider" id='coin' rel='coin' type='radio' name="settings[type]" <?php if ($this->slider->get_setting('type') == 'coin') echo 'checked=checked' ?> value='coin' />
    616606                                    </div>
    617607                                    <div class='slider-lib flex'>
    618608                                        <label for='flex' title='Version: 2.1<br />Responsive: Yes<br />Effects: 2<br />Size: 17kb<br />Mobile Friendly: Yes' class='tooltiptop'>FlexSlider</label>
    619                                         <input class="select-slider" id='flex' rel='flex' type='radio' name="settings[type]" <?php if ($this->get_setting('type') == 'flex') echo 'checked=checked' ?> value='flex' />
     609                                        <input class="select-slider" id='flex' rel='flex' type='radio' name="settings[type]" <?php if ($this->slider->get_setting('type') == 'flex') echo 'checked=checked' ?> value='flex' />
    620610                                    </div>
    621611                                    <div class='slider-lib responsive'>
    622612                                        <label for='responsive' title='Version: 1.53<br />Responsive: Yes<br />Effects: 1<br />Size: 3kb<br />Mobile Friendly: Yes' class='tooltiptop'>Responsive</label>
    623                                         <input class="select-slider" id='responsive' rel='responsive' type='radio' name="settings[type]" <?php if ($this->get_setting('type') == 'responsive') echo 'checked=checked' ?> value='responsive' />
     613                                        <input class="select-slider" id='responsive' rel='responsive' type='radio' name="settings[type]" <?php if ($this->slider->get_setting('type') == 'responsive') echo 'checked=checked' ?> value='responsive' />
    624614                                    </div>
    625615                                </td>
     
    629619                                <td>Size</td>
    630620                                <td>
    631                                     <input type='text' size='3' name="settings[width]" value='<?php echo $this->get_setting('width') ?>' />px X
    632                                     <input type='text' size='3' name="settings[height]" value='<?php echo $this->get_setting('height') ?>' />px
     621                                    <input type='text' size='3' name="settings[width]" value='<?php echo $this->slider->get_setting('width') ?>' />px X
     622                                    <input type='text' size='3' name="settings[height]" value='<?php echo $this->slider->get_setting('height') ?>' />px
    633623                                </td>
    634624                            </tr>
     
    638628                                <td>
    639629                                    <select name="settings[effect]" class='effect option coin nivo flex'>
    640                                         <option class='option coin nivo' value='random' <?php if ($this->get_setting('effect') == 'random') echo 'selected=selected' ?>>Random</option>
    641                                         <option class='option coin' value='swirl' <?php if ($this->get_setting('effect') == 'swirl') echo 'selected=selected' ?>>Swirl</option>
    642                                         <option class='option coin' value='rain' <?php if ($this->get_setting('effect') == 'rain') echo 'selected=selected' ?>>Rain</option>
    643                                         <option class='option coin' value='straight' <?php if ($this->get_setting('effect') == 'straight') echo 'selected=selected' ?>>Straight</option>
    644                                         <option class='option nivo' value='sliceDown' <?php if ($this->get_setting('effect') == 'sliceDown') echo 'selected=selected' ?>>Slice Down</option>
    645                                         <option class='option nivo' value='sliceUp' <?php if ($this->get_setting('effect') == 'sliceUp') echo 'selected=selected' ?>>Slice Up</option>
    646                                         <option class='option nivo' value='sliceUpLeft' <?php if ($this->get_setting('effect') == 'sliceUpLeft') echo 'selected=selected' ?>>Slice Up Left</option>
    647                                         <option class='option nivo' value='sliceUpDown' <?php if ($this->get_setting('effect') == 'sliceUpDown') echo 'selected=selected' ?>>Slice Up Down</option>
    648                                         <option class='option nivo' value='sliceUpDownLeft' <?php if ($this->get_setting('effect') == 'sliceUpDownLeft') echo 'selected=selected' ?>>Slice Up Down Left</option>
    649                                         <option class='option nivo' value='fold' <?php if ($this->get_setting('effect') == 'fold') echo 'selected=selected' ?>>Fold</option>
    650                                         <option class='option nivo flex' value='fade' <?php if ($this->get_setting('effect') == 'fade') echo 'selected=selected' ?>>Fade</option>
    651                                         <option class='option nivo' value='slideInRight' <?php if ($this->get_setting('effect') == 'slideInRight') echo 'selected=selected' ?>>Slide In Right</option>
    652                                         <option class='option nivo' value='slideInLeft' <?php if ($this->get_setting('effect') == 'slideInLeft') echo 'selected=selected' ?>>Slide In Left</option>
    653                                         <option class='option nivo' value='boxRandom' <?php if ($this->get_setting('effect') == 'boxRandom') echo 'selected=selected' ?>>Box Random</option>
    654                                         <option class='option nivo' value='boxRain' <?php if ($this->get_setting('effect') == 'boxRain') echo 'selected=selected' ?>>Box Rain</option>
    655                                         <option class='option nivo' value='boxRainReverse' <?php if ($this->get_setting('effect') == 'boxRainReverse') echo 'selected=selected' ?>>Box Rain Reverse</option>
    656                                         <option class='option nivo' value='boxRainGrowReverse' <?php if ($this->get_setting('effect') == 'boxRainGrowReverse') echo 'selected=selected' ?>>Box Rain Grow Reverse</option>
    657                                         <option class='option flex' value='slide' <?php if ($this->get_setting('effect') == 'slide') echo 'selected=selected' ?>>Slide</option>
     630                                        <option class='option coin nivo' value='random' <?php if ($this->slider->get_setting('effect') == 'random') echo 'selected=selected' ?>>Random</option>
     631                                        <option class='option coin' value='swirl' <?php if ($this->slider->get_setting('effect') == 'swirl') echo 'selected=selected' ?>>Swirl</option>
     632                                        <option class='option coin' value='rain' <?php if ($this->slider->get_setting('effect') == 'rain') echo 'selected=selected' ?>>Rain</option>
     633                                        <option class='option coin' value='straight' <?php if ($this->slider->get_setting('effect') == 'straight') echo 'selected=selected' ?>>Straight</option>
     634                                        <option class='option nivo' value='sliceDown' <?php if ($this->slider->get_setting('effect') == 'sliceDown') echo 'selected=selected' ?>>Slice Down</option>
     635                                        <option class='option nivo' value='sliceUp' <?php if ($this->slider->get_setting('effect') == 'sliceUp') echo 'selected=selected' ?>>Slice Up</option>
     636                                        <option class='option nivo' value='sliceUpLeft' <?php if ($this->slider->get_setting('effect') == 'sliceUpLeft') echo 'selected=selected' ?>>Slice Up Left</option>
     637                                        <option class='option nivo' value='sliceUpDown' <?php if ($this->slider->get_setting('effect') == 'sliceUpDown') echo 'selected=selected' ?>>Slice Up Down</option>
     638                                        <option class='option nivo' value='sliceUpDownLeft' <?php if ($this->slider->get_setting('effect') == 'sliceUpDownLeft') echo 'selected=selected' ?>>Slice Up Down Left</option>
     639                                        <option class='option nivo' value='fold' <?php if ($this->slider->get_setting('effect') == 'fold') echo 'selected=selected' ?>>Fold</option>
     640                                        <option class='option nivo flex' value='fade' <?php if ($this->slider->get_setting('effect') == 'fade') echo 'selected=selected' ?>>Fade</option>
     641                                        <option class='option nivo' value='slideInRight' <?php if ($this->slider->get_setting('effect') == 'slideInRight') echo 'selected=selected' ?>>Slide In Right</option>
     642                                        <option class='option nivo' value='slideInLeft' <?php if ($this->slider->get_setting('effect') == 'slideInLeft') echo 'selected=selected' ?>>Slide In Left</option>
     643                                        <option class='option nivo' value='boxRandom' <?php if ($this->slider->get_setting('effect') == 'boxRandom') echo 'selected=selected' ?>>Box Random</option>
     644                                        <option class='option nivo' value='boxRain' <?php if ($this->slider->get_setting('effect') == 'boxRain') echo 'selected=selected' ?>>Box Rain</option>
     645                                        <option class='option nivo' value='boxRainReverse' <?php if ($this->slider->get_setting('effect') == 'boxRainReverse') echo 'selected=selected' ?>>Box Rain Reverse</option>
     646                                        <option class='option nivo' value='boxRainGrowReverse' <?php if ($this->slider->get_setting('effect') == 'boxRainGrowReverse') echo 'selected=selected' ?>>Box Rain Grow Reverse</option>
     647                                        <option class='option flex' value='slide' <?php if ($this->slider->get_setting('effect') == 'slide') echo 'selected=selected' ?>>Slide</option>
    658648                                    </select>
    659649                                </td>
     
    664654                                <td>
    665655                                    <select class='option nivo' name="settings[theme]">
    666                                         <option value='default' <?php if ($this->get_setting('theme') == 'default') echo 'selected=selected' ?>>Default</option>
    667                                         <option value='dark' <?php if ($this->get_setting('theme') == 'dark') echo 'selected=selected' ?>>Dark</option>
    668                                         <option value='light' <?php if ($this->get_setting('theme') == 'light') echo 'selected=selected' ?>>Light</option>
    669                                         <option value='bar' <?php if ($this->get_setting('theme') == 'bar') echo 'selected=selected' ?>>Bar</option>
     656                                        <option value='default' <?php if ($this->slider->get_setting('theme') == 'default') echo 'selected=selected' ?>>Default</option>
     657                                        <option value='dark' <?php if ($this->slider->get_setting('theme') == 'dark') echo 'selected=selected' ?>>Dark</option>
     658                                        <option value='light' <?php if ($this->slider->get_setting('theme') == 'light') echo 'selected=selected' ?>>Light</option>
     659                                        <option value='bar' <?php if ($this->slider->get_setting('theme') == 'bar') echo 'selected=selected' ?>>Bar</option>
    670660                                    </select>
    671661                                </td>
     
    675665                                <td>Number of squares</td>
    676666                                <td>
    677                                     <input class='option coin nivo' type='text' size='2' name="settings[spw]" value='<?php echo $this->get_setting('spw') ?>' /> x
    678                                     <input class='option coin nivo' type='text' size='2' name="settings[sph]" value='<?php echo $this->get_setting('sph') ?>' />
     667                                    <input class='option coin nivo' type='text' size='2' name="settings[spw]" value='<?php echo $this->slider->get_setting('spw') ?>' /> x
     668                                    <input class='option coin nivo' type='text' size='2' name="settings[sph]" value='<?php echo $this->slider->get_setting('sph') ?>' />
    679669                                </td>
    680670                            </tr>
     
    683673                                <td>Number of slices</td>
    684674                                <td>
    685                                     <input class='option nivo' type='text' size='2' name="settings[slices]" value='<?php echo $this->get_setting('slices') ?>' />
     675                                    <input class='option nivo' type='text' size='2' name="settings[slices]" value='<?php echo $this->slider->get_setting('slices') ?>' />
    686676                                </td>
    687677                            </tr>
     
    689679                                <td><a href="#" class="tooltip" title="How long to display each slide, in milliseconds">?</a></td>
    690680                                <td>Slide delay</td>
    691                                 <td><input class='option coin flex responsive nivo' type='text' size='5' name="settings[delay]" value='<?php echo $this->get_setting('delay') ?>' />ms</td>
     681                                <td><input class='option coin flex responsive nivo' type='text' size='5' name="settings[delay]" value='<?php echo $this->slider->get_setting('delay') ?>' />ms</td>
    692682                            </tr>
    693683                            <tr>
    694684                                <td><a href="#" class="tooltip" title="Delay beetwen squares in ms">?</a></td>
    695685                                <td>Square delay</td>
    696                                 <td><input class='option coin' type='text' size='5' name="settings[sDelay]" value='<?php echo $this->get_setting('sDelay') ?>' />ms</td>
     686                                <td><input class='option coin' type='text' size='5' name="settings[sDelay]" value='<?php echo $this->slider->get_setting('sDelay') ?>' />ms</td>
    697687                            </tr>
    698688                            <tr>
    699689                                <td><a href="#" class="tooltip" title="Opacity of title and navigation">?</a></td>
    700690                                <td>Opacity</td>
    701                                 <td><input class='option coin' type='text' size='5' name="settings[opacity]" value='<?php echo $this->get_setting('opacity') ?>' /></td>
     691                                <td><input class='option coin' type='text' size='5' name="settings[opacity]" value='<?php echo $this->slider->get_setting('opacity') ?>' /></td>
    702692                            </tr>
    703693                            <tr>
    704694                                <td><a href="#" class="tooltip" title="Set the fade in speef of the caption">?</a></td>
    705695                                <td>Caption speed</td>
    706                                 <td><input class='option coin' type='text' size='5' name="settings[titleSpeed]" value='<?php echo $this->get_setting('titleSpeed') ?>' />ms</td>
     696                                <td><input class='option coin' type='text' size='5' name="settings[titleSpeed]" value='<?php echo $this->slider->get_setting('titleSpeed') ?>' />ms</td>
    707697                            </tr>
    708698                            <tr>
    709699                                <td><a href="#" class="tooltip" title="Set the speed of animations, in milliseconds">?</a></td>
    710700                                <td>Animation speed</td>
    711                                 <td><input class='option flex responsive nivo' type='text' size='5' name="settings[animationSpeed]" value='<?php echo $this->get_setting('animationSpeed') ?>' />ms</td>
     701                                <td><input class='option flex responsive nivo' type='text' size='5' name="settings[animationSpeed]" value='<?php echo $this->slider->get_setting('animationSpeed') ?>' />ms</td>
    712702                            </tr>
    713703                            <tr>
     
    715705                                <td>Navigation</td>
    716706                                <td>
    717                                     <input class='option coin responsive nivo flex' type='checkbox' name="settings[navigation]" <?php if ($this->get_setting('navigation') == 'true') echo 'checked=checked' ?> />
     707                                    <input class='option coin responsive nivo flex' type='checkbox' name="settings[navigation]" <?php if ($this->slider->get_setting('navigation') == 'true') echo 'checked=checked' ?> />
    718708                                </td>
    719709                            </tr>
     
    722712                                <td>Links</td>
    723713                                <td>
    724                                     <input class='option responsive nivo flex' type='checkbox' name="settings[links]" <?php if ($this->get_setting('links') == 'true') echo 'checked=checked' ?> />
     714                                    <input class='option responsive nivo flex' type='checkbox' name="settings[links]" <?php if ($this->slider->get_setting('links') == 'true') echo 'checked=checked' ?> />
    725715                                </td>
    726716                            </tr>
     
    729719                                <td>Hover pause</td>
    730720                                <td>
    731                                     <input class='option coin flex responsive nivo' type='checkbox' name="settings[hoverPause]" <?php if ($this->get_setting('hoverPause') == 'true') echo 'checked=checked' ?> />
     721                                    <input class='option coin flex responsive nivo' type='checkbox' name="settings[hoverPause]" <?php if ($this->slider->get_setting('hoverPause') == 'true') echo 'checked=checked' ?> />
    732722                                </td>
    733723                            </tr>
     
    736726                                <td>Reverse</td>
    737727                                <td>
    738                                     <input class='option flex' type='checkbox' name="settings[reverse]" <?php if ($this->get_setting('reverse') == 'true') echo 'checked=checked' ?> />
     728                                    <input class='option flex' type='checkbox' name="settings[reverse]" <?php if ($this->slider->get_setting('reverse') == 'true') echo 'checked=checked' ?> />
    739729                                </td>
    740730                            </tr>
     
    743733                                <td>Random</td>
    744734                                <td>
    745                                     <input type='checkbox' name="settings[random]" <?php if ($this->get_setting('random') == 'true') echo 'checked=checked' ?> />
     735                                    <input type='checkbox' name="settings[random]" <?php if ($this->slider->get_setting('random') == 'true') echo 'checked=checked' ?> />
    746736                                </td>
    747737                            </tr>
     
    750740                                <td>Print CSS</td>
    751741                                <td>
    752                                     <input type='checkbox' name="settings[printCss]" <?php if ($this->get_setting('printCss') == 'true') echo 'checked=checked' ?> />
     742                                    <input type='checkbox' name="settings[printCss]" <?php if ($this->slider->get_setting('printCss') == 'true') echo 'checked=checked' ?> />
    753743                                </td>
    754744                            </tr>
     
    757747                                <td>Print JS</td>
    758748                                <td>
    759                                     <input type='checkbox' name="settings[printJs]" <?php if ($this->get_setting('printJs') == 'true') echo 'checked=checked' ?> />
     749                                    <input type='checkbox' name="settings[printJs]" <?php if ($this->slider->get_setting('printJs') == 'true') echo 'checked=checked' ?> />
    760750                                </td>
    761751                            </tr>
     
    765755                                <td>
    766756                                    <select class='option flex' name="settings[direction]">
    767                                         <option value='horizontal' <?php if ($this->get_setting('direction') == 'horizontal') echo 'selected=selected' ?>>Horizontal</option>
    768                                         <option value='vertical' <?php if ($this->get_setting('direction') == 'vertical') echo 'selected=selected' ?>>Vertical</option>
     757                                        <option value='horizontal' <?php if ($this->slider->get_setting('direction') == 'horizontal') echo 'selected=selected' ?>>Horizontal</option>
     758                                        <option value='vertical' <?php if ($this->slider->get_setting('direction') == 'vertical') echo 'selected=selected' ?>>Vertical</option>
    769759                                    </select>                       
    770760                                </td>
     
    773763                                <td><a href="#" class="tooltip" title="Set the text for the 'previous' direction item">?</a></td>
    774764                                <td>Previous text</td>
    775                                 <td><input class='option flex responsive nivo' type='text' name="settings[prevText]" value='<?php if ($this->get_setting('prevText') != 'false') echo $this->get_setting('prevText') ?>' /></td>
     765                                <td><input class='option flex responsive nivo' type='text' name="settings[prevText]" value='<?php if ($this->slider->get_setting('prevText') != 'false') echo $this->slider->get_setting('prevText') ?>' /></td>
    776766                            </tr>
    777767                            <tr>
    778768                                <td><a href="#" class="tooltip" title="Set the text for the 'next' direction item">?</a></td>
    779769                                <td>Next text</td>
    780                                 <td><input class='option flex responsive nivo' type='text' name="settings[nextText]" value='<?php if ($this->get_setting('nextText') != 'false') echo $this->get_setting('nextText') ?>' /></td>
     770                                <td><input class='option flex responsive nivo' type='text' name="settings[nextText]" value='<?php if ($this->slider->get_setting('nextText') != 'false') echo $this->slider->get_setting('nextText') ?>' /></td>
    781771                            </tr>
    782772                            <tr>
    783773                                <td><a href="#" class="tooltip" title="Specify any custom CSS Classes you would like to be added to the slider wrapper">?</a></td>
    784774                                <td>CSS classes</td>
    785                                 <td><input type='text' name="settings[cssClass]" value='<?php if ($this->get_setting('cssClass') != 'false') echo $this->get_setting('cssClass') ?>' /></td>
     775                                <td><input type='text' name="settings[cssClass]" value='<?php if ($this->slider->get_setting('cssClass') != 'false') echo $this->slider->get_setting('cssClass') ?>' /></td>
    786776                            </tr>
    787777                        </tbody>
     
    797787                        <tbody>
    798788                            <tr>
    799                                 <td><textarea style="width: 100%">[ml-slider id=<?php echo $this->get_slider() ?>]</textarea></td>
     789                                <td><textarea style="width: 100%">[ml-slider id=<?php echo $this->slider->id ?>]</textarea></td>
    800790                            </tr>
    801791                        </tbody>
     
    803793
    804794                    <br />
    805                     <a class='alignright button-secondary confirm' href="?page=ml-slider&delete=<?php echo $this->get_slider() ?>">Delete Slider</a>
     795                    <a class='alignright button-secondary confirm' href="?page=ml-slider&delete=<?php echo $this->slider->id ?>">Delete Slider</a>
    806796                </div>
    807797            </form>
Note: See TracChangeset for help on using the changeset viewer.