Changeset 811947
- Timestamp:
- 11/28/2013 03:45:18 PM (12 years ago)
- Location:
- wp-slide-out-tab/tags/1.2.1
- Files:
-
- 3 edited
- 1 copied
-
. (copied) (copied from wp-slide-out-tab/trunk)
-
readme.txt (modified) (2 diffs)
-
settings.php (modified) (1 diff)
-
slide-out-tab.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-slide-out-tab/tags/1.2.1/readme.txt
r811834 r811947 4 4 Requires at least: 3.7 5 5 Tested up to: 3.7.1 6 Stable tag: 1.2 6 Stable tag: 1.2.1 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 41 41 == Changelog == 42 42 43 = 1.2.1 = 44 * Minor changes to settings screen 45 43 46 = 1.2 = 44 Added auto-show setting45 Minor style updates46 Added auto paragraphing to tab content47 * Added auto-show setting 48 * Minor style updates 49 * Added auto paragraphing to tab content 47 50 48 51 = 1.1 = 49 Content now correctly displays shortcodes52 * Content now correctly displays shortcodes 50 53 51 54 = 1.0.4 = 52 Updated plugin headers55 * Updated plugin headers 53 56 54 57 = 1.0.3 = 55 Style change58 * Style change 56 59 57 60 = 1.0.2 = 58 Style change61 * Style change 59 62 60 63 = 1.0.1 = 61 Added max-width to ensure compatibility with mobile devices64 * Added max-width to ensure compatibility with mobile devices 62 65 63 66 == Upgrade Notice == -
wp-slide-out-tab/tags/1.2.1/settings.php
r811834 r811947 6 6 ?> 7 7 <div class="wrap"> 8 <?php screen_icon(); ?> 8 9 <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=&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 --> 12 26 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 --> 14 63 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'); ?> 19 77 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"> 24 80 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> 33 85 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> 35 90 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> 38 99 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> 43 101 44 </table> 102 <h4>Styles</h4> 103 <table class="form-table"> 45 104 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> 47 109 48 <table class="form-table">110 </table> 49 111 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> 54 113 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"> 59 115 60 <tr valign="top">61 <th scope="row"><label for="wp_slide_out_text_color">Tab textcolor</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> 64 120 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 --> 66 163 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 --> 93 165 </div><!-- .wrap --> -
wp-slide-out-tab/tags/1.2.1/slide-out-tab.php
r811834 r811947 5 5 Plugin URI: http://catapultdesign.co.uk 6 6 Description: A slide out tab that can be used for marketing and promotional offers 7 Version: 1.2 7 Version: 1.2.1 8 8 Author: Catapult 9 9 Author URI: http://catapultdesign.co.uk … … 15 15 if( !class_exists ( 'WP_Slide_Out_Tab' ) ) { 16 16 17 18 17 class WP_Slide_Out_Tab { 19 20 18 21 19 /** * Construct the plugin object */ 22 20 23 21 public function __construct() { 24 25 22 // register actions 26 27 23 add_action('admin_init', array(&$this, 'admin_init')); 28 29 24 add_action('admin_menu', array(&$this, 'add_menu')); 30 31 25 add_action('admin_enqueue_scripts', array(&$this, 'enqueue_color_picker')); // Add the color picker to the admin 32 33 26 add_action('wp_enqueue_scripts', array(&$this, 'enqueue_scripts')); // Ensure we've got jQuery 34 27 add_action('wp_head', array(&$this, 'output_styles')); // Add custom styles to header 35 36 28 add_action('wp_footer', array(&$this, 'output_modal')); // Output the HTML for the modal 37 38 29 } 39 30 40 31 41 32 public static function activate() { 42 43 33 // Do nothing 44 45 34 } 46 35 47 36 48 37 public static function deactivate() { 49 50 38 // Do nothing 51 52 39 } 53 40 54 41 55 42 public function admin_init() { 56 57 43 $this->init_settings(); 58 59 44 } 60 45 61 46 62 47 public function init_settings() { 63 64 48 register_setting ( 'wp_slide_out_tab-group', 'wp_slide_out_enable' ); 65 49 register_setting ( 'wp_slide_out_tab-group', 'wp_slide_out_title' ); 66 67 50 register_setting ( 'wp_slide_out_tab-group', 'wp_slide_out_content' ); 68 51 register_setting ( 'wp_slide_out_tab-group', 'wp_slide_out_width' ); … … 72 55 register_setting ( 'wp_slide_out_tab-group', 'wp_slide_out_auto' ); 73 56 register_setting ( 'wp_slide_out_tab-group', 'wp_slide_out_delay' ); 74 75 57 } 76 58 77 59 78 60 public function add_menu() { 79 80 61 add_options_page ( 'Slide Out Tab settings', 'Slide Out Tab', 'manage_options', 'wp_slide_out_tab', array ( &$this, 'plugin_settings_page' ) ); 81 82 62 } 83 63 84 64 85 65 public function plugin_settings_page() { 86 87 66 if ( !current_user_can ( 'manage_options' ) ) { 88 89 67 wp_die ( __( 'You do not have sufficient permissions' ) ); 90 91 68 } 92 93 69 include ( sprintf ( "%s/settings.php", dirname (__FILE__) ) ); 94 70 … … 97 73 98 74 public function enqueue_color_picker() { 99 100 75 wp_enqueue_style( 'wp-color-picker' ); 101 102 76 wp_enqueue_script( 'wp-color-picker', admin_url( 'js/color-picker.min.js' ), array( 'iris' ), false, 1 ); 103 77 wp_enqueue_script ( 'dashboard' ); 104 78 } 105 79 … … 117 91 wp_enqueue_style( 'slide-out-tab-style', plugins_url ( 'style.css', __FILE__ ) ); 118 92 } 119 120 93 } 121 94 … … 151 124 } 152 125 153 154 126 public function output_modal() { 155 127 if ( get_option ( 'wp_slide_out_enable' ) == 1 ) { // Only output the tab if it's enabled 156 157 128 include ( sprintf ( "%s/output.php", dirname (__FILE__) ) ); 158 129 } 159 160 130 } 161 162 131 163 132 } // END class … … 169 138 if ( class_exists('WP_Slide_Out_Tab') ) { 170 139 171 172 140 // Installation and uninstallation hooks 173 141 174 142 register_activation_hook(__FILE__, array('WP_Slide_Out_Tab', 'activate')); 175 176 143 register_deactivation_hook(__FILE__, array('WP_Slide_Out_Tab', 'deactivate')); 177 144 178 179 145 // instantiate the plugin class 180 181 146 $wp_slide_out_tab = new WP_Slide_Out_Tab(); 182 147 183 184 148 }
Note: See TracChangeset
for help on using the changeset viewer.