Changeset 811833
- Timestamp:
- 11/28/2013 12:16:44 PM (12 years ago)
- Location:
- wp-slide-out-tab/tags/1.2
- Files:
-
- 3 edited
- 5 copied
-
. (copied) (copied from wp-slide-out-tab/trunk)
-
Thumbs.db (modified) (previous)
-
output.php (copied) (copied from wp-slide-out-tab/trunk/output.php) (1 diff)
-
readme.txt (copied) (copied from wp-slide-out-tab/trunk/readme.txt) (2 diffs)
-
settings.php (modified) (1 diff)
-
slide-out-tab-script.js (copied) (copied from wp-slide-out-tab/trunk/slide-out-tab-script.js) (3 diffs)
-
slide-out-tab.php (copied) (copied from wp-slide-out-tab/trunk/slide-out-tab.php) (4 diffs)
-
style.css (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wp-slide-out-tab/tags/1.2/output.php
r805843 r811833 8 8 9 9 <div id="slide-out-tab-content"> 10 <?php echo do_shortcode ( get_option ( "wp_slide_out_content") ); ?>10 <?php echo wpautop ( do_shortcode ( get_option ( "wp_slide_out_content" ) ) ); ?> 11 11 12 12 </div><!-- #slide-out-tab-content --> -
wp-slide-out-tab/tags/1.2/readme.txt
r805843 r811833 4 4 Requires at least: 3.7 5 5 Tested up to: 3.7.1 6 Stable tag: 1. 16 Stable tag: 1.2 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 = 44 Added auto-show setting 45 Minor style updates 46 Added auto paragraphing to tab content 47 43 48 = 1.1 = 44 49 Content now correctly displays shortcodes -
wp-slide-out-tab/tags/1.2/settings.php
r802739 r811833 64 64 65 65 </table> 66 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> 66 82 67 83 <script> -
wp-slide-out-tab/tags/1.2/slide-out-tab-script.js
r805843 r811833 1 1 // Scripts for Modal Alert 2 2 var auto = slide_out_vars.auto; 3 var delay = slide_out_vars.delay; 3 4 4 5 jQuery(document).ready(function($){ … … 6 7 $('#slide-out-tab-wrap').fadeIn(150); 7 8 // Set the position based on height of tab 8 tabheight=$('#slide-out-tab-tab').height() + 12;9 contentheight=$('#slide-out-tab-content').height() + 17;9 tabheight=$('#slide-out-tab-tab').height() + 26; 10 contentheight=$('#slide-out-tab-content').height() + 31; 10 11 console.log('asdf' + tabheight); 11 12 $('#slide-out-tab-wrap').css('bottom',tabheight+'px'); 12 13 // On click, slide the tab up and down 13 14 14 $('#slide-out-tab-tab').on('click',function(){ 15 slide_out_tab(); 16 }); 17 // If auto is set, slide up 18 if ( auto == 1 ) { 19 20 if(typeof(Storage)!=="undefined") { // We'll just register that the message has auto-displayed 21 var autoDisplay = sessionStorage.autoDisplay; 22 if ( autoDisplay != 1 ) { // If it hasn't displayed, then display it 23 timeout = setTimeout ( function(){ 24 slide_out_tab(); 25 }, delay ); 26 sessionStorage.autoDisplay = 1; 27 } 28 } else { // If it's an old browser, it'll just display 29 timeout = setTimeout ( function(){ 30 slide_out_tab(); 31 }, delay ); 32 } 33 } 34 // This is the function to slide up and down 35 function slide_out_tab() { 15 36 position = $('#slide-out-tab-wrap').css('bottom'); 16 37 newposition=0; … … 23 44 bottom: newposition+'px' 24 45 },150); 25 }); 46 clearTimeout(timeout); 47 } 48 }); 26 49 27 }); 50 -
wp-slide-out-tab/tags/1.2/slide-out-tab.php
r805843 r811833 1 1 <?php 2 2 3 /** 3 4 Plugin Name: Slide Out Tab 4 5 Plugin URI: http://catapultdesign.co.uk 5 6 Description: A slide out tab that can be used for marketing and promotional offers 6 Version: 1. 17 Version: 1.2 7 8 Author: Catapult 8 9 Author URI: http://catapultdesign.co.uk 9 10 License: GPL2 10 11 11 Copyright 2013 Catapult (email : [email protected])12 13 This program is free software; you can redistribute it and/or modify14 it under the terms of the GNU General Public License, version 2, as15 published by the Free Software Foundation.16 17 18 This program is distributed in the hope that it will be useful,19 but WITHOUT ANY WARRANTY; without even the implied warranty of20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the21 GNU General Public License for more details.22 23 24 You should have received a copy of the GNU General Public License25 along with this program; if not, write to the Free Software26 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA27 12 */ 28 13 … … 85 70 register_setting ( 'wp_slide_out_tab-group', 'wp_slide_out_border_color' ); 86 71 register_setting ( 'wp_slide_out_tab-group', 'wp_slide_out_text_color' ); 72 register_setting ( 'wp_slide_out_tab-group', 'wp_slide_out_auto' ); 73 register_setting ( 'wp_slide_out_tab-group', 'wp_slide_out_delay' ); 87 74 88 75 } … … 120 107 public function enqueue_scripts() { 121 108 if ( get_option ( 'wp_slide_out_enable' ) == 1 ) { // Only enqueue scripts if the tab is enabled 122 123 109 wp_enqueue_script( 'slide-out-tab-script', plugins_url ( 'slide-out-tab-script.js', __FILE__ ), array ( 'jquery' ), false, true ); 124 110 // Pass some dynamic data to the JavaScript 111 wp_localize_script ( 'slide-out-tab-script', 'slide_out_vars', 112 array ( 113 'auto' => get_option ( 'wp_slide_out_auto', 0 ), 114 'delay' => get_option ( 'wp_slide_out_delay', 500 ) 115 ) 116 ); 125 117 wp_enqueue_style( 'slide-out-tab-style', plugins_url ( 'style.css', __FILE__ ) ); 126 118 } … … 137 129 ?> 138 130 <style> 131 #slide-out-tab-wrap { 132 width: <?php echo get_option ( 'wp_slide_out_width', '400' ); ?>px; 133 } 139 134 #slide-out-tab-tab { 140 135 color: <?php echo $tab_color; ?>; -
wp-slide-out-tab/tags/1.2/style.css
r802739 r811833 19 19 background-color: #f1f1f1; 20 20 font-weight: bold; 21 height: 2 4px;22 padding: 6px 14px 2px;23 -webkit-border-top-left-radius: 4px;24 -webkit-border-top-right-radius: 4px;25 -moz-border-radius-topleft: 4px;26 -moz-border-radius-topright: 4px;27 border-top-left-radius: 4px;28 border-top-right-radius: 4px;29 border-top: 5px solid #fff;30 border-right: 5px solid #fff;31 border-left: 5px solid #fff;21 height: 25px; 22 padding: 15px 14px 6px; 23 -webkit-border-top-left-radius: 8px; 24 -webkit-border-top-right-radius: 8px; 25 -moz-border-radius-topleft: 8px; 26 -moz-border-radius-topright: 8px; 27 border-top-left-radius: 8px; 28 border-top-right-radius: 8px; 29 border-top: 7px solid #fff; 30 border-right: 7px solid #fff; 31 border-left: 7px solid #fff; 32 32 box-shadow: 0 -2px 6px -2px rgba(0,0,0,0.3); 33 33 } 34 34 #slide-out-tab-content { 35 35 position: absolute; 36 top: 32px;36 top: 46px; 37 37 left: 0; 38 38 background-color: #f1f1f1; 39 padding: 8px 14px;40 -webkit-border-top-right-radius: 4px;41 -moz-border-radius-topright: 4px;42 border-top-right-radius: 4px;43 border-top: 5px solid #fff;44 border-right: 5px solid #fff;45 border-left: 5px solid #fff;39 padding: 18px 14px 36px; 40 -webkit-border-top-right-radius: 8px; 41 -moz-border-radius-topright: 8px; 42 border-top-right-radius: 8px; 43 border-top: 7px solid #fff; 44 border-right: 7px solid #fff; 45 border-left: 7px solid #fff; 46 46 box-shadow: 0 -2px 6px -2px rgba(0,0,0,0.3); 47 47 }
Note: See TracChangeset
for help on using the changeset viewer.