Version Description
- Update maps with fall back to Iframe so API is not required.
- Fix: Contact head issue.
- Update: Meta Box call.
Download this release
Release Info
Developer | britner |
Plugin | Kadence Themes Toolkit |
Version | 4.9.1 |
Comparing to | |
See all releases |
Code changes from version 4.9.0 to 4.9.1
- class-virtue-toolkit-welcome.php +13 -15
- metaboxes.php +1 -16
- page-contact.php +32 -11
- readme.txt +7 -2
- virtue_toolkit.php +10 -8
class-virtue-toolkit-welcome.php
CHANGED
@@ -721,24 +721,22 @@ if ( ! class_exists( 'Virtue_Toolkit_Welcome' ) ) {
|
|
721 |
* Install Importer
|
722 |
*/
|
723 |
public function ajax_install_import_plugin() {
|
724 |
-
error_log('test');
|
725 |
if ( ! check_ajax_referer( 'install-plugin_kadence-importer', 'wpnonce' ) ) {
|
726 |
exit( 0 );
|
727 |
}
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
}
|
742 |
|
743 |
}
|
744 |
}
|
721 |
* Install Importer
|
722 |
*/
|
723 |
public function ajax_install_import_plugin() {
|
|
|
724 |
if ( ! check_ajax_referer( 'install-plugin_kadence-importer', 'wpnonce' ) ) {
|
725 |
exit( 0 );
|
726 |
}
|
727 |
+
$tgmpa_url = $this->tgmpa->get_tgmpa_url();
|
728 |
+
$json = array(
|
729 |
+
'url' => admin_url( 'themes.php?page=install-recommended-plugins' ),
|
730 |
+
'plugin' => array( 'kadence-importer' ),
|
731 |
+
'tgmpa-page' => 'install-recommended-plugins',
|
732 |
+
'plugin_status' => 'all',
|
733 |
+
'_wpnonce' => wp_create_nonce( 'bulk-plugins' ),
|
734 |
+
'action' => 'tgmpa-bulk-install',
|
735 |
+
'action2' => - 1,
|
736 |
+
'message' => esc_html__( 'Installing', 'virtue-toolkit' ),
|
737 |
+
);
|
738 |
+
wp_send_json( $json );
|
739 |
+
}
|
|
|
740 |
|
741 |
}
|
742 |
}
|
metaboxes.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
add_action( 'init', 'initialize_kadence_toolkit_meta_boxes', 10 );
|
4 |
function initialize_kadence_toolkit_meta_boxes() {
|
5 |
$the_theme = wp_get_theme();
|
@@ -10,9 +10,6 @@ function initialize_kadence_toolkit_meta_boxes() {
|
|
10 |
} else if( 'Ascend' == $the_theme->get( 'Name' ) || 'ascend' == $the_theme->get( 'Template') ) {
|
11 |
add_filter( 'cmb2_admin_init', 'kadence_toolkit_ascend_metabox');
|
12 |
}
|
13 |
-
if ( ! defined( 'CMB2_LOADED' ) ) {
|
14 |
-
require_once( VIRTUE_TOOLKIT_PATH . 'cmb/init.php' );
|
15 |
-
}
|
16 |
|
17 |
}
|
18 |
// Build Metaboxs for portfolio type select
|
@@ -903,18 +900,6 @@ function kadence_toolkit_virtue_metaboxes() {
|
|
903 |
'rand' => __("Random", 'virtue-toolkit' ),
|
904 |
),
|
905 |
) );
|
906 |
-
$kttk_portfolio_page->add_field( array(
|
907 |
-
'name' => __("Order Items By", 'virtue-toolkit' ),
|
908 |
-
'desc' => '',
|
909 |
-
'id' => $prefix . 'portfolio_order',
|
910 |
-
'type' => 'select',
|
911 |
-
'options' => array(
|
912 |
-
'menu_order' => __("Menu Order", 'virtue-toolkit' ),
|
913 |
-
'title' => __("Title", 'virtue-toolkit' ),
|
914 |
-
'date' => __("Date", 'virtue-toolkit' ),
|
915 |
-
'rand' => __("Random", 'virtue-toolkit' ),
|
916 |
-
),
|
917 |
-
) );
|
918 |
$kttk_portfolio_page->add_field( array(
|
919 |
'name' => __("Items per Page", 'virtue-toolkit' ),
|
920 |
'desc' => __('How many portfolio items per page', 'virtue-toolkit'),
|
1 |
<?php
|
2 |
+
require_once( VIRTUE_TOOLKIT_PATH . 'cmb/init.php' );
|
3 |
add_action( 'init', 'initialize_kadence_toolkit_meta_boxes', 10 );
|
4 |
function initialize_kadence_toolkit_meta_boxes() {
|
5 |
$the_theme = wp_get_theme();
|
10 |
} else if( 'Ascend' == $the_theme->get( 'Name' ) || 'ascend' == $the_theme->get( 'Template') ) {
|
11 |
add_filter( 'cmb2_admin_init', 'kadence_toolkit_ascend_metabox');
|
12 |
}
|
|
|
|
|
|
|
13 |
|
14 |
}
|
15 |
// Build Metaboxs for portfolio type select
|
900 |
'rand' => __("Random", 'virtue-toolkit' ),
|
901 |
),
|
902 |
) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
903 |
$kttk_portfolio_page->add_field( array(
|
904 |
'name' => __("Items per Page", 'virtue-toolkit' ),
|
905 |
'desc' => __('How many portfolio items per page', 'virtue-toolkit'),
|
page-contact.php
CHANGED
@@ -20,7 +20,7 @@ $form = get_post_meta( $post->ID, '_kad_contact_form', true );
|
|
20 |
if(isset($virtue['google_map_api']) && !empty($virtue['google_map_api'])) {
|
21 |
$gmap_api = $virtue['google_map_api'];
|
22 |
} else {
|
23 |
-
$gmap_api = '
|
24 |
}
|
25 |
if(!empty($height)) {
|
26 |
$mapheight = $height;
|
@@ -31,7 +31,9 @@ $form = get_post_meta( $post->ID, '_kad_contact_form', true );
|
|
31 |
$zoom = $mapzoom;
|
32 |
} else {
|
33 |
$zoom = 15;
|
34 |
-
}
|
|
|
|
|
35 |
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=<?php echo esc_attr($gmap_api);?>"></script>
|
36 |
<script type="text/javascript">
|
37 |
jQuery(window).load(function() {
|
@@ -88,6 +90,8 @@ $form = get_post_meta( $post->ID, '_kad_contact_form', true );
|
|
88 |
});
|
89 |
</script>
|
90 |
<?php echo '<style type="text/css" media="screen">#map_address {height:'.esc_attr($mapheight).'px; margin-bottom:20px;}</style>';
|
|
|
|
|
91 |
}
|
92 |
if(isset($_POST['submitted'])) {
|
93 |
if(isset($form_math) && $form_math == 'yes') {
|
@@ -146,17 +150,34 @@ $form = get_post_meta( $post->ID, '_kad_contact_form', true );
|
|
146 |
$emailSent = true;
|
147 |
}
|
148 |
|
149 |
-
}
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
|
|
156 |
<div id="mapheader" class="titleclass">
|
157 |
<div class="container">
|
158 |
-
|
159 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
</div><!--container-->
|
161 |
</div><!--titleclass-->
|
162 |
<?php } ?>
|
20 |
if(isset($virtue['google_map_api']) && !empty($virtue['google_map_api'])) {
|
21 |
$gmap_api = $virtue['google_map_api'];
|
22 |
} else {
|
23 |
+
$gmap_api = '';
|
24 |
}
|
25 |
if(!empty($height)) {
|
26 |
$mapheight = $height;
|
31 |
$zoom = $mapzoom;
|
32 |
} else {
|
33 |
$zoom = 15;
|
34 |
+
}
|
35 |
+
if ( ! empty( $gmap_api ) ) {
|
36 |
+
?>
|
37 |
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=<?php echo esc_attr($gmap_api);?>"></script>
|
38 |
<script type="text/javascript">
|
39 |
jQuery(window).load(function() {
|
90 |
});
|
91 |
</script>
|
92 |
<?php echo '<style type="text/css" media="screen">#map_address {height:'.esc_attr($mapheight).'px; margin-bottom:20px;}</style>';
|
93 |
+
|
94 |
+
}
|
95 |
}
|
96 |
if(isset($_POST['submitted'])) {
|
97 |
if(isset($form_math) && $form_math == 'yes') {
|
150 |
$emailSent = true;
|
151 |
}
|
152 |
|
153 |
+
}
|
154 |
+
|
155 |
+
/**
|
156 |
+
* @hooked virtue_page_title - 20
|
157 |
+
*/
|
158 |
+
do_action( 'virtue_page_title_container' );
|
159 |
+
|
160 |
+
if ($map == 'yes') { ?>
|
161 |
<div id="mapheader" class="titleclass">
|
162 |
<div class="container">
|
163 |
+
<?php if ( ! empty( $gmap_api ) ) { ?>
|
164 |
+
<div id="map_address">
|
165 |
+
</div>
|
166 |
+
<?php
|
167 |
+
} else {
|
168 |
+
if ( 'TERRAIN' === $maptype ) {
|
169 |
+
$maptype = 'p';
|
170 |
+
} elseif ( 'HYBRID' === $maptype ) {
|
171 |
+
$maptype = 'h';
|
172 |
+
} elseif ( 'SATELLITE' === $maptype ) {
|
173 |
+
$maptype = 'k';
|
174 |
+
} else {
|
175 |
+
$maptype = 'm';
|
176 |
+
}
|
177 |
+
$query_string = 'q=' . rawurlencode( $address ) . '&cid=&t=' . rawurlencode( $maptype ) . '¢er=' . rawurlencode( $address );
|
178 |
+
echo '<div class="kt-map"><iframe style="width:100%; max-width: 100%; border:0;" height="' . esc_attr( $mapheight ) . '" src="https://maps.google.com/maps?&' . esc_attr( htmlentities( $query_string ) ) . '&output=embed&z=' . esc_attr( $zoom ) . '&iwloc=A&visual_refresh=true"></iframe></div>';
|
179 |
+
|
180 |
+
}?>
|
181 |
</div><!--container-->
|
182 |
</div><!--titleclass-->
|
183 |
<?php } ?>
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: britner
|
3 |
Tags:
|
4 |
Requires at least: 4.2
|
5 |
-
Tested up to: 4.9.
|
6 |
-
Stable tag: 4.9.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -43,6 +43,11 @@ Install the plugin into the `/wp-content/plugins/` folder, and activate it.
|
|
43 |
|
44 |
== Changelog ==
|
45 |
|
|
|
|
|
|
|
|
|
|
|
46 |
= 4.9.0 =
|
47 |
* Update welcome page.
|
48 |
* Portfolio post using rest api.
|
2 |
Contributors: britner
|
3 |
Tags:
|
4 |
Requires at least: 4.2
|
5 |
+
Tested up to: 4.9.8
|
6 |
+
Stable tag: 4.9.1
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
43 |
|
44 |
== Changelog ==
|
45 |
|
46 |
+
= 4.9.1 =
|
47 |
+
* Update maps with fall back to Iframe so API is not required.
|
48 |
+
* Fix: Contact head issue.
|
49 |
+
* Update: Meta Box call.
|
50 |
+
|
51 |
= 4.9.0 =
|
52 |
* Update welcome page.
|
53 |
* Portfolio post using rest api.
|
virtue_toolkit.php
CHANGED
@@ -1,12 +1,14 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
Plugin Name: Kadence Toolkit
|
4 |
-
Description: Custom Portfolio and Shortcode functionality for free Kadence WordPress themes
|
5 |
-
Version: 4.9.
|
6 |
-
Author: Kadence Themes
|
7 |
-
Author URI: https://kadencethemes.com/
|
8 |
-
License: GPLv2 or later
|
9 |
-
|
|
|
|
|
10 |
|
11 |
/**
|
12 |
* Kadence Toolkit Activation
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Plugin Name: Kadence Toolkit
|
4 |
+
* Description: Custom Portfolio and Shortcode functionality for free Kadence WordPress themes
|
5 |
+
* Version: 4.9.1
|
6 |
+
* Author: Kadence Themes
|
7 |
+
* Author URI: https://kadencethemes.com/
|
8 |
+
* License: GPLv2 or later
|
9 |
+
*
|
10 |
+
* @package Kadence Toolkit
|
11 |
+
*/
|
12 |
|
13 |
/**
|
14 |
* Kadence Toolkit Activation
|