Version Description
Download this release
Release Info
Developer | cbaldelomar |
Plugin | Shortcodes by Angie Makes |
Version | 3.7 |
Comparing to | |
See all releases |
Code changes from version 3.6 to 3.7
- README.md +2 -1
- public/class-public.php +2 -1
- public/class-register.php +4 -0
- public/class-vars.php +2 -1
- readme.txt +2 -1
- wc-shortcodes.php +1 -1
README.md
CHANGED
@@ -66,8 +66,9 @@ Use the shortcode manager in the TinyMCE text editor
|
|
66 |
|
67 |
## Changelog ##
|
68 |
|
69 |
-
### Version 3.
|
70 |
|
|
|
71 |
* Fixed bug with JS error being produced when Google API Key was not inserted.
|
72 |
|
73 |
### Version 3.5
|
66 |
|
67 |
## Changelog ##
|
68 |
|
69 |
+
### Version 3.7
|
70 |
|
71 |
+
* Inserted message to encouarge google map users to enter API key.
|
72 |
* Fixed bug with JS error being produced when Google API Key was not inserted.
|
73 |
|
74 |
### Version 3.5
|
public/class-public.php
CHANGED
@@ -95,7 +95,8 @@ class WPC_Shortcodes_Public extends WPC_Shortcodes_Vars {
|
|
95 |
wp_register_script( 'wc-shortcodes-prettify', WC_SHORTCODES_PLUGIN_URL . 'public/assets/js/prettify.js', array ( ), $ver, true );
|
96 |
wp_register_script( 'wc-shortcodes-pre', WC_SHORTCODES_PLUGIN_URL . 'public/assets/js/pre.js', array ( 'jquery' ), $ver, true );
|
97 |
|
98 |
-
if ( $api_key = get_option( WC_SHORTCODES_PREFIX . 'google_maps_api_key'
|
|
|
99 |
wp_register_script( 'wc-shortcodes-googlemap-api', 'https://maps.googleapis.com/maps/api/js?key=' . urlencode( $api_key ), array('jquery'), $ver, true);
|
100 |
wp_register_script( 'wc-shortcodes-googlemap', WC_SHORTCODES_PLUGIN_URL . 'public/assets/js/googlemap.js', array('jquery', 'wc-shortcodes-googlemap-api'), $ver, true);
|
101 |
}
|
95 |
wp_register_script( 'wc-shortcodes-prettify', WC_SHORTCODES_PLUGIN_URL . 'public/assets/js/prettify.js', array ( ), $ver, true );
|
96 |
wp_register_script( 'wc-shortcodes-pre', WC_SHORTCODES_PLUGIN_URL . 'public/assets/js/pre.js', array ( 'jquery' ), $ver, true );
|
97 |
|
98 |
+
if ( $api_key = get_option( WC_SHORTCODES_PREFIX . 'google_maps_api_key' ) ) {
|
99 |
+
parent::$google_map_api_key = $api_key;
|
100 |
wp_register_script( 'wc-shortcodes-googlemap-api', 'https://maps.googleapis.com/maps/api/js?key=' . urlencode( $api_key ), array('jquery'), $ver, true);
|
101 |
wp_register_script( 'wc-shortcodes-googlemap', WC_SHORTCODES_PLUGIN_URL . 'public/assets/js/googlemap.js', array('jquery', 'wc-shortcodes-googlemap-api'), $ver, true);
|
102 |
}
|
public/class-register.php
CHANGED
@@ -864,6 +864,10 @@ class WPC_Shortcodes_Register extends WPC_Shortcodes_Vars {
|
|
864 |
static $instance = 0;
|
865 |
$instance++;
|
866 |
|
|
|
|
|
|
|
|
|
867 |
extract(shortcode_atts(array(
|
868 |
'title' => '', // content inside the info window
|
869 |
'title_on_load' => 'no', // should the info window display on map load
|
864 |
static $instance = 0;
|
865 |
$instance++;
|
866 |
|
867 |
+
if ( empty( parent::$google_map_api_key ) ) {
|
868 |
+
return '<div class="wc-shortcodes-googlemap-api-key-needed"><p>Google requires an <a href="https://developers.google.com/maps/documentation/javascript/get-api-key" target="_blank">API key</a> to embed Google Maps. Enter your key in your <a href="' . admin_url( 'themes.php?page=' . parent::$plugin_slug ) . '" target="_blank">Shortcodes option</a> page under the "Maps" tab.</p></div>';
|
869 |
+
}
|
870 |
+
|
871 |
extract(shortcode_atts(array(
|
872 |
'title' => '', // content inside the info window
|
873 |
'title_on_load' => 'no', // should the info window display on map load
|
public/class-vars.php
CHANGED
@@ -8,7 +8,7 @@ class WPC_Shortcodes_Vars {
|
|
8 |
*
|
9 |
* @var string
|
10 |
*/
|
11 |
-
const VERSION = '3.
|
12 |
const DB_VERSION = '1.0';
|
13 |
|
14 |
/**
|
@@ -32,6 +32,7 @@ class WPC_Shortcodes_Vars {
|
|
32 |
protected static $social_icons;
|
33 |
protected static $share_buttons;
|
34 |
protected static $theme_support;
|
|
|
35 |
public static $attr;
|
36 |
|
37 |
public static function init_vars() {
|
8 |
*
|
9 |
* @var string
|
10 |
*/
|
11 |
+
const VERSION = '3.7';
|
12 |
const DB_VERSION = '1.0';
|
13 |
|
14 |
/**
|
32 |
protected static $social_icons;
|
33 |
protected static $share_buttons;
|
34 |
protected static $theme_support;
|
35 |
+
protected static $google_map_api_key;
|
36 |
public static $attr;
|
37 |
|
38 |
public static function init_vars() {
|
readme.txt
CHANGED
@@ -88,8 +88,9 @@ Use the shortcode manager in the TinyMCE text editor
|
|
88 |
|
89 |
== Changelog ==
|
90 |
|
91 |
-
= Version 3.
|
92 |
|
|
|
93 |
* Fixed bug with JS error being produced when Google API Key was not inserted.
|
94 |
|
95 |
= Version 3.5 =
|
88 |
|
89 |
== Changelog ==
|
90 |
|
91 |
+
= Version 3.7 =
|
92 |
|
93 |
+
* Inserted message to encouarge google map users to enter API key.
|
94 |
* Fixed bug with JS error being produced when Google API Key was not inserted.
|
95 |
|
96 |
= Version 3.5 =
|
wc-shortcodes.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://webplantmedia.com/starter-themes/wordpresscanvas/features/sho
|
|
5 |
Description: A family of shortcodes to enhance site functionality.
|
6 |
Author: Chris Baldelomar
|
7 |
Author URI: http://webplantmedia.com/
|
8 |
-
Version: 3.
|
9 |
License: GPLv2 or later
|
10 |
*/
|
11 |
|
5 |
Description: A family of shortcodes to enhance site functionality.
|
6 |
Author: Chris Baldelomar
|
7 |
Author URI: http://webplantmedia.com/
|
8 |
+
Version: 3.7
|
9 |
License: GPLv2 or later
|
10 |
*/
|
11 |
|