Version Description
Download this release
Release Info
Developer | cbaldelomar |
Plugin | Shortcodes by Angie Makes |
Version | 1.26 |
Comparing to | |
See all releases |
Code changes from version 1.25 to 1.26
- README.md +6 -1
- includes/js/googlemap.js +9 -2
- includes/mce/js/shortcodes_tinymce.js +2 -2
- includes/shortcode-functions.php +9 -7
- readme.txt +6 -1
- wc-shortcodes.php +2 -2
README.md
CHANGED
@@ -65,9 +65,14 @@ Use the shortcode manager in the TinyMCE text editor
|
|
65 |
|
66 |
## Changelog ##
|
67 |
|
|
|
|
|
|
|
|
|
|
|
68 |
### Version 1.25
|
69 |
|
70 |
-
* force link in social media icons have http
|
71 |
* Fixed date format string on isotope posts shortcode.
|
72 |
|
73 |
### Version 1.24
|
65 |
|
66 |
## Changelog ##
|
67 |
|
68 |
+
### Version 1.26
|
69 |
+
|
70 |
+
* Separated accordion shortcodes when inserting into editor.
|
71 |
+
* Added option to display title on google map load.
|
72 |
+
|
73 |
### Version 1.25
|
74 |
|
75 |
+
* force link in social media icons have http at beginning
|
76 |
* Fixed date format string on isotope posts shortcode.
|
77 |
|
78 |
### Version 1.24
|
includes/js/googlemap.js
CHANGED
@@ -11,10 +11,11 @@ jQuery(function($){
|
|
11 |
$title = $(this).find('.title').val(),
|
12 |
$location = $(this).find('.location').val(),
|
13 |
$zoom = parseInt( $(this).find('.zoom').val() ),
|
|
|
14 |
geocoder, map;
|
15 |
-
|
16 |
geocoder = new google.maps.Geocoder();
|
17 |
-
|
18 |
geocoder.geocode( { 'address': $location}, function(results, status) {
|
19 |
|
20 |
if (status === google.maps.GeocoderStatus.OK) {
|
@@ -48,6 +49,12 @@ jQuery(function($){
|
|
48 |
google.maps.event.addListener(marker, 'click', function() {
|
49 |
infowindow.open(map,marker);
|
50 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
|
52 |
} else {
|
53 |
$('#'+ $map_id).html("Geocode was not successful for the following reason: " + status);
|
11 |
$title = $(this).find('.title').val(),
|
12 |
$location = $(this).find('.location').val(),
|
13 |
$zoom = parseInt( $(this).find('.zoom').val() ),
|
14 |
+
$titleOnLoad = parseInt( $(this).find('.title-on-load').val() ),
|
15 |
geocoder, map;
|
16 |
+
|
17 |
geocoder = new google.maps.Geocoder();
|
18 |
+
|
19 |
geocoder.geocode( { 'address': $location}, function(results, status) {
|
20 |
|
21 |
if (status === google.maps.GeocoderStatus.OK) {
|
49 |
google.maps.event.addListener(marker, 'click', function() {
|
50 |
infowindow.open(map,marker);
|
51 |
});
|
52 |
+
|
53 |
+
if ( 1 === $titleOnLoad ) {
|
54 |
+
google.maps.event.addDomListener(window, 'load', function() {
|
55 |
+
infowindow.open(map,marker);
|
56 |
+
});
|
57 |
+
}
|
58 |
|
59 |
} else {
|
60 |
$('#'+ $map_id).html("Geocode was not successful for the following reason: " + status);
|
includes/mce/js/shortcodes_tinymce.js
CHANGED
@@ -144,7 +144,7 @@
|
|
144 |
|
145 |
// Accordion
|
146 |
if(id === "accordion") {
|
147 |
-
tinyMCE.activeEditor.selection.setContent('<p>[wc_accordion collapse="0"][wc_accordion_section title="Section 1"]</p>' + wcParagraphContent + '<p>[/wc_accordion_section][wc_accordion_section title="Section 2"]</p>' + wcParagraphContent + '<p>[/wc_accordion_section][/wc_accordion]</p>');
|
148 |
}
|
149 |
|
150 |
|
@@ -274,7 +274,7 @@
|
|
274 |
|
275 |
// Google Map
|
276 |
if(id === "googlemap") {
|
277 |
-
tinyMCE.activeEditor.selection.setContent('[wc_googlemap title="St. Paul\'s Chapel" location="209 Broadway, New York, NY 10007" zoom="10" height="250"]');
|
278 |
}
|
279 |
|
280 |
|
144 |
|
145 |
// Accordion
|
146 |
if(id === "accordion") {
|
147 |
+
tinyMCE.activeEditor.selection.setContent('<p>[wc_accordion collapse="0"]</p><p>[wc_accordion_section title="Section 1"]</p>' + wcParagraphContent + '<p>[/wc_accordion_section]</p><p>[wc_accordion_section title="Section 2"]</p>' + wcParagraphContent + '<p>[/wc_accordion_section]</p><p>[/wc_accordion]</p>');
|
148 |
}
|
149 |
|
150 |
|
274 |
|
275 |
// Google Map
|
276 |
if(id === "googlemap") {
|
277 |
+
tinyMCE.activeEditor.selection.setContent('[wc_googlemap title="St. Paul\'s Chapel" location="209 Broadway, New York, NY 10007" zoom="10" height="250" title_on_load="no" class=""]');
|
278 |
}
|
279 |
|
280 |
|
includes/shortcode-functions.php
CHANGED
@@ -809,14 +809,15 @@ if (! function_exists( 'wc_shortcodes_googlemaps' ) ) :
|
|
809 |
function wc_shortcodes_googlemaps($atts, $content = null) {
|
810 |
|
811 |
extract(shortcode_atts(array(
|
812 |
-
'title' => '',
|
813 |
-
'
|
814 |
-
'
|
815 |
-
'height' => '300',
|
816 |
-
'zoom' => 8,
|
817 |
-
'
|
818 |
-
'class' => '',
|
819 |
), $atts));
|
|
|
|
|
820 |
|
821 |
// load scripts
|
822 |
wp_enqueue_script('wc-shortcodes-googlemap');
|
@@ -827,6 +828,7 @@ if (! function_exists( 'wc_shortcodes_googlemaps' ) ) :
|
|
827 |
$output .= (!empty($title)) ? '<input class="title" type="hidden" value="'.$title.'" />' : '';
|
828 |
$output .= '<input class="location" type="hidden" value="'.$location.'" />';
|
829 |
$output .= '<input class="zoom" type="hidden" value="'.$zoom.'" />';
|
|
|
830 |
$output .= '<div class="map_canvas"></div>';
|
831 |
$output .= '</div>';
|
832 |
|
809 |
function wc_shortcodes_googlemaps($atts, $content = null) {
|
810 |
|
811 |
extract(shortcode_atts(array(
|
812 |
+
'title' => '', // content inside the info window
|
813 |
+
'title_on_load' => 'no', // should the info window display on map load
|
814 |
+
'location' => '', // Enter a valid address that Google can geocode.
|
815 |
+
'height' => '300', // set the height of your google map in pixels
|
816 |
+
'zoom' => 8, // the lower the zoom, the farther away the map appears
|
817 |
+
'class' => '', // add a custom class to your google map
|
|
|
818 |
), $atts));
|
819 |
+
|
820 |
+
$title_on_load = 'yes' == $title_on_load ? 1 : 0;
|
821 |
|
822 |
// load scripts
|
823 |
wp_enqueue_script('wc-shortcodes-googlemap');
|
828 |
$output .= (!empty($title)) ? '<input class="title" type="hidden" value="'.$title.'" />' : '';
|
829 |
$output .= '<input class="location" type="hidden" value="'.$location.'" />';
|
830 |
$output .= '<input class="zoom" type="hidden" value="'.$zoom.'" />';
|
831 |
+
$output .= '<input class="title-on-load" type="hidden" value="'.$title_on_load.'" />';
|
832 |
$output .= '<div class="map_canvas"></div>';
|
833 |
$output .= '</div>';
|
834 |
|
readme.txt
CHANGED
@@ -86,9 +86,14 @@ Use the shortcode manager in the TinyMCE text editor
|
|
86 |
|
87 |
== Changelog ==
|
88 |
|
|
|
|
|
|
|
|
|
|
|
89 |
### Version 1.25
|
90 |
|
91 |
-
* force link in social media icons have http
|
92 |
* Fixed date format string on isotope posts shortcode.
|
93 |
|
94 |
### Version 1.24
|
86 |
|
87 |
== Changelog ==
|
88 |
|
89 |
+
### Version 1.26
|
90 |
+
|
91 |
+
* Separated accordion shortcodes when inserting into editor.
|
92 |
+
* Added option to display title on google map load.
|
93 |
+
|
94 |
### Version 1.25
|
95 |
|
96 |
+
* force link in social media icons have http at beginning
|
97 |
* Fixed date format string on isotope posts shortcode.
|
98 |
|
99 |
### Version 1.24
|
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.26
|
9 |
License: GPLv2 or later
|
10 |
*/
|
11 |
|
12 |
+
define( 'WC_SHORTCODES_VERSION', '1.26' );
|
13 |
define( 'WC_SHORTCODES_PREFIX', 'wc_shortcodes_' );
|
14 |
define( '_WC_SHORTCODES_PREFIX', '_wc_shortcodes_' );
|
15 |
define( 'WC_SHORTCODES_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|