Version Description
Download this release
Release Info
Developer | cbaldelomar |
Plugin | Shortcodes by Angie Makes |
Version | 1.22 |
Comparing to | |
See all releases |
Code changes from version 1.21 to 1.22
- README.md +4 -0
- includes/js/countdown.js +12 -1
- includes/mce/js/shortcodes_tinymce.js +1 -1
- includes/shortcode-functions.php +3 -1
- readme.txt +5 -1
- wc-shortcodes.php +2 -2
README.md
CHANGED
@@ -65,6 +65,10 @@ Use the shortcode manager in the TinyMCE text editor
|
|
65 |
|
66 |
## Changelog ##
|
67 |
|
|
|
|
|
|
|
|
|
68 |
### Version 1.21
|
69 |
|
70 |
* Better responsiveness logic for isotope posts.
|
65 |
|
66 |
## Changelog ##
|
67 |
|
68 |
+
### Version 1.22
|
69 |
+
|
70 |
+
* Added option for countdown shortcode to control labels.
|
71 |
+
|
72 |
### Version 1.21
|
73 |
|
74 |
* Better responsiveness logic for isotope posts.
|
includes/js/countdown.js
CHANGED
@@ -4,15 +4,26 @@
|
|
4 |
$(document).ready(function() {
|
5 |
|
6 |
$('.wc-shortcodes-countdown').each( function() {
|
7 |
-
var $this, date, until, message, format;
|
8 |
|
9 |
$this = $(this);
|
10 |
date = $this.data('date');
|
11 |
message = $this.data('message');
|
12 |
format = $this.data('format');
|
|
|
|
|
13 |
date = new Date( date );
|
14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
$this.countdown({
|
|
|
|
|
16 |
until: date,
|
17 |
format: format,
|
18 |
alwaysExpire: true,
|
4 |
$(document).ready(function() {
|
5 |
|
6 |
$('.wc-shortcodes-countdown').each( function() {
|
7 |
+
var $this, date, until, message, format, labels, labels1;
|
8 |
|
9 |
$this = $(this);
|
10 |
date = $this.data('date');
|
11 |
message = $this.data('message');
|
12 |
format = $this.data('format');
|
13 |
+
labels = $this.data('labels');
|
14 |
+
labels1 = $this.data('labels1');
|
15 |
date = new Date( date );
|
16 |
|
17 |
+
if ( labels ) {
|
18 |
+
var labels = labels.split(',')
|
19 |
+
}
|
20 |
+
if ( labels1 ) {
|
21 |
+
var labels1 = labels1.split(',')
|
22 |
+
}
|
23 |
+
|
24 |
$this.countdown({
|
25 |
+
labels: labels,
|
26 |
+
labels1: labels1,
|
27 |
until: date,
|
28 |
format: format,
|
29 |
alwaysExpire: true,
|
includes/mce/js/shortcodes_tinymce.js
CHANGED
@@ -364,7 +364,7 @@
|
|
364 |
if(id === "countdown") {
|
365 |
var d = new Date();
|
366 |
var year = d.getFullYear() + 1;
|
367 |
-
tinyMCE.activeEditor.selection.setContent('[wc_countdown date="July 23, '+year+', 6:00:00 PM" format="wdHMs" message="Your Message Here!"]');
|
368 |
}
|
369 |
|
370 |
|
364 |
if(id === "countdown") {
|
365 |
var d = new Date();
|
366 |
var year = d.getFullYear() + 1;
|
367 |
+
tinyMCE.activeEditor.selection.setContent('[wc_countdown date="July 23, '+year+', 6:00:00 PM" format="wdHMs" message="Your Message Here!" labels="Years,Months,Weeks,Days,Hours,Minutes,Seconds" labels1="Year,Month,Week,Day,Hour,Minute,Second"]');
|
368 |
}
|
369 |
|
370 |
|
includes/shortcode-functions.php
CHANGED
@@ -883,6 +883,8 @@ if( !function_exists('wc_shortcodes_countdown') ) {
|
|
883 |
extract( shortcode_atts( array(
|
884 |
'date' => '',
|
885 |
'format' => 'wdHMs',
|
|
|
|
|
886 |
'message' => 'Your Message Here!',
|
887 |
), $atts ) );
|
888 |
|
@@ -892,7 +894,7 @@ if( !function_exists('wc_shortcodes_countdown') ) {
|
|
892 |
|
893 |
wp_enqueue_script('wc-shortcodes-countdown');
|
894 |
|
895 |
-
$html = '<div class="wc-shortcodes-countdown" data-date="'.esc_attr( $date ).'" data-format="'.esc_attr( $format ).'" data-message="'.esc_attr( $message ).'"></div>';
|
896 |
$html = '<div class="wc-shortcodes-countdown-bg1">'.$html.'</div>';
|
897 |
$html = '<div class="wc-shortcodes-countdown-bg2">'.$html.'</div>';
|
898 |
$html = '<div class="wc-shortcodes-countdown-bg3">'.$html.'</div>';
|
883 |
extract( shortcode_atts( array(
|
884 |
'date' => '',
|
885 |
'format' => 'wdHMs',
|
886 |
+
'labels' => 'Years,Months,Weeks,Days,Hours,Minutes,Seconds',
|
887 |
+
'labels1' => 'Year,Month,Week,Day,Hour,Minute,Second',
|
888 |
'message' => 'Your Message Here!',
|
889 |
), $atts ) );
|
890 |
|
894 |
|
895 |
wp_enqueue_script('wc-shortcodes-countdown');
|
896 |
|
897 |
+
$html = '<div class="wc-shortcodes-countdown" data-labels="'.esc_attr($labels).'" data-labels1="'.esc_attr($labels1).'" data-date="'.esc_attr( $date ).'" data-format="'.esc_attr( $format ).'" data-message="'.esc_attr( $message ).'"></div>';
|
898 |
$html = '<div class="wc-shortcodes-countdown-bg1">'.$html.'</div>';
|
899 |
$html = '<div class="wc-shortcodes-countdown-bg2">'.$html.'</div>';
|
900 |
$html = '<div class="wc-shortcodes-countdown-bg3">'.$html.'</div>';
|
readme.txt
CHANGED
@@ -82,10 +82,14 @@ Use the shortcode manager in the TinyMCE text editor
|
|
82 |
15. Custom HTML
|
83 |
16. Code Snippets
|
84 |
17. Isotope / Masonry Posts
|
85 |
-
|
86 |
|
87 |
== Changelog ==
|
88 |
|
|
|
|
|
|
|
|
|
89 |
### Version 1.21
|
90 |
|
91 |
* Better responsiveness logic for isotope posts.
|
82 |
15. Custom HTML
|
83 |
16. Code Snippets
|
84 |
17. Isotope / Masonry Posts
|
85 |
+
18. Images with Flags
|
86 |
|
87 |
== Changelog ==
|
88 |
|
89 |
+
### Version 1.22
|
90 |
+
|
91 |
+
* Added option for countdown shortcode to control labels.
|
92 |
+
|
93 |
### Version 1.21
|
94 |
|
95 |
* Better responsiveness logic for isotope posts.
|
wc-shortcodes.php
CHANGED
@@ -5,11 +5,11 @@ Plugin URI: http://wordpresscanvas.com/features/shortcodes/
|
|
5 |
Description: A family of shortcodes to enhance site functionality.
|
6 |
Author: Chris Baldelomar
|
7 |
Author URI: http://webplantmedia.com/
|
8 |
-
Version: 1.
|
9 |
License: GPLv2 or later
|
10 |
*/
|
11 |
|
12 |
-
define( 'WC_SHORTCODES_VERSION', '1.
|
13 |
define( 'WC_SHORTCODES_PREFIX', 'wc_shortcodes_' );
|
14 |
define( '_WC_SHORTCODES_PREFIX', '_wc_shortcodes_' );
|
15 |
define( 'WC_SHORTCODES_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
5 |
Description: A family of shortcodes to enhance site functionality.
|
6 |
Author: Chris Baldelomar
|
7 |
Author URI: http://webplantmedia.com/
|
8 |
+
Version: 1.22
|
9 |
License: GPLv2 or later
|
10 |
*/
|
11 |
|
12 |
+
define( 'WC_SHORTCODES_VERSION', '1.22' );
|
13 |
define( 'WC_SHORTCODES_PREFIX', 'wc_shortcodes_' );
|
14 |
define( '_WC_SHORTCODES_PREFIX', '_wc_shortcodes_' );
|
15 |
define( 'WC_SHORTCODES_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|