Plugin Directory

Changeset 811948


Ignore:
Timestamp:
11/28/2013 03:45:40 PM (12 years ago)
Author:
Catapult
Message:

Committing 1.2.1

Location:
wp-slide-out-tab/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • wp-slide-out-tab/trunk/readme.txt

    r811834 r811948  
    44Requires at least: 3.7
    55Tested up to: 3.7.1
    6 Stable tag: 1.2
     6Stable tag: 1.2.1
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4141== Changelog ==
    4242
     43= 1.2.1 =
     44* Minor changes to settings screen
     45
    4346= 1.2 =
    44 Added auto-show setting
    45 Minor style updates
    46 Added auto paragraphing to tab content
     47* Added auto-show setting
     48* Minor style updates
     49* Added auto paragraphing to tab content
    4750
    4851= 1.1 =
    49 Content now correctly displays shortcodes
     52* Content now correctly displays shortcodes
    5053
    5154= 1.0.4 =
    52 Updated plugin headers
     55* Updated plugin headers
    5356
    5457= 1.0.3 =
    55 Style change
     58* Style change
    5659
    5760= 1.0.2 =
    58 Style change
     61* Style change
    5962
    6063= 1.0.1 =
    61 Added max-width to ensure compatibility with mobile devices
     64* Added max-width to ensure compatibility with mobile devices
    6265
    6366== Upgrade Notice ==
  • wp-slide-out-tab/trunk/settings.php

    r811834 r811948  
    66?>
    77<div class="wrap">
     8    <?php screen_icon(); ?>
    89    <h2>Slide Out Tab</h2>
    9     <form method="post" action="options.php">
    10         <?php @settings_fields('wp_slide_out_tab-group'); ?>
    11         <?php @do_settings_fields('wp_slide_out_tab-group'); ?>
     10    <div id="poststuff" class="metabox-holder has-right-sidebar">
     11        <div id="side-info-column" class="inner-sidebar">
     12            <div id="side-sortables" class="meta-box-sortables ui-sortable">
     13                <div class="postbox like-postbox">
     14                    <div class="handlediv" title="Click to toggle"><br></div>
     15                    <h3 class="hndle"><span>Did this plugin help you?</span></h3>
     16                    <div class="inside">
     17                        <div class="like-widget">
     18                        <p>If this plugin helped you out in your project, please show your support:</p>
     19                        <ul>
     20                            <li><a target="_blank" href="http://wordpress.org/plugins/wp-slide-out-tab/">Rate it</a></li>
     21                            <li><a target="_blank" href="http://twitter.com/share?url=&amp;text=Check out the Slide Out Tab plugin for WordPress from @_catapult_ - it's sweet: http://bit.ly/1avnpe5">Tweet it</a></li>
     22                        </ul>
     23                        </div>
     24                    </div>
     25                </div><!-- .postbox -->
    1226
    13         <table class="form-table">
     27                <div class="postbox like-postbox">
     28                    <div class="handlediv" title="Click to toggle"><br></div>
     29                    <h3 class="hndle"><span>Other plugins you might like</span></h3>
     30                    <div class="inside">
     31                        <div class="like-widget">
     32                        <p>If you liked this plugin, you may care to try the following:</p>
     33                        <ul>
     34                            <li><a target="_blank" href="http://wordpress.org/plugins/uk-cookie-consent/">Cookie consent</a>
     35                            <p>A straightforward approach to help you comply with the EU regulations regarding usage of website cookies.</p>                           
     36                            </li>
     37                        </ul>
     38                        </div>
     39                    </div>
     40                </div><!-- .postbox -->
     41               
     42                <div class="postbox rss-postbox">
     43                    <div class="handlediv" title="Click to toggle"><br></div>
     44                    <h3 class="hndle"><span>Support</span></h3>
     45                    <div class="inside">
     46                        <div class="rss-widget">
     47                            <?php
     48                                wp_widget_rss_output(array(
     49                                    'url' => 'http://wordpress.org/support/rss/plugin/wp-slide-out-tab',
     50                                    'title' => 'Latest from the support forum',
     51                                    'items' => 3,
     52                                    'show_summary' => 1,
     53                                    'show_author' => 0,
     54                                'show_date' => 1,
     55                                ));
     56                            ?>
     57                            <ul>
     58                            </ul>
     59                        </div>
     60                        <p><a href="http://wordpress.org/support/plugin/wp-slide-out-tab" title="Forum">Check out the forum</a></p>
     61                    </div>
     62                </div><!-- .postbox -->
    1463
    15             <tr valign="top">
    16                 <th scope="row"><label for="wp_slide_out_enable">Enable tab</label></th>
    17                 <td><input type="checkbox" id="wp_slide_out_enable" name="wp_slide_out_enable" value="1" <?php checked ( get_option ( 'wp_slide_out_enable' ), 1, true ); ?> /></td>
    18             </tr>
     64                           
     65            </div>
     66        </div><!-- #side-info-column -->
     67        <div id="post-body">
     68            <div id="post-body-content">
     69                <div class="meta-box-sortables ui-sortable">
     70                    <div class="postbox">
     71                        <div class="handlediv" title="Click to toggle"><br /></div>
     72                        <h3 class="hndle">Settings</h3>
     73                        <div class="inside">
     74                            <form method="post" action="options.php">
     75                                <?php @settings_fields('wp_slide_out_tab-group'); ?>
     76                                <?php @do_settings_fields('wp_slide_out_tab-group'); ?>
    1977
    20             <tr valign="top">
    21                 <th scope="row"><label for="wp_slide_out_title">Title</label></th>
    22                 <td><input type="text" name="wp_slide_out_title" id="wp_slide_out_title" value="<?php echo get_option ( 'wp_slide_out_title' ); ?>" /></td>
    23             </tr>
     78                                <h4>Content</h4>
     79                                <table class="form-table">
    2480
    25             <tr valign="top">
    26                 <?php $settings = array (
    27                     'textarea_name' => 'wp_slide_out_content',
    28                     'media_buttons' => true
    29                 ); ?>
    30                 <th scope="row"><label for="wp_slide_out_content">Content</label></th>
    31                 <td><?php wp_editor ( get_option ( 'wp_slide_out_content' ), 'wp_slide_out_content', $settings ); ?></td>
    32             </tr>
     81                                    <tr valign="top">
     82                                        <th scope="row"><label for="wp_slide_out_enable">Enable tab</label></th>
     83                                        <td><input type="checkbox" id="wp_slide_out_enable" name="wp_slide_out_enable" value="1" <?php checked ( get_option ( 'wp_slide_out_enable' ), 1, true ); ?> /></td>
     84                                    </tr>
    3385
    34         </table>
     86                                    <tr valign="top">
     87                                        <th scope="row"><label for="wp_slide_out_title">Title</label></th>
     88                                        <td><input size="50" type="text" name="wp_slide_out_title" id="wp_slide_out_title" value="<?php echo get_option ( 'wp_slide_out_title' ); ?>" /></td>
     89                                    </tr>
    3590
    36         <h3>Styles</h3>
    37         <table class="form-table">
     91                                    <tr valign="top">
     92                                        <?php $settings = array (
     93                                            'textarea_name' => 'wp_slide_out_content',
     94                                            'media_buttons' => true
     95                                        ); ?>
     96                                        <th scope="row"><label for="wp_slide_out_content">Content</label></th>
     97                                        <td><?php wp_editor ( get_option ( 'wp_slide_out_content' ), 'wp_slide_out_content', $settings ); ?></td>
     98                                    </tr>
    3899
    39             <tr valign="top">
    40                 <th scope="row"><label for="wp_slide_out_width">Tab content width</label></th>
    41                 <td><input size="5" value="<?php echo absint ( get_option ( 'wp_slide_out_width', '400' ) ); ?>" name="wp_slide_out_width" id="wp_slide_out_width" type="text" /> px</td>
    42             </tr>
     100                                </table>
    43101
    44         </table>
     102                                <h4>Styles</h4>
     103                                <table class="form-table">
    45104
    46         <h3>Colors</h3>
     105                                    <tr valign="top">
     106                                        <th scope="row"><label for="wp_slide_out_width">Tab content width</label></th>
     107                                        <td><input size="5" value="<?php echo absint ( get_option ( 'wp_slide_out_width', '400' ) ); ?>" name="wp_slide_out_width" id="wp_slide_out_width" type="text" /> px</td>
     108                                    </tr>
    47109
    48         <table class="form-table">
     110                                </table>
    49111
    50             <tr valign="top">
    51                 <th scope="row"><label for="wp_slide_out_bg_color">Tab background color</label></th>
    52                 <td><input value="<?php echo get_option ( 'wp_slide_out_bg_color' ); ?>" name="wp_slide_out_bg_color" id="wp_slide_out_bg_color" type="text" class="color-picker" data-default-color="#f1f1f1" /></td>
    53             </tr>
     112                                <h4>Colors</h4>
    54113
    55             <tr valign="top">
    56                 <th scope="row"><label for="wp_slide_out_border_color">Tab border color</label></th>
    57                 <td><input value="<?php echo get_option ( 'wp_slide_out_border_color' ); ?>" name="wp_slide_out_border_color" id="wp_slide_out_border_color" type="text" class="color-picker" data-default-color="#ffffff" /></td>
    58             </tr>
     114                                <table class="form-table">
    59115
    60             <tr valign="top">
    61                 <th scope="row"><label for="wp_slide_out_text_color">Tab text color</label></th>
    62                 <td><input value="<?php echo get_option ( 'wp_slide_out_text_color' ); ?>" name="wp_slide_out_text_color" id="wp_slide_out_text_color" type="text" class="color-picker" data-default-color="#666666" /></td>
    63             </tr>
     116                                    <tr valign="top">
     117                                        <th scope="row"><label for="wp_slide_out_bg_color">Tab background color</label></th>
     118                                        <td><input value="<?php echo get_option ( 'wp_slide_out_bg_color' ); ?>" name="wp_slide_out_bg_color" id="wp_slide_out_bg_color" type="text" class="color-picker" data-default-color="#f1f1f1" /></td>
     119                                    </tr>
    64120
    65         </table>
     121                                    <tr valign="top">
     122                                        <th scope="row"><label for="wp_slide_out_border_color">Tab border color</label></th>
     123                                        <td><input value="<?php echo get_option ( 'wp_slide_out_border_color' ); ?>" name="wp_slide_out_border_color" id="wp_slide_out_border_color" type="text" class="color-picker" data-default-color="#ffffff" /></td>
     124                                    </tr>
     125
     126                                    <tr valign="top">
     127                                        <th scope="row"><label for="wp_slide_out_text_color">Tab text color</label></th>
     128                                        <td><input value="<?php echo get_option ( 'wp_slide_out_text_color' ); ?>" name="wp_slide_out_text_color" id="wp_slide_out_text_color" type="text" class="color-picker" data-default-color="#666666" /></td>
     129                                    </tr>
     130
     131                                </table>
     132                               
     133                                <h4>Options</h4>
     134
     135                                <table class="form-table">
     136
     137                                    <tr valign="top">
     138                                        <th scope="row"><label for="wp_slide_out_auto">Auto show on first page?</label></th>
     139                                        <td><input type="checkbox" id="wp_slide_out_auto" name="wp_slide_out_auto" value="1" <?php checked ( get_option ( 'wp_slide_out_auto' ), 1, true ); ?> /></td>
     140                                    </tr>
     141                                   
     142                                    <tr valign="top">
     143                                        <th scope="row"><label for="wp_slide_out_delay">Auto show delay</label></th>
     144                                        <td><input size="5" value="<?php echo absint ( get_option ( 'wp_slide_out_delay', '500' ) ); ?>" name="wp_slide_out_delay" id="wp_slide_out_delay" type="text" /> ms</td>
     145                                    </tr>
     146
     147                                </table>
     148
     149                                <script>
     150                                    jQuery(document).ready(function($){
     151                                        $('.color-picker').wpColorPicker();
     152                                    });
     153                                </script>
     154
     155                                <?php @submit_button(); ?>
     156
     157                            </form>
     158                        </div>
     159                    </div><!-- .postbox -->
     160                </div><!-- .meta-box-sortables -->
     161            </div><!-- #post-body-content -->
     162        </div><!-- #post-body -->
    66163       
    67         <h3>Options</h3>
    68 
    69         <table class="form-table">
    70 
    71             <tr valign="top">
    72                 <th scope="row"><label for="wp_slide_out_auto">Auto show on first page?</label></th>
    73                 <td><input type="checkbox" id="wp_slide_out_auto" name="wp_slide_out_auto" value="1" <?php checked ( get_option ( 'wp_slide_out_auto' ), 1, true ); ?> /></td>
    74             </tr>
    75            
    76             <tr valign="top">
    77                 <th scope="row"><label for="wp_slide_out_delay">Auto show delay</label></th>
    78                 <td><input size="5" value="<?php echo absint ( get_option ( 'wp_slide_out_delay', '500' ) ); ?>" name="wp_slide_out_delay" id="wp_slide_out_delay" type="text" /> ms</td>
    79             </tr>
    80 
    81         </table>
    82 
    83         <script>
    84             jQuery(document).ready(function($){
    85                 $('.color-picker').wpColorPicker();
    86             });
    87         </script>
    88 
    89         <?php @submit_button(); ?>
    90 
    91     </form>
    92 
     164    </div><!-- # post-stuff -->
    93165</div><!-- .wrap -->
  • wp-slide-out-tab/trunk/slide-out-tab.php

    r811834 r811948  
    55Plugin URI: http://catapultdesign.co.uk
    66Description: A slide out tab that can be used for marketing and promotional offers
    7 Version: 1.2
     7Version: 1.2.1
    88Author: Catapult
    99Author URI: http://catapultdesign.co.uk
     
    1515if( !class_exists ( 'WP_Slide_Out_Tab' ) ) {
    1616
    17 
    1817    class WP_Slide_Out_Tab {
    19 
    2018
    2119        /** * Construct the plugin object */
    2220
    2321        public function __construct() {
    24 
    2522        // register actions
    26 
    2723            add_action('admin_init', array(&$this, 'admin_init'));
    28 
    2924            add_action('admin_menu', array(&$this, 'add_menu'));
    30 
    3125            add_action('admin_enqueue_scripts', array(&$this, 'enqueue_color_picker')); // Add the color picker to the admin
    32 
    3326            add_action('wp_enqueue_scripts', array(&$this, 'enqueue_scripts')); // Ensure we've got jQuery
    3427            add_action('wp_head', array(&$this, 'output_styles')); // Add custom styles to header
    35 
    3628            add_action('wp_footer', array(&$this, 'output_modal')); // Output the HTML for the modal
    37 
    3829        }
    3930
    4031
    4132        public static function activate() {
    42 
    4333            // Do nothing
    44 
    4534        }
    4635
    4736
    4837        public static function deactivate() {
    49 
    5038            // Do nothing
    51 
    5239        }
    5340
    5441
    5542        public function admin_init() {
    56 
    5743            $this->init_settings();
    58 
    5944        }
    6045
    6146
    6247        public function init_settings() {
    63 
    6448            register_setting ( 'wp_slide_out_tab-group', 'wp_slide_out_enable' );
    6549            register_setting ( 'wp_slide_out_tab-group', 'wp_slide_out_title' );
    66 
    6750            register_setting ( 'wp_slide_out_tab-group', 'wp_slide_out_content' );
    6851            register_setting ( 'wp_slide_out_tab-group', 'wp_slide_out_width' );
     
    7255            register_setting ( 'wp_slide_out_tab-group', 'wp_slide_out_auto' );
    7356            register_setting ( 'wp_slide_out_tab-group', 'wp_slide_out_delay' );
    74 
    7557        }
    7658
    7759
    7860        public function add_menu() {
    79 
    8061            add_options_page ( 'Slide Out Tab settings', 'Slide Out Tab', 'manage_options', 'wp_slide_out_tab', array ( &$this, 'plugin_settings_page' ) );
    81 
    8262        }
    8363
    8464
    8565        public function plugin_settings_page() {
    86 
    8766            if ( !current_user_can ( 'manage_options' ) ) {
    88 
    8967                wp_die ( __( 'You do not have sufficient permissions' ) );
    90 
    9168            }
    92 
    9369            include ( sprintf ( "%s/settings.php", dirname (__FILE__) ) );
    9470
     
    9773
    9874        public function enqueue_color_picker() {
    99 
    10075            wp_enqueue_style( 'wp-color-picker' );
    101 
    10276            wp_enqueue_script( 'wp-color-picker', admin_url( 'js/color-picker.min.js' ), array( 'iris' ), false, 1 );
    103 
     77            wp_enqueue_script ( 'dashboard' );
    10478        }
    10579
     
    11791                wp_enqueue_style( 'slide-out-tab-style', plugins_url ( 'style.css', __FILE__ ) );
    11892            }
    119 
    12093        }
    12194
     
    151124        }
    152125
    153 
    154126        public function output_modal() {
    155127            if ( get_option ( 'wp_slide_out_enable' ) == 1 ) { // Only output the tab if it's enabled
    156 
    157128                include ( sprintf ( "%s/output.php", dirname (__FILE__) ) );
    158129            }
    159 
    160130        }
    161 
    162131
    163132    } // END class
     
    169138if ( class_exists('WP_Slide_Out_Tab') ) {
    170139
    171 
    172140    // Installation and uninstallation hooks
    173141
    174142    register_activation_hook(__FILE__, array('WP_Slide_Out_Tab', 'activate'));
    175 
    176143    register_deactivation_hook(__FILE__, array('WP_Slide_Out_Tab', 'deactivate'));
    177144
    178 
    179145    // instantiate the plugin class
    180 
    181146    $wp_slide_out_tab = new WP_Slide_Out_Tab();
    182147
    183 
    184148}
Note: See TracChangeset for help on using the changeset viewer.