Kadence Themes Toolkit - Version 4.9.0

Version Description

  • Update welcome page.
  • Portfolio post using rest api.
Download this release

Release Info

Developer britner
Plugin Icon wp plugin Kadence Themes Toolkit
Version 4.9.0
Comparing to
See all releases

Code changes from version 4.8 to 4.9.0

assets/toolkit_admin.css CHANGED
@@ -25,4 +25,17 @@ white-space: normal;
25
  .cmb2-metabox .cmb2-media-status .img-status img {
26
  max-width: 150px;
27
  height: auto;
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  }
25
  .cmb2-metabox .cmb2-media-status .img-status img {
26
  max-width: 150px;
27
  height: auto;
28
+ }
29
+ .wp-admin #side-sortables .cmb2-wrap>.cmb-field-list>.cmb-row {
30
+ padding: 5px 0 10px;
31
+ }
32
+
33
+ .wp-admin #side-sortables .cmb-th {
34
+ padding-bottom: 0;
35
+ }
36
+
37
+ .wp-admin #side-sortables .cmb-th label {
38
+ color: #222;
39
+ font-weight: 600;
40
+ font-size: 12px;
41
  }
class-virtue-toolkit-welcome.php ADDED
@@ -0,0 +1,746 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Build Welcome Page
4
+ *
5
+ * @package Virtue Toolkit
6
+ */
7
+
8
+ if ( ! defined( 'ABSPATH' ) ) {
9
+ exit;
10
+ }
11
+
12
+ if ( ! class_exists( 'Virtue_Toolkit_Welcome' ) ) {
13
+
14
+ /**
15
+ * Build Welcome Page class
16
+ *
17
+ * @category class
18
+ */
19
+ class Virtue_Toolkit_Welcome {
20
+ /**
21
+ * Current theme.
22
+ *
23
+ * @var object WP_Theme
24
+ */
25
+ private $my_theme;
26
+ /**
27
+ * Current theme name.
28
+ *
29
+ * @var string theme name
30
+ */
31
+ public $theme_name;
32
+ /**
33
+ * Current theme title.
34
+ *
35
+ * @var string theme title
36
+ */
37
+ public $theme_title;
38
+ /**
39
+ * TGMPA instance.
40
+ *
41
+ * @var object
42
+ */
43
+ public $tgmpa;
44
+ /**
45
+ * Class version.
46
+ *
47
+ * @var string
48
+ */
49
+ public $version = '1.0.0';
50
+ /**
51
+ * Class Constructor.
52
+ */
53
+ public function __construct() {
54
+ if ( is_admin() ) {
55
+ $this->my_theme = wp_get_theme(); // Get theme data object.
56
+ if ( 'Ascend' === $this->my_theme->get( 'Name' ) || 'ascend' === $this->my_theme->get( 'Template' ) ) {
57
+ $this->theme_name = 'Ascend';
58
+ $this->theme_title = 'Ascend Theme';
59
+ } elseif ( 'Virtue' === $this->my_theme->get( 'Name' ) || 'virtue' === $this->my_theme->get( 'Template' ) ) {
60
+ $this->theme_name = 'Virtue';
61
+ $this->theme_title = 'Virtue Theme';
62
+ } elseif ( 'Pinnacle' === $this->my_theme->get( 'Name' ) || 'pinnacle' === $this->my_theme->get( 'Template' ) ) {
63
+ $this->theme_name = 'Pinnacle';
64
+ $this->theme_title = 'Pinnacle Theme';
65
+ } else {
66
+ $this->theme_name = 'Not Kadence';
67
+ $this->theme_title = 'Not Kadence';
68
+ }
69
+ if ( 'Not Kadence' !== $this->theme_name ) {
70
+ add_action( 'admin_menu', array( $this, 'add_menu' ) );
71
+ add_action( 'tgmpa_register', array( $this, 'register_importer' ), 30 );
72
+ add_filter( 'plugin_action_links_virtue-toolkit/virtue_toolkit.php', array( $this, 'add_settings_link' ) );
73
+ }
74
+ add_action( 'wp_ajax_kadence_import_plugin', array( $this, 'ajax_install_import_plugin' ), 10, 0 );
75
+ add_action( 'admin_init', array( $this, 'load_tgmpa_installer' ), 1 );
76
+ }
77
+ }
78
+ /**
79
+ * Load Installer
80
+ */
81
+ public function load_tgmpa_installer() {
82
+ if ( class_exists( 'TGM_Plugin_Activation' ) ) {
83
+ $this->tgmpa = isset( $GLOBALS['tgmpa'] ) ? $GLOBALS['tgmpa'] : TGM_Plugin_Activation::get_instance();
84
+ }
85
+ }
86
+ /**
87
+ * Add option page menu
88
+ */
89
+ public function add_menu() {
90
+ $page = add_theme_page( __( 'Getting Started with: ', 'virtue-toolkit' ) . $this->theme_name, esc_html__( 'Getting Started', 'virtue-toolkit' ), 'manage_options', 'kadence_welcome_page', array( $this, 'config_page' ) );
91
+ add_action( 'admin_print_styles-' . $page, array( $this, 'css_scripts' ) );
92
+ }
93
+ /**
94
+ * Loads admin style sheets
95
+ */
96
+ public function css_scripts() {
97
+ wp_enqueue_style( 'toolkit-welcome-css', VIRTUE_TOOLKIT_URL . '/welcome/toolkit-welcome.css', array(), $this->version, 'all' );
98
+ wp_enqueue_script( 'toolkit-welcome-js', VIRTUE_TOOLKIT_URL . '/welcome/toolkit-welcome.js', array( 'jquery' ), $this->version, true );
99
+ wp_localize_script( 'toolkit-welcome-js', 'toolkit_welcome_params', array(
100
+ 'ajaxurl' => admin_url( 'admin-ajax.php' ),
101
+ 'wpnonce' => wp_create_nonce( 'install-plugin_kadence-importer' ),
102
+ ) );
103
+ }
104
+
105
+ /**
106
+ * Loads config page
107
+ */
108
+ public function config_page() {
109
+ if ( 'Not Kadence' === $this->theme_name ) { ?>
110
+ <div class="wrap kt_theme_welcome">
111
+ <h2 class="notices"></h2>
112
+ <div class="kt_title_area">
113
+ <h1>
114
+ <?php echo esc_html__( 'The Kadence Toolkit is only designed to work with Kadence Themes', 'virtue-toolkit' ); ?>
115
+ </h1>
116
+ </div>
117
+ </div>
118
+ <?php
119
+ } else {
120
+ ?>
121
+ <div class="wrap kt_theme_welcome">
122
+ <svg aria-hidden="true" style="position: absolute; width: 0; height: 0; overflow: hidden;" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
123
+ <defs>
124
+ <symbol id="kt-svg-icon-mbri-extension" viewBox="0 0 32 32">
125
+ <title>mbri-extension</title>
126
+ <path d="M25.131 0.465c-0.619-0.619-1.643-0.619-2.261 0l-6.404 6.404c-0.619 0.619-0.619 1.643 0 2.261l6.404 6.405c0.619 0.619 1.643 0.619 2.261 0l6.405-6.404c0.619-0.619 0.619-1.643 0-2.261l-6.405-6.405zM24.378 1.22l6.403 6.403c0.215 0.215 0.215 0.539 0 0.754l-6.403 6.404c-0.215 0.215-0.539 0.215-0.754 0l-6.404-6.404c-0.215-0.215-0.215-0.539 0-0.754l6.404-6.403c0.215-0.215 0.539-0.215 0.754 0zM17.6 19.2c-0.877 0-1.6 0.723-1.6 1.6v9.6c0 0.877 0.723 1.6 1.6 1.6h9.6c0.877 0 1.6-0.723 1.6-1.6v-9.6c0-0.877-0.723-1.6-1.6-1.6h-9.6zM17.6 20.267h9.6c0.305 0 0.533 0.228 0.533 0.533v9.6c0 0.305-0.228 0.533-0.533 0.533h-9.6c-0.305 0-0.533-0.228-0.533-0.533v-9.6c0-0.305 0.228-0.533 0.533-0.533zM1.6 3.2c-0.877 0-1.6 0.723-1.6 1.6v9.6c0 0.877 0.723 1.6 1.6 1.6h9.6c0.877 0 1.6-0.723 1.6-1.6v-9.6c0-0.877-0.723-1.6-1.6-1.6h-9.6zM1.6 4.267h9.6c0.305 0 0.533 0.228 0.533 0.533v9.6c0 0.305-0.228 0.533-0.533 0.533h-9.6c-0.305 0-0.533-0.228-0.533-0.533v-9.6c0-0.305 0.228-0.533 0.533-0.533zM1.6 19.2c-0.877 0-1.6 0.723-1.6 1.6v9.6c0 0.877 0.723 1.6 1.6 1.6h9.6c0.877 0 1.6-0.723 1.6-1.6v-9.6c0-0.877-0.723-1.6-1.6-1.6h-9.6zM1.6 20.267h9.6c0.305 0 0.533 0.228 0.533 0.533v9.6c0 0.305-0.228 0.533-0.533 0.533h-9.6c-0.305 0-0.533-0.228-0.533-0.533v-9.6c0-0.305 0.228-0.533 0.533-0.533z"></path>
127
+ </symbol>
128
+ <symbol id="kt-svg-icon-mbri-edit" viewBox="0 0 32 32">
129
+ <title>mbri-edit</title>
130
+ <path d="M29.856 6.866c-0.619-0.619-1.643-0.619-2.261 0l-0.462 0.461c-0.619 0.619-0.619 1.643 0 2.261l1.678 1.679c0.621 0.619 1.643 0.619 2.263 0l0.461-0.462c0.619-0.619 0.619-1.641 0-2.261l-1.679-1.678zM29.103 7.62l1.678 1.678c0.215 0.215 0.215 0.539 0 0.754l-0.462 0.462c-0.213 0.215-0.539 0.215-0.754 0l-1.678-1.678c-0.215-0.215-0.215-0.539 0-0.754l0.462-0.462c0.215-0.215 0.539-0.215 0.754 0zM25.466 9.604c-0.32-0.026-0.71 0.064-1.001 0.356l-10.976 10.995c-0.199 0.203-0.411 0.412-0.537 0.738-0.125 0.326-0.151 0.683-0.151 1.239v1.6c0 0.539 0.459 1.067 1.067 1.067h1.6c0.559 0 0.923-0.032 1.248-0.158 0.326-0.128 0.537-0.338 0.73-0.531l10.976-10.997c0.528-0.529 0.48-1.34 0-1.82l-2.133-2.133c-0.226-0.224-0.501-0.331-0.821-0.356zM25.532 10.714l2.133 2.133c0.041 0.041 0.081 0.233 0 0.314l-10.976 10.995c-0.192 0.192-0.249 0.249-0.359 0.292-0.112 0.043-0.354 0.085-0.864 0.085h-1.599v-1.6c0-0.512 0.041-0.752 0.082-0.859 0.041-0.107 0.096-0.163 0.295-0.363l10.976-10.997c0.096-0.096 0.263-0.048 0.311 0zM4.8 11.733h13.867c0.295 0 0.533 0.238 0.533 0.533s-0.238 0.533-0.533 0.533h-13.867c-0.295 0-0.533-0.238-0.533-0.533s0.238-0.533 0.533-0.533zM4.8 8.533h13.867c0.295 0 0.533 0.238 0.533 0.533s-0.238 0.533-0.533 0.533h-13.867c-0.295 0-0.533-0.238-0.533-0.533s0.238-0.533 0.533-0.533zM4.8 5.333h13.867c0.295 0 0.533 0.238 0.533 0.533s-0.238 0.533-0.533 0.533h-13.867c-0.295 0-0.533-0.238-0.533-0.533s0.238-0.533 0.533-0.533zM1.6 0c-0.877 0-1.6 0.723-1.6 1.6v28.8c0 0.877 0.723 1.6 1.6 1.6h20.267c0.877 0 1.6-0.723 1.6-1.6v-8.533c0-0.713-1.067-0.691-1.067 0v8.533c0 0.305-0.228 0.533-0.533 0.533h-20.267c-0.305 0-0.533-0.228-0.533-0.533v-28.8c0-0.305 0.228-0.533 0.533-0.533h20.267c0.305 0 0.533 0.228 0.533 0.533v7.467c0 0.717 1.067 0.691 1.067 0v-7.467c0-0.877-0.723-1.6-1.6-1.6z"></path>
131
+ </symbol>
132
+ <symbol id="kt-svg-icon-browser" viewBox="0 0 42 32">
133
+ <title>browser</title>
134
+ <path d="M41.5 10c-0.276 0-0.5 0.224-0.5 0.5v20c0 0.276-0.224 0.5-0.5 0.5h-39c-0.276 0-0.5-0.224-0.5-0.5v-20c0-0.276-0.224-0.5-0.5-0.5s-0.5 0.224-0.5 0.5v20c0 0.827 0.673 1.5 1.5 1.5h39c0.827 0 1.5-0.673 1.5-1.5v-20c0-0.276-0.224-0.5-0.5-0.5zM40.5 0h-39c-0.827 0-1.5 0.673-1.5 1.5v6c0 0.276 0.224 0.5 0.5 0.5h41c0.276 0 0.5-0.224 0.5-0.5v-6c0-0.827-0.673-1.5-1.5-1.5zM41 7h-40v-5.5c0-0.276 0.224-0.5 0.5-0.5h39c0.276 0 0.5 0.224 0.5 0.5v5.5zM17.5 28c0.276 0 0.5-0.224 0.5-0.5v-16c0-0.276-0.224-0.5-0.5-0.5h-13c-0.276 0-0.5 0.224-0.5 0.5v16c0 0.276 0.224 0.5 0.5 0.5h13zM5 12h12v15h-12v-15zM22.5 15h15c0.276 0 0.5-0.224 0.5-0.5s-0.224-0.5-0.5-0.5h-15c-0.276 0-0.5 0.224-0.5 0.5s0.224 0.5 0.5 0.5zM22.5 20h15c0.276 0 0.5-0.224 0.5-0.5s-0.224-0.5-0.5-0.5h-15c-0.276 0-0.5 0.224-0.5 0.5s0.224 0.5 0.5 0.5zM22.5 25h15c0.276 0 0.5-0.224 0.5-0.5s-0.224-0.5-0.5-0.5h-15c-0.276 0-0.5 0.224-0.5 0.5s0.224 0.5 0.5 0.5zM3 4c0 0.552 0.448 1 1 1s1-0.448 1-1c0-0.552-0.448-1-1-1s-1 0.448-1 1zM7 4c0 0.552 0.448 1 1 1s1-0.448 1-1c0-0.552-0.448-1-1-1s-1 0.448-1 1zM11 4c0 0.552 0.448 1 1 1s1-0.448 1-1c0-0.552-0.448-1-1-1s-1 0.448-1 1z"></path>
135
+ </symbol>
136
+ <symbol id="kt-svg-icon-adjustments" viewBox="0 0 33 32">
137
+ <title>adjustments</title>
138
+ <path d="M31 0h-29c-0.822 0-2 1.178-2 2v28c0 0.822 1.178 2 2 2h29c0.822 0 2-1.178 2-2v-28c0-0.822-1.178-2-2-2zM32 30c-0.006 0.284-0.716 0.994-1 1h-29c-0.284-0.006-0.994-0.716-1-1v-28c0.006-0.284 0.716-0.994 1-1h29c0.284 0.006 0.994 0.716 1 1v28zM16.5 5.5c-1.103 0-2 0.897-2 2s0.897 2 2 2 2-0.897 2-2-0.897-2-2-2zM16.5 8.5c-0.551 0-1-0.449-1-1s0.449-1 1-1 1 0.449 1 1-0.449 1-1 1zM24.5 21.5c-1.103 0-2 0.897-2 2s0.897 2 2 2 2-0.897 2-2-0.897-2-2-2zM24.5 24.5c-0.551 0-1-0.449-1-1s0.449-1 1-1 1 0.449 1 1-0.449 1-1 1zM8.5 16.5c-1.103 0-2 0.897-2 2s0.897 2 2 2 2-0.897 2-2-0.897-2-2-2zM8.5 19.5c-0.551 0-1-0.449-1-1s0.449-1 1-1 1 0.449 1 1-0.449 1-1 1zM8.5 15c0.276 0 0.5-0.224 0.5-0.5v-9c0-0.276-0.224-0.5-0.5-0.5s-0.5 0.224-0.5 0.5v9c0 0.276 0.224 0.5 0.5 0.5zM8.5 22c-0.276 0-0.5 0.224-0.5 0.5v3c0 0.276 0.224 0.5 0.5 0.5s0.5-0.224 0.5-0.5v-3c0-0.276-0.224-0.5-0.5-0.5zM16.5 11c-0.276 0-0.5 0.224-0.5 0.5v14c0 0.276 0.224 0.5 0.5 0.5s0.5-0.224 0.5-0.5v-14c0-0.276-0.224-0.5-0.5-0.5zM24.5 20c0.276 0 0.5-0.224 0.5-0.5v-14c0-0.276-0.224-0.5-0.5-0.5s-0.5 0.224-0.5 0.5v14c0 0.276 0.224 0.5 0.5 0.5z"></path>
139
+ </symbol>
140
+ <symbol id="kt-svg-icon-envelope" viewBox="0 0 38 32">
141
+ <title>envelope</title>
142
+ <path d="M20.060 0.413c-0.58-0.533-1.539-0.533-2.119 0l-17.688 10.671c-0.15 0.091-0.242 0.253-0.242 0.428v18.922c0 0.863 0.706 1.566 1.574 1.566h34.83c0.868 0 1.574-0.703 1.574-1.566v-18.922c0-0.175-0.092-0.337-0.242-0.428l-17.687-10.671zM18.504 1.24c0.035-0.021 0.066-0.046 0.095-0.074 0.108-0.107 0.25-0.166 0.401-0.166s0.293 0.059 0.4 0.166c0.029 0.028 0.061 0.053 0.095 0.074l17.227 10.394-12.478 7.436c-0.237 0.142-0.315 0.448-0.174 0.686 0.094 0.157 0.26 0.244 0.43 0.244 0.087 0 0.175-0.022 0.255-0.070l12.245-7.29v17.757l-16.935-11.266c-0.538-0.429-1.594-0.429-2.096-0.025l-16.969 11.286v-17.752l12.244 7.29c0.080 0.048 0.169 0.070 0.256 0.070 0.17 0 0.336-0.087 0.43-0.244 0.141-0.237 0.063-0.544-0.174-0.686l-12.479-7.436 17.227-10.394zM36.090 31h-34.188l16.656-11.086c0.173-0.138 0.712-0.137 0.919 0.025l16.613 11.061zM6.5 13h25c0.276 0 0.5-0.224 0.5-0.5s-0.224-0.5-0.5-0.5h-25c-0.276 0-0.5 0.224-0.5 0.5s0.224 0.5 0.5 0.5z"></path>
143
+ </symbol>
144
+ <symbol id="kt-svg-icon-presentation" viewBox="0 0 31 32">
145
+ <title>presentation</title>
146
+ <path d="M0.5 3c-0.276 0-0.5 0.224-0.5 0.5v17c0 0.827 0.673 1.5 1.5 1.5h28c0.827 0 1.5-0.673 1.5-1.5v-17c0-0.276-0.224-0.5-0.5-0.5s-0.5 0.224-0.5 0.5v17c0 0.276-0.224 0.5-0.5 0.5h-28c-0.276 0-0.5-0.224-0.5-0.5v-17c0-0.276-0.224-0.5-0.5-0.5zM32.5 0h-34c-0.276 0-0.5 0.224-0.5 0.5s0.224 0.5 0.5 0.5h34c0.276 0 0.5-0.224 0.5-0.5s-0.224-0.5-0.5-0.5zM11.854 8.146c-0.183-0.183-0.475-0.196-0.674-0.031l-6 5c-0.212 0.177-0.241 0.492-0.064 0.705 0.177 0.212 0.491 0.241 0.705 0.064l5.649-4.708 5.677 5.677c0.097 0.098 0.225 0.147 0.353 0.147s0.256-0.049 0.354-0.146l7.146-7.147v3.793c0 0.276 0.224 0.5 0.5 0.5s0.5-0.224 0.5-0.5v-5c0-0.065-0.013-0.13-0.038-0.191-0.051-0.122-0.148-0.22-0.271-0.271-0.061-0.025-0.126-0.038-0.191-0.038h-5c-0.276 0-0.5 0.224-0.5 0.5s0.224 0.5 0.5 0.5h3.793l-6.793 6.793-5.646-5.647zM8.057 31.732c0.128 0.245 0.43 0.339 0.675 0.211l6.768-3.545 6.768 3.545c0.074 0.039 0.153 0.057 0.232 0.057 0.18 0 0.354-0.098 0.443-0.268 0.128-0.245 0.034-0.547-0.211-0.675l-6.893-3.61c0.098-0.091 0.161-0.219 0.161-0.364v-2.583c0-0.276-0.224-0.5-0.5-0.5s-0.5 0.224-0.5 0.5v2.583c0 0.144 0.063 0.272 0.161 0.363l-6.893 3.61c-0.245 0.129-0.339 0.431-0.211 0.676z"></path>
147
+ </symbol>
148
+ <symbol id="kt-svg-icon-lifesaver" viewBox="0 0 32 32">
149
+ <title>lifesaver</title>
150
+ <path d="M5.738 2.796l-2.943 2.942c-0.195 0.196-0.195 0.512 0 0.707 0.098 0.098 0.226 0.146 0.354 0.146s0.256-0.049 0.354-0.146l2.943-2.942c0.195-0.195 0.195-0.512 0-0.707s-0.512-0.195-0.708 0zM28.496 25.553l-2.943 2.942c-0.195 0.195-0.195 0.512 0 0.707 0.098 0.098 0.226 0.146 0.354 0.146s0.256-0.049 0.354-0.146l2.943-2.942c0.195-0.195 0.195-0.512 0-0.707s-0.513-0.196-0.708 0zM26.652 2.992c-0.195-0.195-0.512-0.195-0.707 0s-0.195 0.512 0 0.707l2.747 2.746c0.098 0.098 0.226 0.146 0.354 0.146s0.256-0.049 0.354-0.146c0.195-0.195 0.195-0.512 0-0.707l-2.748-2.746zM2.992 25.945c-0.195 0.195-0.195 0.512 0 0.707l2.747 2.746c0.098 0.098 0.226 0.146 0.354 0.146s0.256-0.049 0.354-0.146c0.195-0.195 0.195-0.512 0-0.707l-2.747-2.746c-0.197-0.195-0.513-0.195-0.708 0zM4.532 9.86c-0.204 0.38-0.381 0.771-0.544 1.164-1.309 3.164-1.31 6.791-0.001 9.952 0.202 0.487 0.427 0.953 0.668 1.383 0.583 1.041 1.306 1.996 2.148 2.838 0.964 0.965 2.069 1.769 3.284 2.389 0.308 0.157 0.621 0.296 0.938 0.427 1.582 0.655 3.256 0.987 4.975 0.987s3.393-0.332 4.976-0.987c0.001 0 0.001-0.001 0.002-0.002 0.393-0.162 0.782-0.34 1.161-0.543 1.125-0.602 2.154-1.366 3.058-2.271 0.904-0.903 1.668-1.932 2.271-3.059 0.203-0.38 0.382-0.769 0.545-1.164 0 0 0-0.001 0-0.001 1.307-3.163 1.307-6.789-0.001-9.949-0.131-0.316-0.271-0.631-0.427-0.938-0.619-1.214-1.423-2.318-2.389-3.284-0.841-0.841-1.795-1.563-2.837-2.147-0.429-0.241-0.895-0.467-1.384-0.669-3.163-1.309-6.783-1.309-9.951 0.001 0 0-0.001 0-0.001 0-0.395 0.164-0.784 0.341-1.164 0.545-1.124 0.602-2.152 1.366-3.056 2.271-0.904 0.903-1.669 1.931-2.271 3.057zM14.1 11.414c0 0 0 0 0 0 0.432-0.178 0.877-0.295 1.322-0.347 0.466-0.055 0.939-0.043 1.402 0.035 0.368 0.061 0.73 0.165 1.077 0.307 0 0 0 0 0.001 0 0.604 0.25 1.146 0.612 1.611 1.077 0.461 0.461 0.822 1.003 1.073 1.612 0 0 0 0 0 0.001s0 0 0 0c0.211 0.511 0.335 1.042 0.37 1.58 0.019 0.297 0.011 0.599-0.023 0.896-0.052 0.446-0.168 0.891-0.347 1.322 0 0 0 0 0 0s0 0 0 0.001c-0.251 0.609-0.612 1.151-1.073 1.612-0.46 0.46-1.003 0.821-1.613 1.073 0 0 0 0 0 0-0.432 0.177-0.877 0.295-1.322 0.346-0.297 0.035-0.596 0.043-0.897 0.023-0.537-0.034-1.069-0.159-1.581-0.37-0.61-0.252-1.153-0.613-1.613-1.073-0.465-0.465-0.827-1.006-1.077-1.611-0.143-0.346-0.247-0.709-0.309-1.078-0.078-0.465-0.089-0.937-0.035-1.401 0.052-0.446 0.168-0.891 0.347-1.322 0 0 0 0 0 0s0 0 0-0.001c0.251-0.609 0.612-1.151 1.073-1.612 0.461-0.457 1.004-0.818 1.614-1.070zM27.271 11.873c0.966 2.648 0.966 5.604 0 8.254l-5.588-2.314c0.119-0.368 0.2-0.743 0.244-1.12 0.042-0.356 0.051-0.719 0.028-1.076-0.031-0.483-0.122-0.962-0.272-1.429l5.588-2.315zM10.116 16.989c0.047 0.279 0.114 0.555 0.199 0.824l-5.586 2.315c-0.966-2.648-0.965-5.604 0.001-8.254l5.587 2.314c-0.119 0.368-0.2 0.743-0.244 1.119-0.064 0.558-0.051 1.124 0.043 1.682zM7.51 24.49c-0.777-0.777-1.444-1.658-1.983-2.62-0.146-0.26-0.285-0.533-0.416-0.818l5.586-2.313c0.281 0.546 0.645 1.042 1.083 1.481 0.436 0.437 0.934 0.799 1.483 1.080l-2.316 5.591c-0.136-0.062-0.271-0.127-0.406-0.195-1.121-0.574-2.141-1.315-3.031-2.206zM11.873 27.271l2.315-5.589c0.467 0.15 0.946 0.241 1.428 0.272 0.358 0.021 0.718 0.015 1.078-0.028 0.376-0.044 0.75-0.126 1.118-0.244l2.315 5.589c-2.643 0.968-5.611 0.968-8.254 0zM24.49 24.49c-0.834 0.835-1.784 1.54-2.824 2.097-0.202 0.108-0.407 0.209-0.614 0.304l-2.316-5.591c0.55-0.281 1.047-0.643 1.483-1.080 0.437-0.436 0.799-0.934 1.080-1.483l5.59 2.315c-0.095 0.208-0.195 0.413-0.304 0.615-0.555 1.040-1.26 1.989-2.095 2.823zM24.49 7.51c0.892 0.892 1.633 1.911 2.205 3.032 0.069 0.134 0.133 0.269 0.196 0.406l-5.591 2.315c-0.282-0.549-0.643-1.047-1.080-1.483-0.439-0.439-0.936-0.803-1.482-1.084l2.315-5.586c0.286 0.132 0.56 0.271 0.819 0.417 0.961 0.539 1.842 1.206 2.618 1.983zM20.128 4.729l-2.315 5.587c-0.27-0.086-0.546-0.152-0.824-0.199-0.553-0.094-1.12-0.108-1.683-0.042-0.376 0.044-0.75 0.126-1.118 0.244l-2.315-5.589c2.645-0.969 5.612-0.969 8.255-0.001zM10.333 5.413c0.202-0.108 0.407-0.209 0.615-0.303l2.315 5.59c-0.55 0.281-1.047 0.644-1.483 1.080s-0.799 0.934-1.080 1.483l-5.59-2.315c0.094-0.208 0.194-0.413 0.303-0.615 0.557-1.040 1.262-1.989 2.097-2.823 0.834-0.835 1.784-1.54 2.823-2.097zM23.418 29.041c-4.576 2.607-10.261 2.607-14.837 0-0.241-0.136-0.546-0.054-0.682 0.188-0.137 0.239-0.053 0.545 0.187 0.682 2.441 1.391 5.177 2.085 7.914 2.085s5.473-0.694 7.914-2.085c0.24-0.137 0.324-0.442 0.187-0.682-0.138-0.242-0.443-0.324-0.683-0.188zM2.090 8.087c-2.781 4.881-2.781 10.945 0 15.826 0.092 0.162 0.261 0.253 0.435 0.253 0.084 0 0.169-0.021 0.247-0.065 0.24-0.137 0.324-0.442 0.187-0.682-2.607-4.576-2.607-10.262 0-14.838 0.137-0.239 0.053-0.545-0.187-0.682-0.241-0.135-0.546-0.052-0.682 0.188zM29.91 23.913c2.781-4.881 2.781-10.945 0-15.826-0.137-0.24-0.444-0.323-0.682-0.188-0.24 0.137-0.324 0.442-0.187 0.682 2.607 4.576 2.607 10.262 0 14.838-0.137 0.239-0.053 0.545 0.187 0.682 0.078 0.044 0.163 0.065 0.247 0.065 0.174 0 0.343-0.091 0.435-0.253zM8.582 2.959c4.576-2.607 10.261-2.607 14.837 0 0.078 0.044 0.163 0.065 0.247 0.065 0.174 0 0.343-0.091 0.435-0.253 0.137-0.239 0.053-0.545-0.187-0.682-4.882-2.781-10.945-2.781-15.827 0-0.24 0.137-0.324 0.442-0.187 0.682 0.136 0.241 0.441 0.322 0.682 0.188z"></path>
151
+ </symbol>
152
+ <symbol id="kt-svg-icon-documents" viewBox="0 0 34 32">
153
+ <title>documents</title>
154
+ <path d="M1.512 28h17.988c0.827 0 1.5-0.673 1.5-1.5v-19c0-0.023-0.010-0.043-0.013-0.065s-0.007-0.041-0.013-0.062c-0.023-0.086-0.060-0.166-0.122-0.227l-6.999-6.999c-0.061-0.061-0.141-0.098-0.227-0.122-0.021-0.006-0.040-0.010-0.062-0.013s-0.041-0.012-0.064-0.012h-11.994c-0.83 0-1.506 0.673-1.506 1.5v25c0 0.827 0.678 1.5 1.512 1.5zM14 1.707l5.293 5.293h-4.793c-0.275 0-0.5-0.224-0.5-0.5v-4.793zM1 1.5c0-0.276 0.227-0.5 0.506-0.5h11.494v5.5c0 0.827 0.673 1.5 1.5 1.5h5.5v18.5c0 0.276-0.225 0.5-0.5 0.5h-17.988c-0.283 0-0.512-0.224-0.512-0.5v-25zM4.5 12h12c0.276 0 0.5-0.224 0.5-0.5s-0.224-0.5-0.5-0.5h-12c-0.276 0-0.5 0.224-0.5 0.5s0.224 0.5 0.5 0.5zM4.5 16h12c0.276 0 0.5-0.224 0.5-0.5s-0.224-0.5-0.5-0.5h-12c-0.276 0-0.5 0.224-0.5 0.5s0.224 0.5 0.5 0.5zM4.5 8h5c0.276 0 0.5-0.224 0.5-0.5s-0.224-0.5-0.5-0.5h-5c-0.276 0-0.5 0.224-0.5 0.5s0.224 0.5 0.5 0.5zM4.5 20h12c0.276 0 0.5-0.224 0.5-0.5s-0.224-0.5-0.5-0.5h-12c-0.276 0-0.5 0.224-0.5 0.5s0.224 0.5 0.5 0.5zM4.5 24h12c0.276 0 0.5-0.224 0.5-0.5s-0.224-0.5-0.5-0.5h-12c-0.276 0-0.5 0.224-0.5 0.5s0.224 0.5 0.5 0.5zM21.5 5h4.5v5.5c0 0.827 0.673 1.5 1.5 1.5h5.5v18.5c0 0.276-0.225 0.5-0.5 0.5h-17.988c-0.283 0-0.512-0.224-0.512-0.5v-1c0-0.276-0.224-0.5-0.5-0.5s-0.5 0.224-0.5 0.5v1c0 0.827 0.678 1.5 1.512 1.5h17.988c0.827 0 1.5-0.673 1.5-1.5v-19c0-0.023-0.010-0.043-0.013-0.065s-0.007-0.041-0.013-0.062c-0.023-0.086-0.060-0.166-0.122-0.227l-6.999-6.999c-0.061-0.062-0.142-0.099-0.228-0.122-0.021-0.006-0.039-0.009-0.061-0.012s-0.041-0.013-0.064-0.013h-5c-0.276 0-0.5 0.224-0.5 0.5s0.224 0.5 0.5 0.5zM27.5 11c-0.275 0-0.5-0.224-0.5-0.5v-4.793l5.293 5.293h-4.793zM23.5 16h6c0.276 0 0.5-0.224 0.5-0.5s-0.224-0.5-0.5-0.5h-6c-0.276 0-0.5 0.224-0.5 0.5s0.224 0.5 0.5 0.5zM23.5 20h6c0.276 0 0.5-0.224 0.5-0.5s-0.224-0.5-0.5-0.5h-6c-0.276 0-0.5 0.224-0.5 0.5s0.224 0.5 0.5 0.5zM23.5 24h6c0.276 0 0.5-0.224 0.5-0.5s-0.224-0.5-0.5-0.5h-6c-0.276 0-0.5 0.224-0.5 0.5s0.224 0.5 0.5 0.5zM23.5 28h6c0.276 0 0.5-0.224 0.5-0.5s-0.224-0.5-0.5-0.5h-6c-0.276 0-0.5 0.224-0.5 0.5s0.224 0.5 0.5 0.5z"></path>
155
+ </symbol>
156
+ </defs>
157
+ </svg>
158
+ <h2 class="notices"></h2>
159
+ <div class="kt_title_area">
160
+ <h1>
161
+ <?php echo apply_filters( 'kt_getting_started_page_title', esc_html__( 'Getting Started with the ', 'virtue-toolkit' ) . '<strong>' . esc_html( $this->theme_title ) . '</strong>' ); ?>
162
+ </h1>
163
+ <h4>
164
+ <?php echo apply_filters( 'kt_getting_started_page_subtitle', esc_html__( 'Demo content, recommended plugins and helpful links.', 'virtue-toolkit' ) ); ?>
165
+ </h4>
166
+ </div>
167
+ <?php ob_start(); ?>
168
+ <div class="kad-panel-left kt-admin-clearfix">
169
+ <div class="kad-panel-contain">
170
+ <h2 class="nav-tab-wrapper">
171
+ <?php do_action( 'kt_getting_started_nav_before' ); ?>
172
+ <a class="nav-tab nav-tab-active nav-tab-link" data-tab-id="kt-helplinks" href="#"><?php echo esc_html__( 'Dashboard', 'virtue-toolkit' ); ?></a>
173
+ <a class="nav-tab nav-tab-link" data-tab-id="kt-page-builder" href="#"><?php echo esc_html__( 'Page Builder', 'virtue-toolkit' ); ?></a>
174
+ <a class="nav-tab nav-tab-link" data-tab-id="kt-plugins" href="#"><?php echo esc_html__( 'Recommended Plugins', 'virtue-toolkit' ); ?></a>
175
+ <?php
176
+ if ( 'Ascend' === $this->theme_name ) {
177
+ $pro_link = 'https://www.kadencethemes.com/product/ascend-premium-wordpress-theme/?utm_source=toolkit-welcome&utm_medium=dashboard&utm_campaign=toolkit-ascend';
178
+ } elseif ( 'Virtue' === $this->theme_name ) {
179
+ $pro_link = 'https://www.kadencethemes.com/product/virtue-premium-theme/?utm_source=toolkit-welcome&utm_medium=dashboard&utm_campaign=toolkit-virtue';
180
+ } elseif ( 'Pinnacle' === $this->theme_name ) {
181
+ $pro_link = 'https://www.kadencethemes.com/product/pinnacle-premium-wordpress-theme/?utm_source=toolkit-welcome&utm_medium=dashboard&utm_campaign=toolkit-pinnacle';
182
+ }
183
+ ?>
184
+ <a class="nav-tab go-pro-tab" target="_blank" href="<?php echo esc_attr( $pro_link ); ?>"><?php echo esc_html__( 'Go Pro', 'virtue-toolkit' ); ?> <i class="dashicons dashicons-external"></i></a>
185
+ <?php do_action( 'kt_getting_started_nav_after' ); ?>
186
+ </h2>
187
+ <?php do_action( 'kt_getting_started_before' ); ?>
188
+ <div id="kt-helplinks" class="nav-tab-content panel_open kt-admin-clearfix">
189
+ <div class="kad-helpful-links kt-main">
190
+ <h2><?php echo esc_html__( 'Getting Started', 'virtue-toolkit' ); ?></h2>
191
+ <div class="kt-promo-row">
192
+ <div class="kt-promo-box-contain">
193
+ <div class="kt-docs-promo kt-promo-box">
194
+ <div class="kt-welcome-clearfix kt-promo-icon-container">
195
+ <svg class="kt-svg-icon kt-svg-icon-adjustments"><use xlink:href="#kt-svg-icon-adjustments"></use></svg>
196
+ </div>
197
+ <div class="kt-content-promo">
198
+ <h3><?php echo esc_html__( 'Customization', 'virtue-toolkit' ); ?></h3>
199
+ <p><?php echo esc_html__( 'Layouts, fonts, colors, and more. You can control it all from the options panel.', 'virtue-toolkit' ); ?></p>
200
+ <?php
201
+ if ( 'Ascend' === $this->theme_name ) {
202
+ $options_url = admin_url( 'themes.php?page=kad_options' );
203
+ } elseif ( 'Virtue' === $this->theme_name ) {
204
+ $options_url = admin_url( 'themes.php?page=ktoptions' );
205
+ } elseif ( 'Pinnacle' === $this->theme_name ) {
206
+ $options_url = admin_url( 'themes.php?page=ktoptions' );
207
+ }
208
+ echo '<a href="' . esc_attr( $options_url ) . '">' . esc_html__( 'Customize', 'virtue-toolkit' ) . '</a>'; ?>
209
+ </div>
210
+ </div>
211
+ </div>
212
+ <div class="kt-promo-box-contain">
213
+ <div class="kt-demos-promo kt-promo-box">
214
+ <div class="kt-welcome-clearfix kt-promo-icon-container">
215
+ <svg class="kt-svg-icon kt-svg-icon-browser"><use xlink:href="#kt-svg-icon-browser"></use></svg>
216
+ </div>
217
+ <div class="kt-content-promo">
218
+ <h3><?php echo esc_html__( 'Import Demo Content', 'virtue-toolkit' ); ?></h3>
219
+ <p><?php echo esc_html__( 'In just a few clicks you can import an entire demo site to work from.', 'virtue-toolkit' ); ?></p>
220
+ <?php
221
+ if ( class_exists( 'Kadence_Importer' ) ) {
222
+ echo '<a href="' . esc_url( admin_url( 'tools.php?page=kadence-importer' ) ) . '" class="kt-welcome-btn">' . esc_html__( 'View Importer', 'virtue-toolkit' ) . '</a>';
223
+ } else {
224
+ $installed_plugins = get_plugins();
225
+ if ( ! isset( $installed_plugins['kadence-importer/kadence-importer.php'] ) ) {
226
+ $button_label = esc_html__( 'Install Importer', 'virtue-toolkit' );
227
+ $data_action = 'install';
228
+ wp_create_nonce( 'tgmpa-install' );
229
+ } elseif ( ! is_plugin_active( 'kadence-importer/kadence-importer.php' ) ) {
230
+ $button_label = esc_html__( 'Activate Importer', 'virtue-toolkit' );
231
+ $data_action = 'activate';
232
+ }
233
+ $install_link = admin_url( 'admin-ajax.php' );
234
+ $install_nonce = '';
235
+ $activate_nonce = wp_create_nonce( 'activate-plugin_kadence-importer/kadence-importer.php' );
236
+ $activation_link = self_admin_url( 'plugins.php?_wpnonce=' . $activate_nonce . '&action=activate&plugin=kadence-importer%2Fkadence-importer.php' );
237
+ ?>
238
+ <a class="kt-welcome-btn button kt-trigger-plugin-install install-toolkit" data-redirect-url="<?php echo esc_url( admin_url( 'tools.php?page=kadence-importer' ) ); ?>" data-activating-label="<?php echo esc_attr__( 'Activating...', 'virtue-toolkit' ); ?>" data-installing-label="<?php echo esc_attr__( 'Installing...', 'virtue-toolkit' ); ?>" data-installed-label="<?php echo esc_attr__( 'Installed', 'virtue-toolkit' ); ?>" data-activated-label="<?php echo esc_attr__( 'Activated', 'virtue-toolkit' ); ?>" data-action="<?php echo esc_attr( $data_action ); ?>" data-install-url="<?php echo esc_attr( $install_link ); ?>" data-install-nonce="<?php echo esc_attr( $install_nonce ); ?>" data-activate-url="<?php echo esc_attr( $activation_link ); ?>"><?php echo esc_html( $button_label ); ?></a>
239
+ <?php
240
+ }
241
+ ?>
242
+ </div>
243
+ </div>
244
+ </div>
245
+ </div>
246
+ <div class="kt-promo-row">
247
+ <div class="kt-promo-box-contain">
248
+ <div class="kt-builder-promo kt-promo-box">
249
+ <div class="kt-welcome-clearfix kt-promo-icon-container">
250
+ <svg class="kt-svg-icon kt-svg-icon-mbri-edit"><use xlink:href="#kt-svg-icon-mbri-edit"></use></svg>
251
+ </div>
252
+ <div class="kt-content-promo">
253
+ <h3><?php echo esc_html__( 'Page Builder', 'virtue-toolkit' ); ?></h3>
254
+ <p><?php echo esc_html__( 'Take total control over your content with a powerful page builder that will make editing a breeze.', 'virtue-toolkit' ); ?></p>
255
+ <?php echo '<a data-tab-id="kt-page-builder" class="nav-tab-link" href="#">' . esc_html__( 'Get a Builder', 'virtue-toolkit' ) . '</a>'; ?>
256
+ </div>
257
+ </div>
258
+ </div>
259
+ <div class="kt-promo-box-contain">
260
+ <div class="kt-plugins-promo kt-promo-box">
261
+ <div class="kt-welcome-clearfix kt-promo-icon-container">
262
+ <svg class="kt-svg-icon kt-svg-icon-mbri-extension"><use xlink:href="#kt-svg-icon-mbri-extension"></use></svg>
263
+ </div>
264
+ <div class="kt-content-promo">
265
+ <h3><?php echo esc_html__( 'Recommend Plugins', 'virtue-toolkit' ); ?></h3>
266
+ <p><?php echo esc_html__( 'An excellent selection of extensions for your site that can get you powered for greatness.', 'virtue-toolkit' ); ?></p>
267
+ <?php echo '<a data-tab-id="kt-plugins" class="nav-tab-link" href="#">' . esc_html__( 'Explore', 'virtue-toolkit' ) . '</a>'; ?>
268
+ </div>
269
+ </div>
270
+ </div>
271
+ </div>
272
+ <h2><?php echo esc_html__( 'Helpful Links and Resources', 'virtue-toolkit' ); ?></h2>
273
+ <div class="kt-promo-row">
274
+ <div class="kt-promo-box-contain kt-promo-three">
275
+ <div class="kt-tutorials-promo kt-promo-box">
276
+ <div class="kt-welcome-clearfix kt-promo-icon-container">
277
+ <svg class="kt-svg-icon kt-svg-icon-lifesaver"><use xlink:href="#kt-svg-icon-lifesaver"></use></svg>
278
+ </div>
279
+ <div class="kt-content-promo">
280
+ <h3><?php echo esc_html__( 'Support', 'virtue-toolkit' ); ?></h3>
281
+ <p><?php echo esc_html__( 'Are you having trouble getting things to look how you want? Or are you stuck and not sure what to do? We can help!', 'virtue-toolkit' ); ?></p>
282
+ <?php
283
+ if ( 'Ascend' === $this->theme_name ) {
284
+ $link = 'https://wordpress.org/support/theme/ascend';
285
+ } elseif ( 'Virtue' === $this->theme_name ) {
286
+ $link = 'https://wordpress.org/support/theme/virtue';
287
+ } elseif ( 'Pinnacle' === $this->theme_name ) {
288
+ $link = 'https://wordpress.org/support/theme/pinnacle';
289
+ }
290
+ ?>
291
+ <a href="<?php echo esc_url( $link ); ?>" target="_blank"><?php echo esc_html__( 'Ask a question', 'virtue-toolkit' ); ?></a>
292
+ </div>
293
+ </div>
294
+ </div>
295
+ <div class="kt-promo-box-contain kt-promo-three">
296
+ <div class="kt-tutorials-promo kt-promo-box">
297
+ <div class="kt-welcome-clearfix kt-promo-icon-container">
298
+ <svg class="kt-svg-icon kt-svg-icon-presentation"><use xlink:href="#kt-svg-icon-presentation"></use></svg>
299
+ </div>
300
+ <div class="kt-content-promo">
301
+ <h3><?php echo esc_html__( 'Tutorials', 'virtue-toolkit' ); ?></h3>
302
+ <p><?php echo esc_html__( 'Are you not sure how to do something? Check out our tutorials for quick help with many topics.', 'virtue-toolkit' ); ?></p>
303
+ <a href="https://www.kadencethemes.com/kadence-tutorials/?utm_source=toolkit-welcome&utm_medium=dashboard&utm_campaign=toolkit-<?php echo esc_attr( strtolower( $this->theme_name ) ); ?>" target="_blank"><?php echo esc_html__( 'View', 'virtue-toolkit' ); ?></a>
304
+ </div>
305
+ </div>
306
+ </div>
307
+ <div class="kt-promo-box-contain kt-promo-three">
308
+ <div class="kt-tutorials-promo kt-promo-box">
309
+ <div class="kt-welcome-clearfix kt-promo-icon-container">
310
+ <svg class="kt-svg-icon kt-svg-icon-documents"><use xlink:href="#kt-svg-icon-documents"></use></svg>
311
+ </div>
312
+ <div class="kt-content-promo">
313
+ <h3><?php echo esc_html__( 'Theme Documentation', 'virtue-toolkit' ); ?></h3>
314
+ <p><?php /* translators: %1$s: Theme Title, %2$s: Theme title */ printf( esc_html__( 'The %1$s has thorough documentation that can help you learn about any aspect of the %2$s.', 'virtue-toolkit' ), esc_html( $this->theme_title ), esc_html( $this->theme_title ) ); ?></p>
315
+ <?php echo '<a href="http://docs.kadencethemes.com/' . esc_attr( strtolower( $this->theme_name ) ) . '-free/" target="_blank">' . esc_html__( 'Browse', 'virtue-toolkit' ) . '</a>'; ?>
316
+ </div>
317
+ </div>
318
+ </div>
319
+ </div>
320
+ <div class="kt-promo-row">
321
+ <div class="kt-promo-box-contain kt-promo-full">
322
+ <div class="kt-newsletter-promo kt-promo-box">
323
+ <div class="kt-welcome-clearfix kt-promo-icon-container">
324
+ <svg class="kt-svg-icon kt-svg-icon-envelope"><use xlink:href="#kt-svg-icon-envelope"></use></svg>
325
+ </div>
326
+ <div class="kt-content-promo">
327
+ <h3><?php echo esc_html__( 'Kadence Themes Newsletter', 'virtue-toolkit' ); ?></h3>
328
+ <p><?php echo esc_html__( 'Get the latest news about product updates and new plugins right to your inbox.', 'virtue-toolkit' ); ?></p>
329
+ <a href="https://www.kadencethemes.com/newsletter-subscribe/?utm_source=toolkit-welcome&utm_medium=dashboard&utm_campaign=toolkit" target="_blank"><?php echo esc_html__( 'Subscribe', 'virtue-toolkit' ); ?></a>
330
+ </div>
331
+ </div>
332
+ </div>
333
+ </div>
334
+ </div>
335
+ </div>
336
+ <div id="kt-page-builder" class="nav-tab-content kt-admin-clearfix">
337
+ <div class="kad-recomended-plugins kt-main">
338
+ <h2><?php echo esc_html__( 'Choosing a Page Builder', 'virtue-toolkit' ); ?></h2>
339
+ <p class="kt-subtitle"><?php /* translators: %1$s: <u>, %2$s: </u>, %3$s: Theme Title */ printf( esc_html__( 'We recommend using %1$sONE%2$s of these page builders. You can certainly try them all out but for performance we suggest just using one. The %3$s will work great with any one.', 'virtue-toolkit' ), '<u>', '</u>', esc_html( $this->theme_title ) ); ?></p>
340
+ <div class="kt_suggest_section kt-admin-clearfix">
341
+ <?php
342
+ $suggested_builder = $this->suggested_builder_plugins();
343
+ foreach ( $suggested_builder as $builder_plugin ) {
344
+ echo '<div class="kt_plugin_box builder_box">';
345
+ echo '<div class="builder_box_inner">';
346
+ echo '<div class="builder_box_image">';
347
+ echo '<img src="' . esc_url( $builder_plugin['image'] ) . '">';
348
+ echo '<h5 class="' . esc_attr( $builder_plugin['activated_cs'] ) . '">' . esc_html( $builder_plugin['activated'] ) . '</h5>';
349
+ echo '</div>';
350
+ echo '<div class="builder_box_content">';
351
+ echo '<h2>' . esc_html( $builder_plugin['name'] ) . '</h2>';
352
+ echo '<p>' . wp_kses_post( $builder_plugin['desc'] ) . '</p>';
353
+ echo '<div class="kt-pros-cons kt-pros">';
354
+ echo '<h4>' . esc_html__( 'Pros:', 'virtue-toolkit' ) . '</h4>';
355
+ echo '<ul>' . wp_kses_post( $builder_plugin['pros'] ) . '</ul>';
356
+ echo '</div>';
357
+ echo '<div class="kt-pros-cons">';
358
+ echo '<h4>' . esc_html__( 'Cons:', 'virtue-toolkit' ) . '</h4>';
359
+ echo '<ul>' . wp_kses_post( $builder_plugin['cons'] ) . '</ul>';
360
+ echo '</div>';
361
+ echo '<div class="kt-welcome-clearfix"></div>';
362
+ echo '<a class="kt_plugin_button button ' . esc_attr( $builder_plugin['class'] ) . '" data-redirect-url="' . esc_url( $builder_plugin['redirect_url'] ) . '" data-activating-label="' . esc_attr__( 'Activating...', 'virtue-toolkit' ) . '" data-activated-label="' . esc_attr__( 'Activated', 'virtue-toolkit' ) . '" data-installing-label="' . esc_attr__( 'Installing...', 'virtue-toolkit' ) . '" data-installed-label="' . esc_attr__( 'Installed', 'virtue-toolkit' ) . '" data-action="' . esc_attr( $builder_plugin['data_action'] ) . '" data-install-url="' . esc_attr( $builder_plugin['install_link'] ) . '" data-activate-url="' . esc_attr( $builder_plugin['activation_link'] ) . '" href="' . esc_attr( $builder_plugin['action'] ) . '">' . esc_html( $builder_plugin['action_title'] ) . '</a>';
363
+ echo '</div>';
364
+ echo '</div>';
365
+ echo '</div>';
366
+ }
367
+ ?>
368
+ </div>
369
+ <p class="kt-subtitle"><?php /* translators: %1$s: <a>, %2$s: </a> */ printf( esc_html__( 'Having trouble deciding? Check out our post about the best %1$sPage Builders%2$s.', 'virtue-toolkit' ), '<a href="https://www.kadencethemes.com/recommended-page-builders-for-wordpress/?utm_source=toolkit-welcome&utm_medium=dashboard&utm_campaign=toolkit" target="_blank">', '</a>' ); ?></p>
370
+ </div>
371
+ </div>
372
+ <div id="kt-plugins" class="nav-tab-content kt-admin-clearfix">
373
+ <div class="kad-recomended-plugins kt-main">
374
+ <h2><?php echo esc_html__( 'Recommended Plugins', 'virtue-toolkit' ); ?></h2>
375
+ <p class="kt-subtitle"><?php echo esc_html__( 'These are plugins are not required. But they are worth checking out for the impressive features that can really enhance your site.', 'virtue-toolkit' ); ?></p>
376
+ <div class="kt_suggest_section kt-admin-clearfix">
377
+ <?php
378
+ $suggested = $this->suggested_plugins();
379
+ foreach ( $suggested as $plugin ) {
380
+ echo '<div class="kt_plugin_box">';
381
+ echo '<img src="' . esc_url( $plugin['image'] ) . '">';
382
+ echo '<h5 class="' . esc_attr( $plugin['activated_cs'] ) . '">' . esc_html( $plugin['activated'] ) . '</h5>';
383
+ echo '<h3>' . esc_html( $plugin['name'] ) . '</h3>';
384
+ echo '<p>' . wp_kses_post( $plugin['desc'] ) . '</p>';
385
+ echo '<a class="kt_plugin_button ' . esc_attr( $plugin['class'] ) . '" data-redirect-url="' . esc_url( $plugin['redirect_url'] ) . '" data-activating-label="' . esc_attr__( 'Activating...', 'virtue-toolkit' ) . '" data-activated-label="' . esc_attr__( 'Activated', 'virtue-toolkit' ) . '" data-installing-label="' . esc_attr__( 'Installing...', 'virtue-toolkit' ) . '" data-installed-label="' . esc_attr__( 'Installed', 'virtue-toolkit' ) . '" data-action="' . esc_attr( $plugin['data_action'] ) . '" data-install-url="' . esc_attr( $plugin['install_link'] ) . '" data-activate-url="' . esc_attr( $plugin['activation_link'] ) . '" href="' . esc_attr( $plugin['action'] ) . '">' . esc_html( $plugin['action_title'] ) . '</a>';
386
+ echo '</div>';
387
+ }
388
+ ?>
389
+ </div>
390
+ </div>
391
+ </div>
392
+ <?php do_action( 'kt_getting_started_after' ); ?>
393
+ </div>
394
+ </div>
395
+ <div class="kad-panel-bottom kt-admin-clearfix">
396
+ <div class="kad-featured-items kt-admin-clearfix">
397
+ <?php if ( class_exists( 'woocommerce' ) ) { ?>
398
+ <h2><?php echo esc_html__( 'Featured WooCommerce Extensions', 'virtue-toolkit' ); ?></h2>
399
+ <div class="featured-row">
400
+ <div class="featured">
401
+ <a href="https://wordpress.org/plugins/kadence-woocommerce-elementor/" target="_blank">
402
+ <img src="<?php echo esc_url( VIRTUE_TOOLKIT_URL . 'welcome/images/kt-woo-ele.jpg' ); ?>">
403
+ </a>
404
+ <a href="https://wordpress.org/plugins/kadence-woocommerce-elementor/" target="_blank"><h4>Kadence WooCommerce Elementor</h4></a>
405
+ <p>Build Custom layouts for your products in WooCommerce using the amazing Elementor page building experience. You can work inside one product or build templates that you can assign to multiple products.</p>
406
+ <a href="https://wordpress.org/plugins/kadence-woocommerce-elementor/" class="kt-feat-btn" target="_blank">Learn More</a>
407
+ </div>
408
+ <div class="featured">
409
+ <a href="https://www.kadencethemes.com/product/kadence-woo-extras/?utm_source=toolkit&utm_medium=cpc&utm_campaign=woo_extra" target="_blank">
410
+ <img src="<?php echo esc_url( VIRTUE_TOOLKIT_URL . 'welcome/images/kt-woo-email-designer.jpg' ); ?>">
411
+ </a>
412
+ <a href="https://www.kadencethemes.com/product/kadence-woo-extras/?utm_source=toolkit&utm_medium=cpc&utm_campaign=woo_extra" target="_blank"><h4>Kadence WooCommerce Email Designer</h4></a>
413
+ <p>This plugin lets you easily customize the default transactional WooCommerce email templates. Edit the design using the native WordPress customizer for instant visual edits. Customize the text (including body text) or each email template in WooCommerce without editing code.</p>
414
+ <a href="https://wordpress.org/plugins/kadence-woocommerce-email-designer/" class="kt-feat-btn" target="_blank">Learn More</a>
415
+ </div>
416
+ </div>
417
+ <?php } else { ?>
418
+ <div class="featured-row">
419
+ <h2><?php echo esc_html__( 'Featured WooCommerce Extensions', 'virtue-toolkit' ); ?></h2>
420
+ <div class="featured">
421
+ <a href="https://wordpress.org/plugins/kadence-woocommerce-elementor/" target="_blank">
422
+ <img src="<?php echo esc_url( VIRTUE_TOOLKIT_URL . 'welcome/images/kt-woo-ele.jpg' ); ?>">
423
+ </a>
424
+ <a href="https://wordpress.org/plugins/kadence-woocommerce-elementor/" target="_blank"><h4>Kadence WooCommerce Elementor</h4></a>
425
+ <p>Build Custom layouts for your products in WooCommerce using the amazing Elementor page building experience. You can work inside one product or build templates that you can assign to multiple products.</p>
426
+ <a href="https://wordpress.org/plugins/kadence-woocommerce-elementor/" class="kt-feat-btn" target="_blank">Learn More</a>
427
+ </div>
428
+ <div class="featured">
429
+ <a href="https://www.kadencethemes.com/product/kadence-woo-extras/?utm_source=toolkit&utm_medium=cpc&utm_campaign=woo_extra" target="_blank">
430
+ <img src="<?php echo esc_url( VIRTUE_TOOLKIT_URL . 'welcome/images/kt-woo-email-designer.jpg' ); ?>">
431
+ </a>
432
+ <a href="https://www.kadencethemes.com/product/kadence-woo-extras/?utm_source=toolkit&utm_medium=cpc&utm_campaign=woo_extra" target="_blank"><h4>Kadence WooCommerce Email Designer</h4></a>
433
+ <p>This plugin lets you easily customize the default transactional WooCommerce email templates. Edit the design using the native WordPress customizer for instant visual edits. Customize the text (including body text) or each email template in WooCommerce without editing code.</p>
434
+ <a href="https://wordpress.org/plugins/kadence-woocommerce-email-designer/" class="kt-feat-btn" target="_blank">Learn More</a>
435
+ </div>
436
+ </div>
437
+ <?php } ?>
438
+ </div>
439
+ </div>
440
+ <?php
441
+ $welcome_content = ob_get_clean();
442
+ echo apply_filters( 'kt_getting_started_content', $welcome_content );
443
+ ?>
444
+ </div>
445
+ <?php
446
+ }
447
+ }
448
+ /**
449
+ * Get array of suggested plguins.
450
+ */
451
+ public function suggested_plugins() {
452
+ $suggested = array(
453
+ 'woocommerce' => array(
454
+ 'slug' => 'woocommerce',
455
+ 'base' => 'woocommerce',
456
+ 'plugin_check' => 'woocommerce/woocommerce.php',
457
+ 'active_url' => admin_url( 'admin.php?page=wc-settings' ),
458
+ 'action_title' => __( 'WooCommerce Settings', 'virtue-toolkit' ),
459
+ 'name' => 'WooCommerce',
460
+ 'desc' => 'WooCommerce is a free eCommerce plugin that allows you to sell anything, beautifully. Built to integrate seamlessly with WordPress.',
461
+ 'image' => esc_url( VIRTUE_TOOLKIT_URL . 'welcome/images/woo_logo.jpg' ),
462
+ 'author' => 'Automattic',
463
+ 'redirect_url' => '',
464
+ ),
465
+ 'wpforms-lite' => array(
466
+ 'slug' => 'wpforms-lite',
467
+ 'base' => 'wpforms',
468
+ 'plugin_check' => 'wpforms-lite/wpforms.php',
469
+ 'active_url' => admin_url( 'admin.php?page=wc-settings' ),
470
+ 'action_title' => __( 'WPForms Settings', 'virtue-toolkit' ),
471
+ 'name' => 'Contact Form by WPForms',
472
+ 'desc' => 'A Drag & Drop Form Builder for WordPress, you can manage multiple contact forms, customize the form a with builder tools.',
473
+ 'image' => esc_url( VIRTUE_TOOLKIT_URL . 'welcome/images/wpforms_logo.jpg' ),
474
+ 'author' => 'WPForms',
475
+ 'redirect_url' => '',
476
+ ),
477
+ 'wordpress-seo' => array(
478
+ 'slug' => 'wordpress-seo',
479
+ 'base' => 'wp-seo',
480
+ 'plugin_check' => 'wordpress-seo/wp-seo.php',
481
+ 'active_url' => admin_url( 'admin.php?page=wpseo_dashboard' ),
482
+ 'action_title' => __( 'Yoast SEO Settings', 'virtue-toolkit' ),
483
+ 'name' => 'Yoast SEO',
484
+ 'desc' => 'Improve your WordPress SEO: Write better content and have a fully optimized WordPress site using Yoast SEO plugin.',
485
+ 'image' => esc_url( VIRTUE_TOOLKIT_URL . 'welcome/images/ws_logo.jpg' ),
486
+ 'author' => 'Yoast',
487
+ 'redirect_url' => '',
488
+ ),
489
+ );
490
+ $installed_plugins = get_plugins();
491
+ foreach ( $suggested as $plugin ) {
492
+ if ( is_plugin_active( $plugin['plugin_check'] ) ) {
493
+ $action = $plugin['active_url'];
494
+ $action_title = $plugin['action_title'];
495
+ $activated = esc_html__( 'Activated', 'virtue-toolkit' );
496
+ $activated_class = 'activated plugin-active';
497
+ $class = '';
498
+ $data_action = '';
499
+ $redirect_url = $plugin['redirect_url'];
500
+ $install_link = '';
501
+ $activation_link = '';
502
+ } elseif ( isset( $installed_plugins[ $plugin['plugin_check'] ] ) ) {
503
+ $data_action = 'activate';
504
+ $install_link = '';
505
+ $activate_nonce = wp_create_nonce( 'activate-plugin_' . $plugin['plugin_check'] );
506
+ $activation_link = self_admin_url( 'plugins.php?_wpnonce=' . $activate_nonce . '&action=activate&plugin=' . esc_attr( $plugin['slug'] ) . '%2F' . esc_attr( $plugin['base'] ) . '.php' );
507
+ $action_title = esc_html__( 'Activate', 'virtue-toolkit' ) . ' ' . $plugin['name'];
508
+ $activated_class = 'activated plugin-installed';
509
+ $activated = esc_html__( 'Installed', 'virtue-toolkit' );
510
+ $class = 'kt-trigger-plugin-install';
511
+ $action = '#';
512
+ $redirect_url = $plugin['redirect_url'];
513
+ } else {
514
+ $install_link = wp_nonce_url(
515
+ add_query_arg(
516
+ array(
517
+ 'action' => 'install-plugin',
518
+ 'plugin' => $plugin['slug'],
519
+ ),
520
+ network_admin_url( 'update.php' )
521
+ ),
522
+ 'install-plugin_' . $plugin['slug']
523
+ );
524
+ $redirect_url = $plugin['redirect_url'];
525
+ $activate_nonce = wp_create_nonce( 'activate-plugin_' . $plugin['plugin_check'] );
526
+ $activation_link = self_admin_url( 'plugins.php?_wpnonce=' . $activate_nonce . '&action=activate&plugin=' . esc_attr( $plugin['slug'] ) . '%2F' . esc_attr( $plugin['base'] ) . '.php' );
527
+ $action = '#';
528
+ $action_title = esc_html__( 'Install', 'virtue-toolkit' ) . ' ' . $plugin['name'];
529
+ $activated = esc_html__( 'Not Installed', 'virtue-toolkit' );
530
+ $activated_class = 'activated plugin-not-installed';
531
+ $class = 'kt-trigger-plugin-install';
532
+ $data_action = 'install';
533
+ }
534
+ $output[ $plugin['slug'] ] = array(
535
+ 'image' => $plugin['image'],
536
+ 'name' => $plugin['name'],
537
+ 'author' => $plugin['author'],
538
+ 'desc' => $plugin['desc'],
539
+ 'action' => $action,
540
+ 'action_title' => $action_title,
541
+ 'activated' => $activated,
542
+ 'activated_cs' => $activated_class,
543
+ 'data_action' => $data_action,
544
+ 'install_link' => $install_link,
545
+ 'activation_link' => $activation_link,
546
+ 'redirect_url' => $redirect_url,
547
+ 'class' => $class,
548
+ );
549
+ }
550
+ return $output;
551
+ }
552
+ /**
553
+ * Get array of suggested page builders.
554
+ */
555
+ public function suggested_builder_plugins() {
556
+ $suggested = array(
557
+ 'elementor' => array(
558
+ 'slug' => 'elementor',
559
+ 'base' => 'elementor',
560
+ 'plugin_check' => 'elementor/elementor.php',
561
+ 'active_url' => admin_url( 'admin.php?page=brizy-settings' ),
562
+ 'redirect_url' => admin_url( 'admin.php?page=brizy-settings' ),
563
+ 'name' => 'Elementor Page Builder',
564
+ 'desc' => 'A free front-end page builder with tons of ready-made content you can easily use. Elementor offers very powerful features and can create an incredible range of designs while giving great mobile specific editing. A <a href="https://elementor.com/pro/?ref=2435" target="_blank">pro extension</a> is available which adds even more features.',
565
+ 'pros' => '<li>Fully functional as a free plugin</li><li>Good user base with lots of extensions</li><li>Tons of pre-built content</li><li>Mobile previews and responsive design controls.</li>',
566
+ 'cons' => '<li>For some it can be overwhelming to learn, certain elements can be confusing.</li><li>While you don\'t need the pro extension, you may get annoyed seeing things it can do or demos it can install that you would have to pay to use.</li>',
567
+ 'image' => VIRTUE_TOOLKIT_URL . 'welcome/images/toolkit_ele.jpg',
568
+ 'author' => 'elementor.com',
569
+ 'action_title' => __( 'Elementor Settings', 'virtue-toolkit' ),
570
+ ),
571
+ 'brizy' => array(
572
+ 'slug' => 'brizy',
573
+ 'base' => 'brizy',
574
+ 'plugin_check' => 'brizy/brizy.php',
575
+ 'active_url' => admin_url( 'admin.php?page=brizy-settings' ),
576
+ 'redirect_url' => admin_url( 'admin.php?page=brizy-settings' ),
577
+ 'name' => 'Brizy – Page Builder',
578
+ 'desc' => 'A free front-end page builder that is lighting fast and intuitive to use. Brizy offers powerful features with an app like feel. The editor is very clutter-free with a lot of features not found in other builders. A <a href="https://brizy.io/account/aff/go/kadence_themes?i=4" target="_blank">pro extension</a> is coming which will add more features.',
579
+ 'pros' => '<li>Fully functional as a free plugin</li><li>Very fast and for many intuitive to use.</li><li>Features only found with brizy, like global linked colors and fonts or 4k icons</li>',
580
+ 'cons' => '<li>Early in development and still working out all the compatibility bugs.</li><li>Very little documentation or tutorials so far.</li><li>No API, so no extensions for it yet.</li><li>Missing some key features, like galleries.</li>',
581
+ 'image' => VIRTUE_TOOLKIT_URL . 'welcome/images/toolkit_brizy.jpg',
582
+ 'author' => 'brizy.co',
583
+ 'action_title' => __( 'Brizy Settings', 'virtue-toolkit' ),
584
+ ),
585
+ 'siteorigin-panels' => array(
586
+ 'slug' => 'siteorigin-panels',
587
+ 'base' => 'siteorigin-panels',
588
+ 'plugin_check' => 'siteorigin-panels/siteorigin-panels.php',
589
+ 'active_url' => admin_url( 'options-general.php?page=siteorigin_panels' ),
590
+ 'redirect_url' => admin_url( 'options-general.php?page=siteorigin_panels' ),
591
+ 'name' => 'Page Builder by SiteOrigin',
592
+ 'desc' => 'A Free drag and drop, page builder that simplifies building your website using tools that will feel familiar if you have worked in WordPress. While there is a "live editor" mode it does not really compete with the other page builders for real front-end editing. But the developers have plans to improve Gutenberg with it\'s features which could make Gutenberg much more useful.',
593
+ 'pros' => '<li>Fully functional as a free plugin</li><li>Widely popular with tons of free add on widgets</li><li>Stable with years of solid development behind it.</li>',
594
+ 'cons' => '<li>Not as user friendly as front-end builders</li><li>Slower editing experience</li><li>Not a lot of new features being developed.</li>',
595
+ 'image' => VIRTUE_TOOLKIT_URL . 'welcome/images/toolkit_siteorigin.jpg',
596
+ 'author' => 'SiteOrigin',
597
+ 'action_title' => __( 'SiteOrigin Page Builder Settings', 'virtue-toolkit' ),
598
+ ),
599
+ );
600
+ $installed_plugins = get_plugins();
601
+ foreach ( $suggested as $plugin ) {
602
+ if ( is_plugin_active( $plugin['plugin_check'] ) ) {
603
+ $action = $plugin['active_url'];
604
+ $action_title = $plugin['action_title'];
605
+ $activated = esc_html__( 'Activated', 'virtue-toolkit' );
606
+ $activated_class = 'activated plugin-active';
607
+ $class = '';
608
+ $data_action = '';
609
+ $redirect_url = $plugin['redirect_url'];
610
+ $install_link = '';
611
+ $activation_link = '';
612
+ } elseif ( isset( $installed_plugins[ $plugin['plugin_check'] ] ) ) {
613
+ $data_action = 'activate';
614
+ $install_link = '';
615
+ $activate_nonce = wp_create_nonce( 'activate-plugin_' . $plugin['plugin_check'] );
616
+ $activation_link = self_admin_url( 'plugins.php?_wpnonce=' . $activate_nonce . '&action=activate&plugin=' . esc_attr( $plugin['slug'] ) . '%2F' . esc_attr( $plugin['slug'] ) . '.php' );
617
+ $action_title = esc_html__( 'Activate', 'virtue-toolkit' ) . ' ' . $plugin['name'];
618
+ $activated_class = 'activated plugin-installed';
619
+ $activated = esc_html__( 'Installed', 'virtue-toolkit' );
620
+ $class = 'kt-trigger-plugin-install';
621
+ $action = '#';
622
+ $redirect_url = $plugin['redirect_url'];
623
+ } else {
624
+ $install_link = wp_nonce_url(
625
+ add_query_arg(
626
+ array(
627
+ 'action' => 'install-plugin',
628
+ 'plugin' => $plugin['slug'],
629
+ ),
630
+ network_admin_url( 'update.php' )
631
+ ),
632
+ 'install-plugin_' . $plugin['slug']
633
+ );
634
+ $redirect_url = $plugin['redirect_url'];
635
+ $activate_nonce = wp_create_nonce( 'activate-plugin_' . $plugin['plugin_check'] );
636
+ $activation_link = self_admin_url( 'plugins.php?_wpnonce=' . $activate_nonce . '&action=activate&plugin=' . esc_attr( $plugin['slug'] ) . '%2F' . esc_attr( $plugin['slug'] ) . '.php' );
637
+ $action = '#';
638
+ $action_title = esc_html__( 'Install', 'virtue-toolkit' ) . ' ' . $plugin['name'];
639
+ $activated = esc_html__( 'Not Installed', 'virtue-toolkit' );
640
+ $activated_class = 'activated plugin-not-installed';
641
+ $class = 'kt-trigger-plugin-install';
642
+ $data_action = 'install';
643
+ }
644
+ $output[ $plugin['slug'] ] = array(
645
+ 'image' => $plugin['image'],
646
+ 'name' => $plugin['name'],
647
+ 'author' => $plugin['author'],
648
+ 'desc' => $plugin['desc'],
649
+ 'pros' => $plugin['pros'],
650
+ 'cons' => $plugin['cons'],
651
+ 'action' => $action,
652
+ 'action_title' => $action_title,
653
+ 'activated' => $activated,
654
+ 'activated_cs' => $activated_class,
655
+ 'data_action' => $data_action,
656
+ 'install_link' => $install_link,
657
+ 'activation_link' => $activation_link,
658
+ 'redirect_url' => $redirect_url,
659
+ 'class' => $class,
660
+ );
661
+ }
662
+ return $output;
663
+ }
664
+ /**
665
+ * Register_importer
666
+ */
667
+ public function register_importer() {
668
+ $plugins = array();
669
+ $plugins[] = array(
670
+ 'name' => 'Kadence Importer',
671
+ 'slug' => 'kadence-importer',
672
+ 'source' => 'https://s3.amazonaws.com/ktupdates/importer/kadence-importer.zip',
673
+ 'required' => false,
674
+ 'version' => '2.0.3',
675
+ 'force_activation' => false,
676
+ 'force_deactivation' => false,
677
+ 'external_url' => '',
678
+ );
679
+ $config = array(
680
+ 'domain' => 'virtue-toolkit', // Text domain - likely want to be the same as your theme.
681
+ 'default_path' => '', // Default absolute path to pre-packaged plugins
682
+ 'parent_slug' => 'themes.php', // Parent menu slug.
683
+ 'menu' => 'install-recommended-plugins', // Menu slug
684
+ 'has_notices' => false, // Show admin notices or not
685
+ 'is_automatic' => false, // Automatically activate plugins after installation or not
686
+ 'message' => '', // Message to output right before the plugins table.
687
+ 'strings' => array(
688
+ 'page_title' => __( 'Install Recommended Plugins', 'virtue-toolkit' ),
689
+ 'menu_title' => __( 'Theme Plugins', 'virtue-toolkit' ),
690
+ 'installing' => __( 'Installing Plugin: %s', 'virtue-toolkit' ), // %1$s = plugin name
691
+ 'oops' => __( 'Something went wrong with the plugin API.', 'virtue-toolkit' ),
692
+ 'notice_can_install_required' => _n_noop( 'This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.', 'virtue-toolkit' ), // %1$s = plugin name(s)
693
+ 'notice_can_install_recommended' => _n_noop( 'This theme comes packaged with the following premium plugin: %1$s. Plugin is not required, but suggested.', 'This theme comes packaged with the following premium plugins: %1$s. Plugins are not required, but suggested.', 'virtue-toolkit' ), // %1$s = plugin name(s)
694
+ 'notice_cannot_install' => _n_noop( 'Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.', 'virtue-toolkit' ), // %1$s = plugin name(s)
695
+ 'notice_can_activate_required' => _n_noop( 'The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.' , 'virtue-toolkit'), // %1$s = plugin name(s)
696
+ 'notice_can_activate_recommended' => _n_noop( 'The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.' , 'virtue-toolkit'), // %1$s = plugin name(s)
697
+ 'notice_cannot_activate' => _n_noop( 'Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.', 'virtue-toolkit' ), // %1$s = plugin name(s)
698
+ 'notice_ask_to_update' => _n_noop( 'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.' , 'virtue-toolkit'), // %1$s = plugin name(s)
699
+ 'notice_cannot_update' => _n_noop( 'Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.' , 'virtue-toolkit'), // %1$s = plugin name(s)
700
+ 'install_link' => _n_noop( 'Begin installing plugin', 'Begin installing plugins', 'virtue-toolkit' ),
701
+ 'activate_link' => _n_noop( 'Activate installed plugin', 'Activate installed plugins', 'virtue-toolkit' ),
702
+ 'return' => __( 'Return to recommended Plugins Installer', 'virtue-toolkit' ),
703
+ 'plugin_activated' => __( 'Plugin activated successfully.', 'virtue-toolkit' ),
704
+ 'complete' => __( 'All plugins installed and activated successfully. %s', 'virtue-toolkit' ), // %1$s = dashboard link
705
+ 'nag_type' => 'updated' // Determines admin notice type - can only be 'updated' or 'error'.
706
+ ),
707
+ );
708
+ if( 'Not Kadence' !== $this->theme_name ) {
709
+ tgmpa( $plugins, $config );
710
+ }
711
+ }
712
+ /**
713
+ * add settings link
714
+ */
715
+ public function add_settings_link( $links ) {
716
+ $settings_link = '<a href="' . admin_url( 'themes.php?page=kadence_welcome_page' ) . '">' . __( 'Settings', 'virtue-toolkit' ) . '</a>';
717
+ array_push( $links, $settings_link );
718
+ return $links;
719
+ }
720
+ /**
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
+ error_log('testing');
729
+ $tgmpa_url = $this->tgmpa->get_tgmpa_url();
730
+ $json = array(
731
+ 'url' => admin_url( 'themes.php?page=install-recommended-plugins' ),
732
+ 'plugin' => array( 'kadence-importer' ),
733
+ 'tgmpa-page' => 'install-recommended-plugins',
734
+ 'plugin_status' => 'all',
735
+ '_wpnonce' => wp_create_nonce( 'bulk-plugins' ),
736
+ 'action' => 'tgmpa-bulk-install',
737
+ 'action2' => - 1,
738
+ 'message' => esc_html__( 'Installing', 'virtue-toolkit' ),
739
+ );
740
+ wp_send_json( $json );
741
+ }
742
+
743
+ }
744
+ }
745
+
746
+ new Virtue_Toolkit_Welcome();
gallery.php CHANGED
@@ -227,23 +227,28 @@ function kadence_toolkit_shortcode_gallery($attr) {
227
  unset($attr['orderby']);
228
  }
229
  }
 
 
 
 
 
230
 
231
  extract(shortcode_atts(array(
232
- 'order' => 'ASC',
233
- 'orderby' => 'menu_order ID',
234
- 'id' => $post->ID,
235
- 'itemtag' => '',
236
- 'icontag' => '',
237
- 'captiontag' => '',
238
- 'columns' => 3,
239
- 'link' => 'file',
240
- 'size' => 'full',
241
- 'include' => '',
242
- 'attachment_page' => 'false',
243
- 'use_image_alt' => 'false',
244
- 'gallery_id' => (rand(10,100)),
245
- 'lightboxsize' => 'full',
246
- 'exclude' => ''
247
  ), $attr));
248
 
249
  $id = intval($id);
227
  unset($attr['orderby']);
228
  }
229
  }
230
+ if(!isset($post)) {
231
+ $post_id = null;
232
+ } else {
233
+ $post_id = $post->ID;
234
+ }
235
 
236
  extract(shortcode_atts(array(
237
+ 'order' => 'ASC',
238
+ 'orderby' => 'menu_order ID',
239
+ 'id' => $post_id,
240
+ 'itemtag' => '',
241
+ 'icontag' => '',
242
+ 'captiontag' => '',
243
+ 'columns' => 3,
244
+ 'link' => 'file',
245
+ 'size' => 'full',
246
+ 'include' => '',
247
+ 'attachment_page' => 'false',
248
+ 'use_image_alt' => 'false',
249
+ 'gallery_id' => ( rand( 10, 100 ) ),
250
+ 'lightboxsize' => 'full',
251
+ 'exclude' => ''
252
  ), $attr));
253
 
254
  $id = intval($id);
metaboxes.php CHANGED
@@ -689,16 +689,16 @@ function kadence_toolkit_virtue_metaboxes() {
689
  $prefix = '_kad_';
690
 
691
  $kttk_page_subtitle = new_cmb2_box( array(
692
- 'id' => 'subtitle_metabox',
693
- 'title' => __( "Page Title and Subtitle", 'virtue' ),
694
- 'object_types' => array( 'page' ),
695
- 'priority' => 'high',
696
  ) );
697
  $kttk_page_subtitle->add_field( array(
698
- 'name' => __("Subtitle", 'virtue' ),
699
- 'desc' => __( "Subtitle will go below page title", 'virtue' ),
700
- 'id' => $prefix . 'subtitle',
701
- 'type' => 'textarea_small',
702
  ) );
703
 
704
  // Video Post
689
  $prefix = '_kad_';
690
 
691
  $kttk_page_subtitle = new_cmb2_box( array(
692
+ 'id' => 'subtitle_metabox',
693
+ 'title' => __( 'Page Title and Subtitle', 'virtue-toolkit' ),
694
+ 'object_types' => array( 'page' ),
695
+ 'priority' => 'high',
696
  ) );
697
  $kttk_page_subtitle->add_field( array(
698
+ 'name' => __( 'Subtitle', 'virtue-toolkit' ),
699
+ 'desc' => __( 'Subtitle will go below page title', 'virtue-toolkit' ),
700
+ 'id' => $prefix . 'subtitle',
701
+ 'type' => 'textarea_small',
702
  ) );
703
 
704
  // Video Post
post-types.php CHANGED
@@ -1,132 +1,154 @@
1
  <?php
2
- // Custom post types
 
 
 
 
 
 
 
 
3
  function kadence_toolkit_portfolio_post_init() {
4
- $portfoliolabels = array(
5
- 'name' => __('Portfolio', 'virtue-toolkit'),
6
- 'singular_name' => __('Portfolio Item', 'virtue-toolkit'),
7
- 'add_new' => __('Add New', 'virtue-toolkit'),
8
- 'add_new_item' => __('Add New Portfolio Item', 'virtue-toolkit'),
9
- 'edit_item' => __('Edit Portfolio Item', 'virtue-toolkit'),
10
- 'new_item' => __('New Portfolio Item', 'virtue-toolkit'),
11
- 'all_items' => __('All Portfolio', 'virtue-toolkit'),
12
- 'view_item' => __('View Portfolio Item', 'virtue-toolkit'),
13
- 'search_items' => __('Search Portfolio', 'virtue-toolkit'),
14
- 'not_found' => __('No Portfolio Item found', 'virtue-toolkit'),
15
- 'not_found_in_trash' => __('No Portfolio Items found in Trash', 'virtue-toolkit'),
16
- 'parent_item_colon' => '',
17
- 'menu_name' => __('Portfolio', 'virtue-toolkit')
18
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
 
20
- $portargs = array(
21
- 'labels' => $portfoliolabels,
22
- 'public' => true,
23
- 'publicly_queryable' => true,
24
- 'show_ui' => true,
25
- 'show_in_menu' => true,
26
- 'query_var' => true,
27
- //'rewrite' => array( 'slug' => 'portfolio', 'feeds' => true),
28
- 'has_archive' => false,
29
- 'capability_type' => 'post',
30
- 'hierarchical' => false,
31
- 'menu_position' => 8,
32
- 'menu_icon' => 'dashicons-format-gallery',
33
- 'supports' => array( 'title', 'editor', 'excerpt', 'author', 'page-attributes', 'thumbnail', 'custom-fields', 'comments' )
34
- );
35
- // Initialize Taxonomy Labels
36
  $worklabels = array(
37
- 'name' => __( 'Portfolio Type', 'virtue-toolkit' ),
38
- 'singular_name' => __( 'Type', 'virtue-toolkit' ),
39
- 'search_items' => __( 'Search Type', 'virtue-toolkit' ),
40
- 'all_items' => __( 'All Type', 'virtue-toolkit' ),
41
- 'parent_item' => __( 'Parent Type', 'virtue-toolkit' ),
42
  'parent_item_colon' => __( 'Parent Type:', 'virtue-toolkit' ),
43
- 'edit_item' => __( 'Edit Type', 'virtue-toolkit' ),
44
- 'update_item' => __( 'Update Type', 'virtue-toolkit' ),
45
- 'add_new_item' => __( 'Add New Type', 'virtue-toolkit' ),
46
- 'new_item_name' => __( 'New Type Name', 'virtue-toolkit' ),
47
  );
48
- $portfolio_type_slug = apply_filters('kadence_portfolio_type_slug', 'portfolio-type');
49
- // Register Custom Taxonomy
50
- register_taxonomy('portfolio-type',array('portfolio'), array(
51
- 'hierarchical' => true, // define whether to use a system like tags or categories
52
- 'labels' => $worklabels,
53
- 'show_ui' => true,
54
- 'query_var' => true,
55
- 'rewrite' => array( 'slug' => $portfolio_type_slug )
56
- ));
57
 
58
- register_post_type( 'portfolio', $portargs );
 
 
 
 
 
 
 
 
 
 
 
 
59
  }
60
  add_action( 'init', 'kadence_toolkit_portfolio_post_init', 1 );
61
- function kadence_toolkit_portfolio_permalink_init(){
 
 
 
 
62
  global $wp_rewrite;
63
- $port_rewrite = apply_filters('kadence_portfolio_permalink_slug', 'portfolio');
64
- $portfolio_structure = '/'.$port_rewrite.'/%portfolio%';
65
- $wp_rewrite->add_rewrite_tag("%portfolio%", '([^/]+)', "portfolio=");
66
- $wp_rewrite->add_permastruct('portfolio', $portfolio_structure, false);
 
67
  }
68
  add_action( 'init', 'kadence_toolkit_portfolio_permalink_init', 2 );
69
 
70
- // Add filter to plugin init function
71
- add_filter('post_type_link', 'kadence_toolkit_portfolio_permalink', 10, 3);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
 
73
- function kadence_toolkit_portfolio_permalink($permalink, $post_id, $leavename) {
74
- $post = get_post($post_id);
75
- $rewritecode = array(
76
- '%year%',
77
- '%monthnum%',
78
- '%day%',
79
- '%hour%',
80
- '%minute%',
81
- '%second%',
82
- $leavename? '' : '%postname%',
83
- '%post_id%',
84
- '%category%',
85
- '%author%',
86
- $leavename? '' : '%pagename%',
87
- );
88
-
89
- if ( '' != $permalink && !in_array($post->post_status, array('draft', 'pending', 'auto-draft')) ) {
90
- $unixtime = strtotime($post->post_date);
91
-
92
- $category = '';
93
- if ( strpos($permalink, '%category%') !== false ) {
94
- $cats = wp_get_post_terms($post->ID, 'portfolio-type', array( 'orderby' => 'parent', 'order' => 'DESC' ));
95
- if ( $cats ) {
96
- //usort($cats, '_usort_terms_by_ID'); // order by ID
97
- $category = $cats[0]->slug;
98
- }
99
- // show default category in permalinks, without
100
- // having to assign it explicitly
101
- if ( empty($category) ) {
102
- $category = 'portfolio-category';
103
- }
104
- }
105
-
106
- $author = '';
107
- if ( strpos($permalink, '%author%') !== false ) {
108
- $authordata = get_userdata($post->post_author);
109
- $author = $authordata->user_nicename;
110
- }
111
-
112
- $date = explode(" ",date('Y m d H i s', $unixtime));
113
- $rewritereplace =
114
- array(
115
- $date[0],
116
- $date[1],
117
- $date[2],
118
- $date[3],
119
- $date[4],
120
- $date[5],
121
- $post->post_name,
122
- $post->ID,
123
- $category,
124
- $author,
125
- $post->post_name,
126
- );
127
- $permalink = str_replace($rewritecode, $rewritereplace, $permalink);
128
- } else { // if they're not using the fancy permalink option
129
- }
130
- return $permalink;
131
- }
132
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <?php
2
+ /**
3
+ * Init Custom post types
4
+ *
5
+ * @package Kadence Toolkit
6
+ */
7
+
8
+ /**
9
+ * Init Portfolio posts type.
10
+ */
11
  function kadence_toolkit_portfolio_post_init() {
12
+ $portfoliolabels = array(
13
+ 'name' => __( 'Portfolio', 'virtue-toolkit' ),
14
+ 'singular_name' => __( 'Portfolio Item', 'virtue-toolkit' ),
15
+ 'add_new' => __( 'Add New', 'virtue-toolkit' ),
16
+ 'add_new_item' => __( 'Add New Portfolio Item', 'virtue-toolkit' ),
17
+ 'edit_item' => __( 'Edit Portfolio Item', 'virtue-toolkit' ),
18
+ 'new_item' => __( 'New Portfolio Item', 'virtue-toolkit' ),
19
+ 'all_items' => __( 'All Portfolio', 'virtue-toolkit' ),
20
+ 'view_item' => __( 'View Portfolio Item', 'virtue-toolkit' ),
21
+ 'search_items' => __( 'Search Portfolio', 'virtue-toolkit' ),
22
+ 'not_found' => __( 'No Portfolio Item found', 'virtue-toolkit' ),
23
+ 'not_found_in_trash' => __( 'No Portfolio Items found in Trash', 'virtue-toolkit' ),
24
+ 'parent_item_colon' => '',
25
+ 'menu_name' => __( 'Portfolio', 'virtue-toolkit' ),
26
+ );
27
+
28
+ $portargs = array(
29
+ 'labels' => $portfoliolabels,
30
+ 'public' => true,
31
+ 'publicly_queryable' => true,
32
+ 'show_ui' => true,
33
+ 'show_in_menu' => true,
34
+ 'query_var' => true,
35
+ // 'rewrite' => array( 'slug' => 'portfolio', 'feeds' => true),.
36
+ 'has_archive' => false,
37
+ 'capability_type' => 'post',
38
+ 'hierarchical' => false,
39
+ 'menu_position' => 8,
40
+ 'show_in_rest' => true,
41
+ 'menu_icon' => 'dashicons-format-gallery',
42
+ 'supports' => array( 'title', 'editor', 'excerpt', 'author', 'page-attributes', 'thumbnail', 'custom-fields', 'comments' ),
43
+ );
44
 
45
+ // Initialize Taxonomy Labels.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  $worklabels = array(
47
+ 'name' => __( 'Portfolio Type', 'virtue-toolkit' ),
48
+ 'singular_name' => __( 'Type', 'virtue-toolkit' ),
49
+ 'search_items' => __( 'Search Type', 'virtue-toolkit' ),
50
+ 'all_items' => __( 'All Type', 'virtue-toolkit' ),
51
+ 'parent_item' => __( 'Parent Type', 'virtue-toolkit' ),
52
  'parent_item_colon' => __( 'Parent Type:', 'virtue-toolkit' ),
53
+ 'edit_item' => __( 'Edit Type', 'virtue-toolkit' ),
54
+ 'update_item' => __( 'Update Type', 'virtue-toolkit' ),
55
+ 'add_new_item' => __( 'Add New Type', 'virtue-toolkit' ),
56
+ 'new_item_name' => __( 'New Type Name', 'virtue-toolkit' ),
57
  );
 
 
 
 
 
 
 
 
 
58
 
59
+ // Allow slug to be filterd.
60
+ $portfolio_type_slug = apply_filters( 'kadence_portfolio_type_slug', 'portfolio-type' );
61
+
62
+ // Register Custom Taxonomy.
63
+ register_taxonomy( 'portfolio-type', array( 'portfolio' ), array(
64
+ 'hierarchical' => true, // define whether to use a system like tags or categories.
65
+ 'labels' => $worklabels,
66
+ 'show_ui' => true,
67
+ 'query_var' => true,
68
+ 'rewrite' => array( 'slug' => $portfolio_type_slug ),
69
+ ) );
70
+
71
+ register_post_type( 'portfolio', $portargs );
72
  }
73
  add_action( 'init', 'kadence_toolkit_portfolio_post_init', 1 );
74
+
75
+ /**
76
+ * Init Portfolio slug rewrite
77
+ */
78
+ function kadence_toolkit_portfolio_permalink_init() {
79
  global $wp_rewrite;
80
+ $port_rewrite = apply_filters( 'kadence_portfolio_permalink_slug', 'portfolio' );
81
+ $portfolio_structure = '/' . $port_rewrite . '/%portfolio%';
82
+
83
+ $wp_rewrite->add_rewrite_tag( '%portfolio%', '([^/]+)', 'portfolio=' );
84
+ $wp_rewrite->add_permastruct( 'portfolio', $portfolio_structure, false );
85
  }
86
  add_action( 'init', 'kadence_toolkit_portfolio_permalink_init', 2 );
87
 
88
+ /**
89
+ * Run Portfolio slug rewrite
90
+ *
91
+ * @param string $permalink incoming permalink setting.
92
+ * @param int $post_id incoming post ID.
93
+ * @param string $leavename incoming name.
94
+ */
95
+ function kadence_toolkit_portfolio_permalink( $permalink, $post_id, $leavename ) {
96
+ $post = get_post( $post_id );
97
+ $rewritecode = array(
98
+ '%year%',
99
+ '%monthnum%',
100
+ '%day%',
101
+ '%hour%',
102
+ '%minute%',
103
+ '%second%',
104
+ $leavename ? '' : '%postname%',
105
+ '%post_id%',
106
+ '%category%',
107
+ '%author%',
108
+ $leavename ? '' : '%pagename%',
109
+ );
110
+
111
+ if ( ! empty( $permalink ) && ! in_array( $post->post_status, array( 'draft', 'pending', 'auto-draft' ) ) ) {
112
+ $unixtime = strtotime( $post->post_date );
113
+ $category = '';
114
+ $author = '';
115
+ if ( strpos( $permalink, '%category%' ) !== false ) {
116
+ $cats = wp_get_post_terms( $post->ID, 'portfolio-type', array(
117
+ 'orderby' => 'parent',
118
+ 'order' => 'DESC',
119
+ ) );
120
+ if ( $cats ) {
121
+ // usort($cats, '_usort_terms_by_ID'); // order by ID.
122
+ $category = $cats[0]->slug;
123
+ }
124
+ // show default category in permalinks, without.
125
+ // having to assign it explicitly.
126
+ if ( empty( $category ) ) {
127
+ $category = 'portfolio-category';
128
+ }
129
+ }
130
 
131
+ if ( strpos( $permalink, '%author%' ) !== false ) {
132
+ $authordata = get_userdata( $post->post_author );
133
+ $author = $authordata->user_nicename;
134
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
135
 
136
+ $date = explode( ' ', date( 'Y m d H i s', $unixtime ) );
137
+ $rewritereplace = array(
138
+ $date[0],
139
+ $date[1],
140
+ $date[2],
141
+ $date[3],
142
+ $date[4],
143
+ $date[5],
144
+ $post->post_name,
145
+ $post->ID,
146
+ $category,
147
+ $author,
148
+ $post->post_name,
149
+ );
150
+ $permalink = str_replace( $rewritecode, $rewritereplace, $permalink );
151
+ }
152
+ return $permalink;
153
+ }
154
+ add_filter( 'post_type_link', 'kadence_toolkit_portfolio_permalink', 10, 3 );
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: britner
3
  Tags:
4
  Requires at least: 4.2
5
  Tested up to: 4.9.2
6
- Stable tag: 4.8
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -43,6 +43,10 @@ Install the plugin into the `/wp-content/plugins/` folder, and activate it.
43
 
44
  == Changelog ==
45
 
 
 
 
 
46
  = 4.8 =
47
  * Small change in meta load.
48
 
3
  Tags:
4
  Requires at least: 4.2
5
  Tested up to: 4.9.2
6
+ Stable tag: 4.9.0
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.0 =
47
+ * Update welcome page.
48
+ * Portfolio post using rest api.
49
+
50
  = 4.8 =
51
  * Small change in meta load.
52
 
virtue_toolkit.php CHANGED
@@ -1,51 +1,57 @@
1
  <?php
2
-
3
  /*
4
  Plugin Name: Kadence Toolkit
5
  Description: Custom Portfolio and Shortcode functionality for free Kadence WordPress themes
6
- Version: 4.8
7
  Author: Kadence Themes
8
  Author URI: https://kadencethemes.com/
9
  License: GPLv2 or later
10
  */
11
 
 
 
 
12
  function virtue_toolkit_activation() {
13
  flush_rewrite_rules();
14
- get_option('kadence_toolkit_flushpermalinks', '1');
15
- }
16
- register_activation_hook(__FILE__, 'virtue_toolkit_activation');
17
-
18
- function virtue_toolkit_deactivation() {
19
  }
20
- register_deactivation_hook(__FILE__, 'virtue_toolkit_deactivation');
21
 
22
- add_filter( 'kadence_theme_options_args', 'virtue_toolkit_redux_args_new');
 
 
 
 
23
  function virtue_toolkit_redux_args_new( $args ) {
24
- $args['customizer_only'] = false;
25
- $args['save_defaults'] = true;
26
- return $args;
27
  }
 
28
 
29
- if(!defined('VIRTUE_TOOLKIT_PATH')){
30
- define('VIRTUE_TOOLKIT_PATH', realpath(plugin_dir_path(__FILE__)) . DIRECTORY_SEPARATOR );
31
  }
32
- if(!defined('VIRTUE_TOOLKIT_URL')){
33
- define('VIRTUE_TOOLKIT_URL', plugin_dir_url(__FILE__) );
34
  }
35
 
36
- require_once( VIRTUE_TOOLKIT_PATH . 'kadence_image_processing.php' );
37
- require_once( VIRTUE_TOOLKIT_PATH . 'post-types.php' );
38
- require_once( VIRTUE_TOOLKIT_PATH . 'gallery.php' );
39
- require_once( VIRTUE_TOOLKIT_PATH . 'author_box.php' );
40
- require_once( VIRTUE_TOOLKIT_PATH . 'shortcodes.php' );
41
- require_once( VIRTUE_TOOLKIT_PATH . 'shortcode_ajax.php' );
42
- require_once( VIRTUE_TOOLKIT_PATH . 'pagetemplater.php' );
43
- require_once( VIRTUE_TOOLKIT_PATH . 'metaboxes.php' );
44
- require_once( VIRTUE_TOOLKIT_PATH . 'welcome.php' );
45
- require_once( VIRTUE_TOOLKIT_PATH . 'widgets.php' );
46
-
 
 
 
47
  function virtue_toolkit_textdomain() {
48
- load_plugin_textdomain( 'virtue-toolkit', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
49
  }
50
  add_action( 'plugins_loaded', 'virtue_toolkit_textdomain' );
51
 
@@ -65,9 +71,9 @@ add_action('admin_enqueue_scripts', 'virtue_toolkit_admin_scripts');
65
 
66
  function virtue_toolkit_flushpermalinks() {
67
  $hasflushed = get_option('kadence_toolkit_flushpermalinks', '0');
68
- if($hasflushed != '1') {
69
  flush_rewrite_rules();
70
- update_option('kadence_toolkit_flushpermalinks', '1');
71
  }
72
  }
73
  add_action('init', 'virtue_toolkit_flushpermalinks');
1
  <?php
 
2
  /*
3
  Plugin Name: Kadence Toolkit
4
  Description: Custom Portfolio and Shortcode functionality for free Kadence WordPress themes
5
+ Version: 4.9.0
6
  Author: Kadence Themes
7
  Author URI: https://kadencethemes.com/
8
  License: GPLv2 or later
9
  */
10
 
11
+ /**
12
+ * Kadence Toolkit Activation
13
+ */
14
  function virtue_toolkit_activation() {
15
  flush_rewrite_rules();
16
+ get_option( 'kadence_toolkit_flushpermalinks', '2' );
 
 
 
 
17
  }
18
+ register_activation_hook( __FILE__, 'virtue_toolkit_activation' );
19
 
20
+ /**
21
+ * Set redux args
22
+ *
23
+ * @param array $args redux framework args.
24
+ */
25
  function virtue_toolkit_redux_args_new( $args ) {
26
+ $args['customizer_only'] = false;
27
+ $args['save_defaults'] = true;
28
+ return $args;
29
  }
30
+ add_filter( 'kadence_theme_options_args', 'virtue_toolkit_redux_args_new' );
31
 
32
+ if ( ! defined( 'VIRTUE_TOOLKIT_PATH' ) ) {
33
+ define( 'VIRTUE_TOOLKIT_PATH', realpath( plugin_dir_path( __FILE__ ) ) . DIRECTORY_SEPARATOR );
34
  }
35
+ if ( ! defined( 'VIRTUE_TOOLKIT_URL' ) ) {
36
+ define( 'VIRTUE_TOOLKIT_URL', plugin_dir_url( __FILE__ ) );
37
  }
38
 
39
+ require_once VIRTUE_TOOLKIT_PATH . 'kadence_image_processing.php';
40
+ require_once VIRTUE_TOOLKIT_PATH . 'post-types.php';
41
+ require_once VIRTUE_TOOLKIT_PATH . 'gallery.php';
42
+ require_once VIRTUE_TOOLKIT_PATH . 'author_box.php';
43
+ require_once VIRTUE_TOOLKIT_PATH . 'shortcodes.php';
44
+ require_once VIRTUE_TOOLKIT_PATH . 'shortcode_ajax.php';
45
+ require_once VIRTUE_TOOLKIT_PATH . 'pagetemplater.php';
46
+ require_once VIRTUE_TOOLKIT_PATH . 'metaboxes.php';
47
+ require_once VIRTUE_TOOLKIT_PATH . 'class-virtue-toolkit-welcome.php';
48
+ require_once VIRTUE_TOOLKIT_PATH . 'widgets.php';
49
+
50
+ /**
51
+ * Virtue Toolkit Textdomain
52
+ */
53
  function virtue_toolkit_textdomain() {
54
+ load_plugin_textdomain( 'virtue-toolkit', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
55
  }
56
  add_action( 'plugins_loaded', 'virtue_toolkit_textdomain' );
57
 
71
 
72
  function virtue_toolkit_flushpermalinks() {
73
  $hasflushed = get_option('kadence_toolkit_flushpermalinks', '0');
74
+ if($hasflushed != '2') {
75
  flush_rewrite_rules();
76
+ update_option('kadence_toolkit_flushpermalinks', '2');
77
  }
78
  }
79
  add_action('init', 'virtue_toolkit_flushpermalinks');
welcome.php DELETED
@@ -1,294 +0,0 @@
1
- <?php
2
- // Build Welcome Page
3
- if ( ! defined( 'ABSPATH' ) ) {
4
- exit;
5
- }
6
-
7
- if ( ! class_exists( 'virtue_toolkit_welcome' ) ) {
8
- class virtue_toolkit_welcome {
9
- private $my_theme;
10
- public $theme_name;
11
- public $version;
12
- public function __construct() {
13
- if ( is_admin() ) {
14
- $this->my_theme = wp_get_theme(); // Get theme data
15
- if($this->my_theme->get( 'Name' ) == 'Ascend' || $this->my_theme->get( 'Name' ) == 'Virtue' || $this->my_theme->get( 'Name' ) == 'Pinnacle' ) {
16
- $this->theme_name = $this->my_theme->get( 'Name' );
17
- } elseif ($this->my_theme->get( 'Template') == 'ascend' ){
18
- $this->theme_name = 'Ascend';
19
- } elseif($this->my_theme->get( 'Template') == 'virtue' ) {
20
- $this->theme_name = 'Virtue';
21
- } elseif($this->my_theme->get( 'Template') == 'pinnacle' ){
22
- $this->theme_name = 'Pinnacle';
23
- } else {
24
- $this->theme_name = 'Not Kadence';
25
- }
26
- if($this->theme_name != 'Not Kadence') {
27
- add_action( 'admin_menu', array( $this, 'add_menu' ) );
28
- }
29
- add_action( 'tgmpa_register', array($this, 'register_importer'), 30);
30
- add_filter( 'plugin_action_links_virtue-toolkit/virtue_toolkit.php', array($this, 'add_settings_link') );
31
- }
32
- }
33
- // Add option page menu
34
- public function add_menu() {
35
- $page = add_theme_page(__( 'Getting Started with: ', 'virtue-toolkit' ) . $this->theme_name, __( 'Getting Started', 'virtue-toolkit' ), 'manage_options', 'kadence_welcome_page', array( $this, 'config_page'));
36
- add_action( 'admin_print_styles-' . $page, array( $this, 'css_scripts' ) );
37
- }
38
- // Loads admin style sheets
39
- public function css_scripts() {
40
- wp_enqueue_style( 'toolkit-welcome-css', VIRTUE_TOOLKIT_URL . '/welcome/toolkit-welcome.css', array(), $this->version, 'all');
41
- wp_enqueue_script('toolkit-welcome-js', VIRTUE_TOOLKIT_URL . '/welcome/toolkit-welcome.js',array(), $this->version, true);
42
- add_thickbox();
43
- }
44
- public function config_page() {
45
- if($this->theme_name == 'Not Kadence') { ?>
46
- <div class="wrap kt_theme_welcome">
47
- <h2 class="notices"></h2>
48
- <div class="kt_title_area">
49
- <h1>
50
- <?php echo __('The Kadence Toolkit is only designed to work with Kadence Themes', 'virtue-toolkit'); ?>
51
- </h1>
52
- </div>
53
- </div>
54
- <?php
55
- } else {
56
-
57
- ?>
58
- <div class="wrap kt_theme_welcome">
59
- <h2 class="notices"></h2>
60
- <div class="kt_title_area">
61
- <h1>
62
- <?php echo apply_filters('kt_getting_started_page_title', __('Getting Started with ', 'virtue-toolkit'). $this->theme_name ); ?>
63
- </h1>
64
- <h4>
65
- <?php echo apply_filters('kt_getting_started_page_subtitle', __('Demo content, recomended plugins and helpful links.', 'virtue-toolkit') ); ?>
66
- </h4>
67
- </div>
68
- <?php ob_start(); ?>
69
- <div class="kad-panel-left kt-admin-clearfix">
70
- <div class="kad-panel-contain">
71
- <h2 class="nav-tab-wrapper">
72
- <?php do_action('kt_getting_started_nav_before'); ?>
73
- <a class="nav-tab nav-tab-active" data-tab-id="kt-helplinks" href="#"><?php echo __('Helpful Links', 'virtue-toolkit');?></a>
74
- <a class="nav-tab" data-tab-id="kt-plugins" href="#"><?php echo __('Recomended Plugins', 'virtue-toolkit');?></a>
75
- <a class="nav-tab" data-tab-id="kt-demo-content" href="#"><?php echo __('Demo Content', 'virtue-toolkit');?></a>
76
- <?php do_action('kt_getting_started_nav_after'); ?>
77
- </h2>
78
- <?php do_action('kt_getting_started_before'); ?>
79
- <div id="kt-helplinks" class="nav-tab-content panel_open kt-admin-clearfix">
80
- <div class="kad-helpful-links kt-main">
81
- <h4><?php echo __('Getting Started', 'virtue-toolkit');?></h4>
82
- <?php echo '<a href="http://docs.kadencethemes.com/'.esc_attr(strtolower($this->theme_name)).'-free/" target="_blank">'.esc_html($this->theme_name) . __( ' Documention', 'virtue-toolkit').'</a>';?>
83
- <a href="https://www.kadencethemes.com/kadence-themes-demo-content/" target="_blank"><?php echo __('Demo Content', 'virtue-toolkit');?></a>
84
- <a href="https://www.kadencethemes.com/kadence-tutorials/" target="_blank"><?php echo __('Tutorials', 'virtue-toolkit');?></a>
85
- <h4 class="kt-next-section"><?php echo __('Support', 'virtue-toolkit');?></h4>
86
- <?php if($this->theme_name == 'Ascend') {
87
- $link = 'https://wordpress.org/support/theme/ascend';
88
- } else if($this->theme_name == 'Virtue') {
89
- $link = 'https://wordpress.org/support/theme/virtue';
90
- } else if($this->theme_name == 'Pinnacle') {
91
- $link = 'https://wordpress.org/support/theme/pinnacle';
92
- }
93
- echo '<a href="'.esc_url($link).'" target="_blank">'.esc_html($this->theme_name) . __(' Support Forms', 'virtue-toolkit').'</a>';?>
94
- </div>
95
- </div>
96
- <div id="kt-plugins" class="nav-tab-content kt-admin-clearfix">
97
- <div class="kad-recomended-plugins kt-main">
98
- <h4><?php echo __('Recomended Plugins', 'virtue-toolkit');?></h4>
99
- <p><?php echo __('These are plugins are not required. Just some cool plugins with cool features that can really enhance your site.', 'virtue-toolkit');?></p>
100
- <div class="kt_suggest_section kt-admin-clearfix">
101
- <?php
102
- $suggested = $this->suggested_plugins();
103
- foreach ($suggested as $plugin) {
104
- echo '<div class="kt_plugin_box">';
105
- echo '<img src="'.$plugin['image'].'">';
106
- echo '<h3>'.$plugin['name'].'</h3>';
107
- echo '<h5>'.$plugin['activated'].'</h5>';
108
- echo '<p>'.$plugin['desc'].'</p>';
109
- echo '<a class="kt_plugin_button '.esc_attr($plugin['class']).'" href="'.esc_attr($plugin['action']).'">'.esc_html($plugin['action_title']).'</a>';
110
- echo '</div>';
111
- }
112
- ?>
113
- </div>
114
- </div>
115
- </div>
116
- <div id="kt-demo-content" class="nav-tab-content kt-admin-clearfix">
117
- <div class="kad-recomended-plugins kt-main">
118
- <h4><?php echo __('Install Demo Content Importer', 'virtue-toolkit');?></h4>
119
- <p><?php echo __('This importer plugin allows you to fill your site with demo content from one of the theme demos.', 'virtue-toolkit');?></p>
120
- <p><?php echo __('For a turorial on how to use the Importer go here:', 'virtue-toolkit'). ' <a href="https://www.kadencethemes.com/kadence-themes-demo-content/" target="_blank">https://www.kadencethemes.com/kadence-themes-demo-content/</a>'; ?></p>
121
- <div class="kt_demo_section kt-admin-clearfix">
122
- <div class="kt_plugin_box">
123
- <img src="<?php echo VIRTUE_TOOLKIT_URL . 'welcome/images/kip_logo.jpg';?>">
124
- <h3>Kadence Importer</h3>
125
- <?php if(is_plugin_active('kadence-importer/kadence-importer.php')) { ?>
126
- <h5>Activated</h5>
127
- <p>Kadence Importer plugin adds an import tool so you can fill your site with demo content</p>
128
- <a class="kt_plugin_button" href="<?php echo admin_url('tools.php?page=kadence-importer');?>">Plugin Settings</a>
129
- <?php } else { ?>
130
- <h5>Inactive</h5>
131
- <p>Kadence Importer plugin adds an import tool so you can fill your site with demo content</p>
132
- <a class="kt_plugin_button" href="<?php echo admin_url('themes.php?page=install-recommended-plugins');?>">Install/Activate Plugin</a>
133
- <?php } ?>
134
- </div>
135
- </div>
136
- </div>
137
- </div>
138
- <?php do_action('kt_getting_started_after'); ?>
139
- </div>
140
- </div>
141
- <div class="kad-panel-bottom kt-admin-clearfix">
142
- <div class="kad-featured-items kt-admin-clearfix">
143
- <div class="featured">
144
- <h4><?php echo __('Featured Theme', 'virtue-toolkit');?></h4>
145
- <a href="https://www.kadencethemes.com/product/ascend-wordpress-theme/?utm_source=toolkit&utm_medium=cpc&utm_campaign=ascend_free" target="_blank">
146
- <img src="<?php echo VIRTUE_TOOLKIT_URL . 'welcome/images/theme_feat.jpg';?>">
147
- </a>
148
- <a href="https://www.kadencethemes.com/product/ascend-wordpress-theme/?utm_source=toolkit&utm_medium=cpc&utm_campaign=ascend_free" target="_blank"><h3>Ascend</h3></a>
149
- <p>Ascend will surpass your expectations over and over again. Amazingly versatile, easily customizable and loaded with features you will love. Easily install and start right from one of our many demos.</p>
150
- <a href="https://www.kadencethemes.com/product/ascend-wordpress-theme/?utm_source=toolkit&utm_medium=cpc&utm_campaign=ascend_free" target="_blank"><h5>FREE THEME</h5></a>
151
- </div>
152
- <div class="featured">
153
- <h4><?php echo __('Featured Plugin', 'virtue-toolkit');?></h4>
154
- <a href="https://www.kadencethemes.com/product/kadence-woo-extras/?utm_source=toolkit&utm_medium=cpc&utm_campaign=woo_extra" target="_blank">
155
- <img src="<?php echo VIRTUE_TOOLKIT_URL . 'welcome/images/plugin_feat.jpg';?>">
156
- </a>
157
- <a href="https://www.kadencethemes.com/product/kadence-woo-extras/?utm_source=toolkit&utm_medium=cpc&utm_campaign=woo_extra" target="_blank"><h3>Kadence Woo Extras</h3></a>
158
- <p>Kadence Woo Extras is a powerful plugin for adding special features to your e-commerce site. Advanced product galleries, reviews, cart notices, size charts, variation swatches, and more.</p>
159
- <a href="https://www.kadencethemes.com/product/ascend-wordpress-theme/?utm_source=toolkit&utm_medium=cpc&utm_campaign=ascend_free" target="_blank"><h5>PREMIUM PLUGIN</h5></a>
160
- </div>
161
- </div>
162
- </div>
163
- <?php
164
- $welcome_content = ob_get_clean();
165
- echo apply_filters( 'kt_getting_started_content', $welcome_content );
166
- ?>
167
- </div>
168
- <?php
169
- }
170
- }
171
- public function suggested_plugins() {
172
- $suggested = array(
173
- 'siteorigin-panels' => array(
174
- 'slug' => 'siteorigin-panels',
175
- 'plugin_check' => 'siteorigin-panels/siteorigin-panels.php',
176
- 'name' => 'Page Builder',
177
- 'desc' => 'A drag and drop, responsive page builder that simplifies building your website.',
178
- 'image' => VIRTUE_TOOLKIT_URL . 'welcome/images/pb_logo.jpg',
179
- 'author' => 'SiteOrigin'
180
- ),
181
- 'black-studio-tinymce-widget' => array(
182
- 'slug' => 'black-studio-tinymce-widget',
183
- 'plugin_check' => 'black-studio-tinymce-widget/black-studio-tinymce-widget.php',
184
- 'name' => 'Visual Editor Widget',
185
- 'desc' => 'This plugin adds a new Visual Editor widget that allows you to insert rich text and media objects in your sidebars and pagebuilder widget areas.',
186
- 'image' => VIRTUE_TOOLKIT_URL . 'welcome/images/ve_logo.jpg',
187
- 'author' => 'Black Studio'
188
- ),
189
- 'woocommerce' => array(
190
- 'slug' => 'woocommerce',
191
- 'plugin_check' => 'woocommerce/woocommerce.php',
192
- 'name' => 'WooCommerce',
193
- 'desc' => 'WooCommerce is a free eCommerce plugin that allows you to sell anything, beautifully. Built to integrate seamlessly with WordPress.',
194
- 'image' => VIRTUE_TOOLKIT_URL . 'welcome/images/woo_logo.jpg',
195
- 'author' => 'WooThemes'
196
- ),
197
- 'wordpress-seo' => array(
198
- 'slug' => 'wordpress-seo',
199
- 'plugin_check' => 'wordpress-seo/wp-seo.php',
200
- 'name' => 'Yoast SEO',
201
- 'desc' => 'Improve your WordPress SEO: Write better content and have a fully optimized WordPress site using Yoast SEO plugin.',
202
- 'image' => VIRTUE_TOOLKIT_URL . 'welcome/images/ws_logo.jpg',
203
- 'author' => 'Yoast'
204
- ),
205
- 'contact-form-7' => array(
206
- 'slug' => 'contact-form-7',
207
- 'plugin_check' => 'contact-form-7/contact-form-7.php',
208
- 'name' => 'Contact Form 7',
209
- 'desc' => 'Contact Form 7 can manage multiple contact forms, plus you can customize the form and the mail contents flexibly with simple markup.',
210
- 'image' => VIRTUE_TOOLKIT_URL . 'welcome/images/cf7_logo.jpg',
211
- 'author' => 'Contact Form 7'
212
- ),
213
- );
214
- foreach ($suggested as $plugin) {
215
- if(is_plugin_active($plugin['plugin_check'])) {
216
- $action = admin_url('plugins.php');
217
- $action_title = __('Manage Plugins', 'pinnacle');
218
- $activated = __('Activated', 'pinnacle');
219
- $class = '';
220
- } else {
221
- $action = admin_url('plugin-install.php?tab=plugin-information&amp;plugin='.$plugin['slug']);
222
- $action_title = 'Install/Activate Plugin';
223
- $activated = 'Inactive';
224
- $class = 'thickbox onclick';
225
- }
226
- $output[$plugin['slug']] = array(
227
- 'image' => $plugin['image'],
228
- 'name' => $plugin['name'],
229
- 'author' => $plugin['author'],
230
- 'desc' => $plugin['desc'],
231
- 'action' => $action,
232
- 'action_title' => $action_title,
233
- 'activated' => $activated,
234
- 'class' => $class,
235
- );
236
- }
237
-
238
- return $output;
239
-
240
- }
241
- public function register_importer() {
242
- $plugins = array();
243
- $plugins[] = array(
244
- 'name' => 'Kadence Importer',
245
- 'slug' => 'kadence-importer',
246
- 'source' => 'https://s3.amazonaws.com/ktupdates/importer/kadence-importer.zip',
247
- 'required' => false,
248
- 'version' => '2.0',
249
- 'force_activation' => false,
250
- 'force_deactivation' => false,
251
- 'external_url' => '',
252
- );
253
- $config = array(
254
- 'domain' => 'virtue-toolkit', // Text domain - likely want to be the same as your theme.
255
- 'default_path' => '', // Default absolute path to pre-packaged plugins
256
- 'parent_slug' => 'themes.php', // Parent menu slug.
257
- 'menu' => 'install-recommended-plugins', // Menu slug
258
- 'has_notices' => false, // Show admin notices or not
259
- 'is_automatic' => false, // Automatically activate plugins after installation or not
260
- 'message' => '', // Message to output right before the plugins table
261
- 'strings' => array(
262
- 'page_title' => __( 'Install Recommended Plugins', 'virtue-toolkit' ),
263
- 'menu_title' => __( 'Theme Plugins', 'virtue-toolkit' ),
264
- 'installing' => __( 'Installing Plugin: %s', 'virtue-toolkit' ), // %1$s = plugin name
265
- 'oops' => __( 'Something went wrong with the plugin API.', 'virtue-toolkit' ),
266
- 'notice_can_install_required' => _n_noop( 'This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.', 'virtue-toolkit' ), // %1$s = plugin name(s)
267
- 'notice_can_install_recommended' => _n_noop( 'This theme comes packaged with the following premium plugin: %1$s. Plugin is not required, but suggested.', 'This theme comes packaged with the following premium plugins: %1$s. Plugins are not required, but suggested.', 'virtue-toolkit' ), // %1$s = plugin name(s)
268
- 'notice_cannot_install' => _n_noop( 'Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.', 'virtue-toolkit' ), // %1$s = plugin name(s)
269
- 'notice_can_activate_required' => _n_noop( 'The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.' , 'virtue-toolkit'), // %1$s = plugin name(s)
270
- 'notice_can_activate_recommended' => _n_noop( 'The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.' , 'virtue-toolkit'), // %1$s = plugin name(s)
271
- 'notice_cannot_activate' => _n_noop( 'Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.', 'virtue-toolkit' ), // %1$s = plugin name(s)
272
- 'notice_ask_to_update' => _n_noop( 'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.' , 'virtue-toolkit'), // %1$s = plugin name(s)
273
- 'notice_cannot_update' => _n_noop( 'Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.' , 'virtue-toolkit'), // %1$s = plugin name(s)
274
- 'install_link' => _n_noop( 'Begin installing plugin', 'Begin installing plugins', 'virtue-toolkit' ),
275
- 'activate_link' => _n_noop( 'Activate installed plugin', 'Activate installed plugins', 'virtue-toolkit' ),
276
- 'return' => __( 'Return to recommended Plugins Installer', 'virtue-toolkit' ),
277
- 'plugin_activated' => __( 'Plugin activated successfully.', 'virtue-toolkit' ),
278
- 'complete' => __( 'All plugins installed and activated successfully. %s', 'virtue-toolkit' ), // %1$s = dashboard link
279
- 'nag_type' => 'updated' // Determines admin notice type - can only be 'updated' or 'error'
280
- )
281
- );
282
- if($this->theme_name != 'Not Kadence') {
283
- tgmpa( $plugins, $config );
284
- }
285
- }
286
- public function add_settings_link( $links ) {
287
- $settings_link = '<a href="'.admin_url('themes.php?page=kadence_welcome_page').'">' . __( 'Settings', 'virtue-toolkit' ) . '</a>';
288
- array_push($links, $settings_link );
289
- return $links;
290
- }
291
- }
292
- }
293
-
294
- $GLOBALS['virtue_toolkit_welcome'] = new virtue_toolkit_welcome;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
welcome/images/cf7_logo.jpg DELETED
Binary file
welcome/images/kt-woo-ele.jpg ADDED
Binary file
welcome/images/kt-woo-email-designer.jpg ADDED
Binary file
welcome/images/pb_logo.jpg DELETED
Binary file
welcome/images/plugin_feat.jpg DELETED
Binary file
welcome/images/theme_feat.jpg DELETED
Binary file
welcome/images/toolkit_brizy.jpg ADDED
Binary file
welcome/images/toolkit_ele.jpg ADDED
Binary file
welcome/images/toolkit_siteorigin.jpg ADDED
Binary file
welcome/images/ve_logo.jpg DELETED
Binary file
welcome/images/wpforms_logo.jpg ADDED
Binary file
welcome/toolkit-welcome.css CHANGED
@@ -1,27 +1,251 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  .kt_theme_welcome h1 {
2
- font-size: 42px;
3
  line-height: 1.2;
4
- font-weight: 300;
5
- margin-bottom: 10px;
 
 
 
6
  }
7
  .kt_theme_welcome h4 {
8
- color: #555;
9
- font-size: 18px;
10
  line-height: 1.6;
11
- font-weight: bold;
12
  letter-spacing: 1.2px;
13
  margin: 0;
 
 
 
 
14
  }
15
  .kt_theme_welcome .kt_title_area h4{
16
- font-weight:400;
 
17
  }
18
  .kt-admin-clearfix:before, .kt-admin-clearfix:after {
19
  content: '';
20
  clear:both;
21
  display:table;
22
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  .kad-panel-left, .kad-panel-bottom {
24
- max-width:1200px;
25
  float: none;
26
  padding: 0 30px 30px 20px;
27
  box-sizing: border-box;
@@ -55,15 +279,6 @@
55
  .kad-panel-left .nav-tab-content.panel_open {
56
  display: block;
57
  }
58
- .kad-panel-right, .kad-panel-left {
59
- margin-top: 60px;
60
- }
61
- .kt-main {
62
- max-width: 600px;
63
- }
64
- .kt-main h2 {
65
- margin: 10px 0 20px 0;
66
- }
67
  .kt-main input[type='text'] {
68
  margin-right: 5px;
69
  padding: 8px;
@@ -143,13 +358,9 @@ ul.celist{ list-style-type: square; list-style-position:inside; }
143
  a.kt_plugin_button {
144
  text-decoration: none;
145
  color: white;
146
- background: #555;
147
- padding: 8px 12px;
148
  display: inline-block;
149
  }
150
- a.kt_plugin_button:hover {
151
- opacity: .9;
152
- }
153
  .kt_plugin_box {
154
  padding: 20px;
155
  width: 46%;
@@ -159,6 +370,7 @@ a.kt_plugin_button:hover {
159
  margin-left: 2%;
160
  margin-bottom: 2%;
161
  margin-top: 2%;
 
162
  text-align: center;
163
  box-sizing: border-box;
164
  }
@@ -168,15 +380,163 @@ a.kt_plugin_button:hover {
168
  font-style: italic;
169
  }
170
  .kt_plugin_box p {
171
- min-height: 80px;
 
172
  }
173
  .kt_plugin_box img {
174
  max-width: 100%;
175
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
176
  .kad-featured-items {
177
  background: #fff;
178
  max-width: 100%;
179
- padding: 20px 10px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
180
  }
181
  .kad-featured-items .featured {
182
  float: left;
@@ -189,11 +549,34 @@ a.kt_plugin_button:hover {
189
  }
190
  .kad-featured-items .featured h4 {
191
  font-weight: bold;
192
- letter-spacing: 2px;
193
  text-transform: uppercase;
194
- padding: 0 0 10px 0;
 
 
195
  color: #555;
196
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
197
  .kad-featured-items .featured a {
198
  text-decoration: none;
199
  display: block;
1
+ .nav-tab-content * {
2
+ box-sizing: border-box;
3
+ }
4
+ .kt-promo-box-contain {
5
+ padding: 0 15px;
6
+ }
7
+ .kt-promo-row:after {
8
+ clear: both;
9
+ display: table;
10
+ content: '';
11
+ }
12
+ .kt-promo-row {
13
+ margin: 0 -15px;
14
+ }
15
+ @media (min-width: 782px) {
16
+ .kt-promo-box-contain {
17
+ width: 50%;
18
+ float:left;
19
+ }
20
+ .kt-promo-box-contain.kt-promo-three {
21
+ width: 33.33%;
22
+ }
23
+ }
24
+ .kt-welcome-clearfix:after {
25
+ clear:both;
26
+ display: table;
27
+ content: '';
28
+ }
29
+ .kt-promo-box {
30
+ border-radius: 10px;
31
+ padding: 20px 40px;
32
+ margin:10px 0 20px;
33
+ color: white;
34
+ display: flex;
35
+ display: -webkit-flex;
36
+ display: -ms-flexbox;
37
+ display: -ms-flex;
38
+ display: flex;
39
+ -webkit-align-items: center;
40
+ -ms-align-items: center;
41
+ align-items: center;
42
+ -webkit-justify-content: center;
43
+ -ms-justify-content: center;
44
+ justify-content: center;
45
+ flex-direction: row;
46
+ }
47
+ @media (max-width:1100px) {
48
+ .kt-promo-box {
49
+ flex-direction: column;
50
+ }
51
+ }
52
+ .kt-promo-three .kt-promo-box {
53
+ color: #444;
54
+ flex-direction: column;
55
+ border: 2px solid #ddd;
56
+ text-align: center;
57
+ }
58
+ .kt_theme_welcome .kt-promo-three .kt-promo-box a {
59
+ color: #444;
60
+ border: 2px solid #444;
61
+ display: block;
62
+ }
63
+ .kt_theme_welcome .kt-promo-three .kt-promo-box a:hover {
64
+ color: #000;
65
+ border: 2px solid #000;
66
+ background:#f2f2f2;
67
+ }
68
+
69
+ .kt-promo-three .kt-promo-box h3 {
70
+ color: #444;
71
+ }
72
+ .kt-promo-three .kt-promo-icon-container {
73
+ padding-top:20px;
74
+ padding-right: 0;
75
+ }
76
+ .kt-demos-promo {
77
+ background: #F76A0C;
78
+ }
79
+ .kt-docs-promo {
80
+ background: #00b5e2;
81
+ }
82
+ .kt-builder-promo {
83
+ background: #dd4231;
84
+ }
85
+ .kt-plugins-promo {
86
+ background: #3c8e4e;
87
+ }
88
+ .kt_theme_welcome .kt-promo-box a {
89
+ border:2px solid #fff;
90
+ text-align:center;
91
+ color:white;
92
+ font-weight: 600;
93
+ letter-spacing: 1px;
94
+ border-radius: 4px;
95
+ display: inline-block;
96
+ text-decoration: none;
97
+ padding: 12px 18px;
98
+ margin-bottom: 20px;
99
+ vertical-align: middle;
100
+ height: auto;
101
+ box-shadow: none;
102
+ line-height: 1.4em;
103
+ font-size: 16px;
104
+ }
105
+ .kt_theme_welcome .kt-demos-promo a.updating-message {
106
+ background:white;
107
+ border:2px solid #fff;
108
+ color:#F76A0C;
109
+ }
110
+ .kt_theme_welcome .kt-demos-promo a {
111
+ background:#F76A0C;
112
+ }
113
+ .kt_theme_welcome a.nav-tab.go-pro-tab {
114
+ background: #00b5e2;
115
+ color: white;
116
+ }
117
+ .kt-main h2 {
118
+ font-size: 30px;
119
+ margin: 30px 0 30px;
120
+ font-weight: 300;
121
+ text-align: center;
122
+ }
123
+ .kt_theme_welcome .kt-demos-promo a:hover {
124
+ border:2px solid #fff;
125
+ color:#F76A0C;
126
+ background:white;
127
+ }
128
+ .kt_theme_welcome .kt-docs-promo a {
129
+ background:#00b5e2;
130
+ }
131
+ .kt_theme_welcome .kt-docs-promo a:hover {
132
+ border:2px solid #fff;
133
+ color:#00b5e2;
134
+ background:white;
135
+ }
136
+ .kt_theme_welcome .kt-builder-promo a:hover {
137
+ border:2px solid #fff;
138
+ color:#dd4231;
139
+ background:white;
140
+ }
141
+ .kt_theme_welcome .kt-plugins-promo a:hover {
142
+ border:2px solid #fff;
143
+ color:#3c8e4e;
144
+ background:white;
145
+ }
146
+ .kt-promo-box h3 {
147
+ font-size: 26px;
148
+ color: white;
149
+ margin-top: 20px;
150
+ line-height: 1;
151
+ margin-bottom: 10px;
152
+ }
153
+ .kt-promo-box p {
154
+ font-size: 14px;
155
+ }
156
+ .kt_theme_welcome{
157
+ margin-right: auto;
158
+ margin-left: auto;
159
+ margin-top: 45px;
160
+ margin-bottom: 45px;
161
+ max-width: 1300px;
162
+ padding-right: 20px;
163
+ }
164
  .kt_theme_welcome h1 {
 
165
  line-height: 1.2;
166
+ font-weight: 300;
167
+ font-size: 38px;
168
+ margin-bottom: 13px;
169
+ color: #222;
170
+ padding-top: 20px;
171
  }
172
  .kt_theme_welcome h4 {
 
 
173
  line-height: 1.6;
 
174
  letter-spacing: 1.2px;
175
  margin: 0;
176
+ font-size: 18px;
177
+ font-weight: 400;
178
+ margin-bottom: 20px;
179
+ color: #555;
180
  }
181
  .kt_theme_welcome .kt_title_area h4{
182
+ font-weight:300;
183
+ color: #888;
184
  }
185
  .kt-admin-clearfix:before, .kt-admin-clearfix:after {
186
  content: '';
187
  clear:both;
188
  display:table;
189
  }
190
+
191
+ .kt-svg-icon {
192
+ display: inline-block;
193
+ width: 1em;
194
+ height: 1em;
195
+ stroke-width: 0;
196
+ stroke: currentColor;
197
+ fill: currentColor;
198
+ }
199
+ .kt-svg-icon-browser {
200
+ width: 1.3125em;
201
+ }
202
+ .kt-svg-icon-presentation {
203
+ width: 0.96875em;
204
+ }
205
+
206
+ .kt-svg-icon-documents {
207
+ width: 1.0625em;
208
+ }
209
+ .kt-promo-icon-container {
210
+ padding-right: 30px;
211
+ }
212
+ .kt-promo-icon-container .kt-svg-icon-browser {
213
+ font-size: 110px;
214
+ }
215
+ .kt-promo-icon-container .kt-svg-icon {
216
+ font-size: 120px;
217
+ }
218
+ .kt-promo-three .kt-promo-icon-container .kt-svg-icon {
219
+ font-size: 100px;
220
+ }
221
+ .kt-promo-box-contain.kt-promo-full {
222
+ float: none;
223
+ width: 100%;
224
+ }
225
+
226
+ .kt-promo-full .kt-newsletter-promo.kt-promo-box {
227
+ border: 2px solid #ddd;
228
+ color: #444;
229
+ }
230
+ .kt-promo-full .kt-newsletter-promo.kt-promo-box h3 {
231
+ color:#444;
232
+ font-size:24px
233
+ }
234
+ .kt_theme_welcome .kt-newsletter-promo.kt-promo-box a {
235
+ color:#444;
236
+ background:#fff;
237
+ border-color:#444;
238
+ padding:8px 30px
239
+ }
240
+ .kt_theme_welcome .kt-newsletter-promo.kt-promo-box a:hover {
241
+ color: #000;
242
+ border: 2px solid #000;
243
+ background:#f2f2f2;
244
+ }
245
+ .kt-promo-full .kt-promo-icon-container .kt-svg-icon {
246
+ font-size: 80px;
247
+ }
248
  .kad-panel-left, .kad-panel-bottom {
 
249
  float: none;
250
  padding: 0 30px 30px 20px;
251
  box-sizing: border-box;
279
  .kad-panel-left .nav-tab-content.panel_open {
280
  display: block;
281
  }
 
 
 
 
 
 
 
 
 
282
  .kt-main input[type='text'] {
283
  margin-right: 5px;
284
  padding: 8px;
358
  a.kt_plugin_button {
359
  text-decoration: none;
360
  color: white;
361
+ padding: 6px 18px;
 
362
  display: inline-block;
363
  }
 
 
 
364
  .kt_plugin_box {
365
  padding: 20px;
366
  width: 46%;
370
  margin-left: 2%;
371
  margin-bottom: 2%;
372
  margin-top: 2%;
373
+ border-radius: 10px;
374
  text-align: center;
375
  box-sizing: border-box;
376
  }
380
  font-style: italic;
381
  }
382
  .kt_plugin_box p {
383
+ min-height: 60px;
384
+ font-size: 14px;
385
  }
386
  .kt_plugin_box img {
387
  max-width: 100%;
388
  }
389
+ .kad-recomended-plugins h5.activated {
390
+ background: #00b5e2;
391
+ color: white;
392
+ border: 0;
393
+ padding: 8px 12px;
394
+ letter-spacing: 1px;
395
+ display: block;
396
+ text-transform: uppercase;
397
+ margin-top: -5px;
398
+ }
399
+ .kad-recomended-plugins h5.activated.plugin-installed {
400
+ background: #444;
401
+ }
402
+ .kad-recomended-plugins h5.activated.plugin-not-installed {
403
+ background: #eee;
404
+ color: #444;
405
+ }
406
+ .kt_plugin_box.builder_box {
407
+ margin-left: 0;
408
+ margin-right: 0;
409
+ width: 100%;
410
+ float: none;
411
+ border-radius: 10px;
412
+ }
413
+
414
+ .builder_box_inner {
415
+ display: flex;
416
+ display: flex;
417
+ display: -webkit-flex;
418
+ display: -ms-flexbox;
419
+ display: -ms-flex;
420
+ display: flex;
421
+ -webkit-align-items: center;
422
+ -ms-align-items: center;
423
+ align-items: center;
424
+ -webkit-justify-content: center;
425
+ -ms-justify-content: center;
426
+ justify-content: center;
427
+ flex-direction: row;
428
+ }
429
+
430
+ .builder_box_content {
431
+ text-align: left;
432
+ padding-left: 15px;
433
+ width: 55%;
434
+ }
435
+
436
+ .builder_box_content p {
437
+ max-width: 700px;
438
+ min-height: 0;
439
+ font-size: 14px;
440
+ }
441
+ .kt-main .builder_box_content h2 {
442
+ text-align: left;
443
+ font-size: 28px;
444
+ margin-top: 10px;
445
+ }
446
+ .builder_box_image {
447
+ position: relative;
448
+ padding-right: 15px;
449
+ padding-bottom: 20px;
450
+ width: 45%;
451
+ }
452
+
453
+ .builder_box_inner h5.activated {
454
+ position: absolute;
455
+ left: 0;
456
+ bottom: 0;
457
+ background: #00b5e2;
458
+ color: white;
459
+ border: 0;
460
+ right: 15px;
461
+ padding: 8px 12px;
462
+ letter-spacing: 1px;
463
+ text-transform: uppercase;
464
+ }
465
+ .builder_box_inner h5.activated.plugin-installed {
466
+ background: #444;
467
+ }
468
+ .builder_box_inner h5.activated.plugin-not-installed {
469
+ background: #eee;
470
+ color: #444;
471
+ }
472
+ .kt_theme_welcome .builder_box_inner h4 {
473
+ border-bottom: 1px solid #ddd;
474
+ margin-bottom: 5px;
475
+ font-weight: bold;
476
+ color: #333;
477
+ }
478
+
479
+ .kt_theme_welcome .builder_box_inner .kt-pros-cons h4 {
480
+ color: #912d2d;
481
+ }
482
+
483
+ .kt_theme_welcome .builder_box_inner .kt-pros-cons.kt-pros h4 {
484
+ color:#244e88;
485
+ }
486
+ .kt_suggest_section a.kt_plugin_button {
487
+ border-radius: 4px;
488
+ line-height: 30px;
489
+ padding: 6px 18px;
490
+ font-size: 14px;
491
+ border: 2px solid #00b5e2;
492
+ background: #00b5e2;
493
+ font-weight: bold;
494
+ color:white;
495
+ box-shadow: none;
496
+ height: auto;
497
+ vertical-align: middle;
498
+ }
499
+ .kt_suggest_section a.kt_plugin_button:hover {
500
+ border: 2px solid #00b5e2;
501
+ color: #00b5e2;
502
+ background: white;
503
+ }
504
+ .builder_box_inner ul li {
505
+ list-style-type: disc;
506
+ list-style-position: outside;
507
+ font-weight: bold;
508
+ }
509
+ .kt-pros-cons {
510
+ float: left;
511
+ width: 46%;
512
+ font-size: 12px;
513
+ }
514
+ .kt-pros-cons.kt-pros {
515
+ margin-right: 8%;
516
+ }
517
+ .kt-pros-cons ul {
518
+ padding-left: 20px;
519
+ }
520
  .kad-featured-items {
521
  background: #fff;
522
  max-width: 100%;
523
+ padding: 20px 25px;
524
+ }
525
+ .kad-featured-items h2 {
526
+ font-size: 30px;
527
+ margin: 30px 0 30px;
528
+ font-weight: 300;
529
+ text-align: center;
530
+ }
531
+ .featured-row {
532
+ margin-left: -10px;
533
+ margin-right: -10px;
534
+ padding-bottom: 20px
535
+ }
536
+ .featured-row:after {
537
+ display: table;
538
+ content: '';
539
+ clear: both;
540
  }
541
  .kad-featured-items .featured {
542
  float: left;
549
  }
550
  .kad-featured-items .featured h4 {
551
  font-weight: bold;
552
+ letter-spacing: 1px;
553
  text-transform: uppercase;
554
+ padding-bottom: 0;
555
+ margin-bottom: 8px;
556
+ margin-top: 10px;
557
  color: #555;
558
  }
559
+ .kad-featured-items .featured a.kt-feat-btn {
560
+ border: 2px solid #444;
561
+ display:inline-block;
562
+ padding:8px 12px;
563
+ border-radius: 3px;
564
+ color: #444;
565
+ }
566
+ .kad-featured-items .featured a.kt-feat-btn:hover {
567
+ border: 2px solid #444;
568
+ background:#444;
569
+ color: #fff;
570
+ }
571
+ .kt-main p.kt-subtitle {
572
+ font-size: 16px;
573
+ text-align: center;
574
+ max-width: 800px;
575
+ margin: 0 auto 20px;
576
+ }
577
+ .kad-featured-items .featured p {
578
+ font-size: 14px;
579
+ }
580
  .kad-featured-items .featured a {
581
  text-decoration: none;
582
  display: block;
welcome/toolkit-welcome.js CHANGED
@@ -1,16 +1,16 @@
1
  jQuery(document).ready(function ($) {
2
- $('.kad-panel-left .nav-tab').click(function (event) {
3
  event.preventDefault();
4
-
5
- var panel = $(this);
6
- var active = $(this).closest('.nav-tab-wrapper').find('.nav-tab-active');
7
  var opencontent = $(this).closest('.kad-panel-contain').find('.nav-tab-content.panel_open');
8
  var contentid = $(this).data('tab-id');
9
-
10
- if (panel.hasClass('nav-tab-active')) {
11
  //leave
12
  } else {
13
- panel.addClass('nav-tab-active');
14
  active.removeClass('nav-tab-active');
15
  opencontent.removeClass('panel_open');
16
  $('#'+contentid).addClass('panel_open');
@@ -19,4 +19,142 @@ $('.kad-panel-left .nav-tab').click(function (event) {
19
  return false;
20
 
21
  });
22
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  jQuery(document).ready(function ($) {
2
+ $('.kad-panel-left .nav-tab-link').click(function (event) {
3
  event.preventDefault();
4
+ var contain = $(this).closest('.kad-panel-left')
5
+ var panel = contain.find('.nav-tab-wrapper');
6
+ var active = panel.find('.nav-tab-active');
7
  var opencontent = $(this).closest('.kad-panel-contain').find('.nav-tab-content.panel_open');
8
  var contentid = $(this).data('tab-id');
9
+ var tab = panel.find('a[data-tab-id="'+contentid+'"]');
10
+ if (active.data('tab-id') == contentid ) {
11
  //leave
12
  } else {
13
+ tab.addClass('nav-tab-active');
14
  active.removeClass('nav-tab-active');
15
  opencontent.removeClass('panel_open');
16
  $('#'+contentid).addClass('panel_open');
19
  return false;
20
 
21
  });
22
+ });
23
+ /**
24
+ * Ajax install the Theme Plugin
25
+ *
26
+ */
27
+ (function($, window, document, undefined){
28
+ "use strict";
29
+
30
+ $(function(){
31
+ $('.kt-trigger-plugin-install').on( 'click', function( event ) {
32
+ var $button = $( event.target );
33
+ event.preventDefault();
34
+ /**
35
+ * Keep button from running twice
36
+ */
37
+ if ( $button.hasClass( 'updating-message' ) || $button.hasClass( 'button-disabled' ) ) {
38
+ return;
39
+ }
40
+
41
+ function ajax_callback(response){
42
+ if(typeof response === "object" && typeof response.message !== "undefined"){
43
+ // The plugin is done (installed, updated and activated).
44
+ if(typeof response.done != "undefined" && response.done){
45
+ buttonStatusInstalled( $button.data('installed-label') );
46
+ activatePlugin();
47
+ } else if( typeof response.url != "undefined" ){
48
+ // we have an ajax url action to perform.
49
+ jQuery.post(response.url, response, ajax_callback).fail(ajax_callback);
50
+ }else{
51
+ // error processing this plugin
52
+ buttonStatusDisabled( 'Error' );
53
+ }
54
+ } else {
55
+ // The TGMPA returns a whole page as response, so check, if this plugin is done.
56
+ activatePlugin();
57
+ }
58
+ }
59
+ /**
60
+ * Install a plugin
61
+ *
62
+ * @return void
63
+ */
64
+ function installPlugin(){
65
+
66
+ if ( $button.hasClass( 'install-toolkit' ) ) {
67
+ buttonStatusInProgress( $button.data('installing-label') );
68
+ jQuery.post(toolkit_welcome_params.ajaxurl, {
69
+ action: "kadence_import_plugin",
70
+ wpnonce: toolkit_welcome_params.wpnonce,
71
+ }, ajax_callback).fail( ajax_callback );
72
+
73
+ } else {
74
+ $.ajax({
75
+ url : $button.data('install-url'),
76
+ type: 'GET',
77
+ data: {},
78
+ beforeSend: function () {
79
+ buttonStatusInProgress( $button.data('installing-label') );
80
+ },
81
+ success: function( reposnse ) {
82
+ buttonStatusInstalled( $button.data('installed-label') );
83
+ activatePlugin();
84
+ },
85
+ error: function (xhr, ajaxOptions, thrownError) {
86
+ // Installation failed
87
+ buttonStatusDisabled( 'Error' );
88
+ }
89
+ });
90
+ }
91
+ }
92
+
93
+ /**
94
+ * Activate a plugin
95
+ *
96
+ * @return void
97
+ */
98
+ function activatePlugin(){
99
+
100
+ $.ajax({
101
+ url : $button.data('activate-url'),
102
+ type: 'GET',
103
+ data: {},
104
+ beforeSend: function () {
105
+ buttonStatusInProgress( $button.data('activating-label') );
106
+ },
107
+ success: function( reposnse ) {
108
+ buttonStatusDisabled( $button.data('activated-label') );
109
+ if ( $button.data('redirect-url') ) {
110
+ location.replace( $button.data('redirect-url') );
111
+ }
112
+ },
113
+ error: function (xhr, ajaxOptions, thrownError) {
114
+ // Activation failed
115
+ console.log( xhr.responseText );
116
+ buttonStatusDisabled( 'Error' );
117
+ }
118
+ });
119
+ }
120
+
121
+ /**
122
+ * Change button status to in-progress
123
+ *
124
+ * @return void
125
+ */
126
+ function buttonStatusInProgress( message ){
127
+ $button.addClass('updating-message').removeClass('button-disabled kt-not-installed installed').text( message );
128
+ }
129
+
130
+ /**
131
+ * Change button status to disabled
132
+ *
133
+ * @return void
134
+ */
135
+ function buttonStatusDisabled( message ){
136
+ $button.removeClass('updating-message kt-not-installed installed')
137
+ .addClass('button-disabled')
138
+ .text( message );
139
+ }
140
+
141
+ /**
142
+ * Change button status to installed
143
+ *
144
+ * @return void
145
+ */
146
+ function buttonStatusInstalled( message ){
147
+ $button.removeClass('updating-message kt-not-installed')
148
+ .addClass('installed')
149
+ .text( message );
150
+ }
151
+
152
+
153
+ if( $button.data('action') === 'install' ){
154
+ installPlugin();
155
+ } else if( $button.data('action') === 'activate' ){
156
+ activatePlugin();
157
+ }
158
+ });
159
+ });
160
+ })(jQuery, window, document);