Changeset 1737605
- Timestamp:
- 09/28/2017 08:44:08 AM (9 years ago)
- Location:
- blog-clock
- Files:
-
- 12 edited
-
assets/css/custom-backend.css (modified) (1 diff)
-
assets/css/frontend.css (modified) (2 diffs)
-
assets/js/custom-backend.js (modified) (3 diffs)
-
trunk/assets/css/custom-backend.css (modified) (1 diff)
-
trunk/assets/css/frontend.css (modified) (2 diffs)
-
trunk/assets/js/custom-backend.js (modified) (3 diffs)
-
trunk/bc-blog-clock.php (modified) (2 diffs)
-
trunk/class/class.clock.php (modified) (1 diff)
-
trunk/class/class.widget.php (modified) (5 diffs)
-
trunk/readme.txt (modified) (5 diffs)
-
trunk/views/admin/admin-template.php (modified) (2 diffs)
-
trunk/views/main-template.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
blog-clock/assets/css/custom-backend.css
r1732592 r1737605 1139 1139 } 1140 1140 1141 1142 1143 1144 1141 #shorrtcode_generated{ 1142 font-weight:bold; 1143 } 1144 1145 -
blog-clock/assets/css/frontend.css
r1732592 r1737605 29 29 h2.blog-clock-title a, .blog-clock-container h1.blog-clock-time a, .blog-clock-container h1.blog-clock-time a:hover 30 30 h2.blog-clock-title a:hover{text-decoration:none !important; 31 box-shadow:none !important; 31 32 } 32 33 … … 156 157 157 158 } 159 160 .clock-left{ 161 float:left; 162 163 } 164 165 .clock-right{ 166 float:right; 167 168 } 169 170 171 .clock-center { 172 float:none; 173 margin:auto !important; 174 } 175 176 177 .content-clock-left{ 178 float:left; 179 margin-right:20px; 180 181 } 182 183 .content-clock-right{ 184 float:right; 185 margin-left:20px; 186 187 } 188 189 190 .content-clock-center { 191 float:none; 192 margin:auto !important; 193 } 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 -
blog-clock/assets/js/custom-backend.js
r1732592 r1737605 1 jQuery(document).ready(function () { 1 jQuery(document).ready(function ($) { 2 3 4 $( "#clockWidth" ).change(function() { 5 width=$("#clockWidth").val(); 6 align=$("#clockAlign").val(); 7 $( "#shorrtcode_generated" ).html('[wbcp_blog_clock width="'+width+'%" align="'+align+'"]') 8 9 10 11 }); 12 13 $( "#clockAlign" ).change(function() { 14 width=$("#clockWidth").val(); 15 align=$("#clockAlign").val(); 16 $( "#shorrtcode_generated" ).html('[wbcp_blog_clock width="'+width+'%" align="'+align+'"]') 17 18 19 20 }); 2 21 3 22 … … 151 170 152 171 153 154 172 //var showSec = (sec < 10) ? '0' + sec: sec; 155 173 … … 182 200 183 201 202 184 203 }); -
blog-clock/trunk/assets/css/custom-backend.css
r1733977 r1737605 1139 1139 } 1140 1140 1141 1142 1143 1144 1141 #shorrtcode_generated{ 1142 font-weight:bold; 1143 } 1144 1145 -
blog-clock/trunk/assets/css/frontend.css
r1733977 r1737605 29 29 h2.blog-clock-title a, .blog-clock-container h1.blog-clock-time a, .blog-clock-container h1.blog-clock-time a:hover 30 30 h2.blog-clock-title a:hover{text-decoration:none !important; 31 box-shadow:none !important; 31 32 } 32 33 … … 156 157 157 158 } 159 160 .clock-left{ 161 float:left; 162 163 } 164 165 .clock-right{ 166 float:right; 167 168 } 169 170 171 .clock-center { 172 float:none; 173 margin:auto !important; 174 } 175 176 177 .content-clock-left{ 178 float:left; 179 margin-right:20px; 180 181 } 182 183 .content-clock-right{ 184 float:right; 185 margin-left:20px; 186 187 } 188 189 190 .content-clock-center { 191 float:none; 192 margin:auto !important; 193 } 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 -
blog-clock/trunk/assets/js/custom-backend.js
r1733977 r1737605 1 jQuery(document).ready(function () { 1 jQuery(document).ready(function ($) { 2 3 4 $( "#clockWidth" ).change(function() { 5 width=$("#clockWidth").val(); 6 align=$("#clockAlign").val(); 7 $( "#shorrtcode_generated" ).html('[wbcp_blog_clock width="'+width+'%" align="'+align+'"]') 8 9 10 11 }); 12 13 $( "#clockAlign" ).change(function() { 14 width=$("#clockWidth").val(); 15 align=$("#clockAlign").val(); 16 $( "#shorrtcode_generated" ).html('[wbcp_blog_clock width="'+width+'%" align="'+align+'"]') 17 18 19 20 }); 2 21 3 22 … … 151 170 152 171 153 154 172 //var showSec = (sec < 10) ? '0' + sec: sec; 155 173 … … 182 200 183 201 202 184 203 }); -
blog-clock/trunk/bc-blog-clock.php
r1732592 r1737605 23 23 24 24 25 Version: 1. 125 Version: 1.2 26 26 27 27 … … 143 143 144 144 145 define( 'WBCP_VERSION', '1. 1' );145 define( 'WBCP_VERSION', '1.2' ); 146 146 147 147 -
blog-clock/trunk/class/class.clock.php
r1732592 r1737605 809 809 810 810 811 public static function wbcp_shortcode () { 812 813 811 public static function wbcp_shortcode ($atts) { 812 813 ?> 814 <div style="width:<?php echo $atts['width'];?>" class="<?php echo "content-clock-".$atts['align'];?> "> 815 816 <?php 814 817 815 818 self::wbcp_view( 'main' ); 816 819 817 820 ?> 821 </div> 822 <?php 818 823 819 824 } -
blog-clock/trunk/class/class.widget.php
r1677938 r1737605 1 1 <?php 2 3 2 4 3 5 … … 5 7 if ( ! defined( 'ABSPATH' ) ) { 6 8 9 7 10 exit; // Exit if accessed directly. 11 8 12 9 13 } … … 11 15 12 16 17 18 13 19 class WBCP_TextWidget extends WP_Widget { 20 14 21 15 22 function __construct() { 16 23 24 17 25 parent::__construct( 26 18 27 19 28 'wpb_widget', 20 29 30 21 31 __( 'Blog Clock', 'wpb_widget_domain' ), 32 22 33 23 34 array( 'description' => __( 'Blog clock widget', 'wpb_widget_domain' ), ) 24 35 36 25 37 ); 38 26 39 27 40 } … … 29 42 30 43 31 public function form () { ?> 44 45 46 public function form ( $instance) { ?> 47 32 48 33 49 <p> 34 50 35 <?php echo __( 'Make your changes on the widget settings page located in the tools menu.' ); ?> 51 52 <?php echo __( 'Make other changes on the widget settings page located in the tools menu.' ); ?> 53 36 54 37 55 </p> 56 <p> 57 <label for="<?php echo $this->get_field_id('clockWidth'); ?>">Clock Width:</label> 58 <select id="<?php echo $this->get_field_id('clockWidth'); ?>" name="<?php echo $this->get_field_name('clockWidth'); ?>"> 59 <option <?php selected($instance['clockWidth'], '100');?> value="100">100%</option> 60 <option <?php selected($instance['clockWidth'], '90');?>value="90">90%</option> 61 <option <?php selected($instance['cloclWidth'], '80');?> value="80">80%</option> 62 <option <?php selected($instance['clockWidth'], '70');?> value="70">70%</option> 63 <option <?php selected($instance['clockWidth'], '60');?>value="60">60%</option> 64 <option <?php selected($instance['clockWidth'], '50');?> value="50">50%</option> 65 <option <?php selected($instance['clockWidth'], '40');?> value="40">40%</option> 66 <option <?php selected($instance['clockWidth'], '30');?>value="30">30%</option> 67 <option <?php selected($instance['clockWidth'], '20');?> value="20">20%</option> 68 69 </select> 70 </p> 71 <p> 72 <label for="<?php echo $this->get_field_id('float'); ?>">Alignment:</label> 73 <select id="<?php echo $this->get_field_id('float'); ?>" name="<?php echo $this->get_field_name('float'); ?>"> 74 <option <?php selected($instance['float'], 'left');?> value="left">Left</option> 75 <option <?php selected($instance['float'], 'center');?>value="center">Center</option> 76 <option <?php selected($instance['float'], 'right');?> value="right">Right</option> 77 </select> 78 </p> 79 80 38 81 39 82 <?php } … … 41 84 42 85 86 87 43 88 public function widget( $args, $instance ) { 44 89 ?> 90 <div style="width:<?php echo $instance['clockWidth']."%";?>" class="<?php echo "clock-".$instance['float'];?> widget "> 91 <?php 45 92 echo WBCP_Clock::wbcp_view( 'main' ); 46 93 94 ?> 95 </div> 96 <div class="clear"></div> 97 <?php 47 98 } 99 48 100 49 101 } 50 102 103 51 104 ?> -
blog-clock/trunk/readme.txt
r1733963 r1737605 12 12 13 13 14 Put a clock (time) on your blog or website in any timezone of your choosing, use it as a widget or shortcode, customizable colors/text.14 Put a clock (time) on your blog/website in any timezone of your choosing, use a widget or shortcode, customizable text, colors, alignment, width & more. Time updates in realtime. 15 15 16 16 … … 20 20 21 21 22 Put a clock on your blog or website in any timezone of your choosing, use it as a widget or use the handy shortcode within an article, easy to use interface for changing the style, heading and colors.22 Put a clock on your blog or website in any timezone of your choosing, use it as a widget or use the handy shortcode, easy to use interface for changing the timezone, text, colors, size and alignment. Time updates in realtime. 23 23 24 24 … … 28 28 29 29 30 - Plugin adds a clock to your blog. The clock updates in realtime30 - Plugin adds clock/time to your wesite. The clock updates in realtime 31 31 without slowing down your website or having to refresh the page. 32 32 33 - Display sthe clock anywhere on your website using a short code or simple widget.33 - Display the clock anywhere on your website using a short code or simple widget. 34 34 35 - Ability to choose time zone to display thedesired time.35 - Ability to choose timezone to display your desired time. 36 36 37 37 - Ability to customize and even hide the title of the clock. … … 41 41 - Select the time format. 12 or 24. 42 42 43 - Shortcode to display in a post is: [wbcp_blog_clock] 43 - Shortcode to display in a post is: [wbcp_blog_clock width="100%" align="center"] 44 45 - Change width (size of clock). 46 47 - Set alignment. Left, center, right. 44 48 45 49 … … 95 99 * Second release. Plugin rebuilt to feature realtime updating. No page refresh needed to get the current time. 96 100 101 = 1.2 = 97 102 103 * Third release. Shortcode generator built and widget updated to support width and alignment customizing. 98 104 99 105 == Arbitrary section == -
blog-clock/trunk/views/admin/admin-template.php
r1732592 r1737605 166 166 </div> 167 167 168 169 </div> 170 171 172 <div> 173 174 175 <label for="title"><strong>Generate Shortcode:</strong></label> 176 177 178 <label for="clockWidth">Clock Width:</label> 179 <select id="clockWidth" name="clockWidth"> 180 <option value="100">100%</option> 181 <option value="90">90%</option> 182 <option value="80">80%</option> 183 <option value="70">70%</option> 184 <option value="60">60%</option> 185 <option value="50">50%</option> 186 <option value="40">40%</option> 187 <option value="30">30%</option> 188 <option value="20">20%</option> 189 190 </select> 191 <label for="clockAlign">Alignment:</label> 192 <select id="clockAlign" name="clockAlign"> 193 <option value="center">Center</option> 194 <option value="left">Left</option> 195 <option value="right">Right</option> 196 197 </select> 198 <div id="shorrtcode_generated">[wbcp_blog_clock width="100%" align="center"]</div> 168 199 169 200 </div> … … 177 208 <h2>The different ways to display the blog clock: </h2> 178 209 <ol> 179 <li>Use the shortcode : [wbcp_blog_clock]</li>210 <li>Use the shortcode generator to get your custom shortcode.</li> 180 211 <li>Go to the widget page and drag the blog clock widget to any widget area.</li> 181 212 </ol> -
blog-clock/trunk/views/main-template.php
r1732592 r1737605 70 70 71 71 72 if ( ! empty( $instance['title'] ) ) { 73 echo $args['before_title'] . apply_filters( 'widget_title', $instance['title'] ) . $args['after_title']; 74 } 72 75 73 76 ?> … … 75 78 76 79 77 <div class="blog-clock-container" style=" background-color: <?php echo $obj->background ?>; color: <?php $obj->color; ?>">80 <div class="blog-clock-container" style=" width:<?php echo $_REQUEST['width'];?>; background-color: <?php echo $obj->background ?>; color: <?php $obj->color; ?>"> 78 81 79 82
Note: See TracChangeset
for help on using the changeset viewer.