Kadence Themes Toolkit - Version 1.7

Version Description

  • Fix Missing files
Download this release

Release Info

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

Code changes from version 1.6 to 1.7

readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: britner
3
  Tags:
4
  Requires at least: 3.2
5
  Tested up to: 3.9
6
- Stable tag: 1.6
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -22,6 +22,9 @@ Install the plugin into the `/wp-content/plugins/` folder, and activate it.
22
 
23
  == Changelog ==
24
 
 
 
 
25
  = 1.6 =
26
  * Updates for wordpress 3.9
27
  * Add Youtube and Vimeo Buttons
3
  Tags:
4
  Requires at least: 3.2
5
  Tested up to: 3.9
6
+ Stable tag: 1.7
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
22
 
23
  == Changelog ==
24
 
25
+ = 1.7 =
26
+ * Fix Missing files
27
+
28
  = 1.6 =
29
  * Updates for wordpress 3.9
30
  * Add Youtube and Vimeo Buttons
shortcodes/columns/img/t.gif ADDED
Binary file
shortcodes/video/img/t.gif ADDED
Binary file
shortcodes/vimeo/img/vimeo.png ADDED
Binary file
shortcodes/vimeo/vimeo_popup.php ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ wp_enqueue_script('jquery-ui-core');
3
+ wp_enqueue_script('jquery-ui-widget');
4
+ wp_enqueue_script('jquery-ui-position');
5
+ wp_enqueue_script('jquery');
6
+ global $wp_scripts;
7
+ ?>
8
+ <!DOCTYPE html>
9
+ <head>
10
+ <title><?php _e("Insert Vimeo Video", "virtue"); ?></title>
11
+ <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
12
+ <script language="javascript" type="text/javascript" src="<?php echo get_option('siteurl'); ?>/wp-includes/js/tinymce/tiny_mce_popup.js"></script>
13
+ <script language="javascript" type="text/javascript" src="<?php echo get_option('siteurl'); ?>/wp-includes/js/tinymce/utils/form_utils.js"></script>
14
+ <base target="_self" />
15
+ <?php wp_print_scripts(); ?>
16
+ <script type="text/javascript">
17
+ var ButtonDialog = {
18
+ local_ed : 'ed',
19
+ init : function(ed) {
20
+ ButtonDialog.local_ed = ed;
21
+ tinyMCEPopup.resizeToInnerSize();
22
+ },
23
+ insert : function insertButton(ed) {
24
+
25
+ // Try and remove existing style / blockquote
26
+ tinyMCEPopup.execCommand('mceRemoveNode', false, null);
27
+
28
+ // set up variables to contain our input values
29
+ var video_url = jQuery('#vimeo-dialog input#video').val();
30
+ var max_width = jQuery('#vimeo-dialog input#maxwidth').val();
31
+ var width = jQuery('#vimeo-dialog input#width').val();
32
+ var height = jQuery('#vimeo-dialog input#height').val();
33
+
34
+ var output = '';
35
+ output = '[kad_vimeo ';
36
+ output += 'url="' + video_url + '" ';
37
+ if(width) {output += ' width=' + width + ' ';}
38
+ if(height) {output += ' height=' + height + ' ';}
39
+ if(max_width) {output += ' maxwidth=' + max_width + ' '; }
40
+ output += ']';
41
+
42
+ tinyMCEPopup.execCommand('mceInsertContent', false, output);
43
+
44
+ // Return
45
+ tinyMCEPopup.close();
46
+ }
47
+ };
48
+ tinyMCEPopup.onInit.add(ButtonDialog.init, ButtonDialog);
49
+
50
+ </script>
51
+ <style type="text/css" media="screen"> #vimeo-dialog label {font-size:14px; font-weight: bold; display:block; padding:4px; margin-top: 5px;} #vimeo-dialog input[type=text] {display:block; width: 100%;
52
+ padding: 8px;
53
+ box-sizing: border-box;
54
+ } #vimeo-dialog a#insert {margin-top:10px;} #vimeo-dialog span {
55
+ font-size: 10px;
56
+ }
57
+ body {padding: 0 8px; font-size: 0;}
58
+
59
+ </style>
60
+
61
+ </head>
62
+ <body>
63
+ <div id="vimeo-dialog">
64
+ <form action="/" method="get" accept-charset="utf-8">
65
+ <div>
66
+ <label for="video"><?php _e("Vimeo Link", "virtue"); ?></label>
67
+ <input type="text" name="video" name="video" id="video" />
68
+ </div>
69
+ <div>
70
+ <label for="width"><?php _e("Width", "virtue"); ?></label>
71
+ <input type="text" name="width" value="" id="width" />
72
+ <span style="display:inline-block; padding-left:5px;">(*<?php _e("note just use number", "virtue"); ?>)</span>
73
+ </div>
74
+ <div>
75
+ <label for="height"><?php _e("Height", "virtue"); ?></label>
76
+ <input type="text" name="height" value="" id="height" />
77
+ <span style="display:inline-block; padding-left:5px;">(*<?php _e("note just use number", "virtue"); ?>)</span>
78
+ </div>
79
+ <div>
80
+ <label for="maxwidth"><?php _e("(Optional) Max Width", "virtue"); ?></label>
81
+ <input type="text" name="maxwidth" value="" id="maxwidth" />
82
+ <span style="display:inline-block; padding-left:5px;">(*<?php _e("note just use number", "virtue"); ?>)</span>
83
+ </div>
84
+ <div>
85
+ <a href="javascript:ButtonDialog.insert(ButtonDialog.local_ed)" id="insert" style="display: block; line-height: 24px; text-align:center"><?php _e("Insert", "virtue"); ?></a>
86
+ </div>
87
+ </form>
88
+ </div>
89
+ </body>
90
+ </html>
shortcodes/vimeo/vimeo_shortgen.js ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function() {
2
+ tinymce.create('tinymce.plugins.kadvimeo', {
3
+ init : function(ed, url) {
4
+ var t = this;
5
+ // Register commands
6
+ ed.addCommand('mcekadvimeo', function() {
7
+ ed.windowManager.open({
8
+ file: ajaxurl + '?action=kadvimeo_tinymce',
9
+ width : 350 + ed.getLang('button.delta_width', 0), // size of our window
10
+ height : 350 + ed.getLang('button.delta_height', 0), // size of our window
11
+ inline : 1
12
+ }, {
13
+ plugin_url : url
14
+ });
15
+ });
16
+
17
+ // Register buttons
18
+ ed.addButton('kadvimeo', {title : 'Insert Vimeo', cmd : 'mcekadvimeo', image: url + '/img/vimeo.png' });
19
+
20
+ },
21
+
22
+ getInfo : function() {
23
+ return {
24
+ longname : 'Insert Vimeo Video',
25
+ author : 'Benjamin Ritner',
26
+ authorurl : 'http://kadencethemes.com',
27
+ infourl : 'http://kadencethemes.com',
28
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
29
+ };
30
+ }
31
+ });
32
+
33
+ // Register plugin
34
+ // first parameter is the button ID and must match ID elsewhere
35
+ // second parameter must match the first parameter of the tinymce.create() function above
36
+ tinymce.PluginManager.add('kadvimeo', tinymce.plugins.kadvimeo);
37
+
38
+ })();
shortcodes/youtube/img/youtube.png ADDED
Binary file
shortcodes/youtube/youtube_popup.php ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ wp_enqueue_script('jquery-ui-core');
3
+ wp_enqueue_script('jquery-ui-widget');
4
+ wp_enqueue_script('jquery-ui-position');
5
+ wp_enqueue_script('jquery');
6
+ global $wp_scripts;
7
+ ?>
8
+ <!DOCTYPE html>
9
+ <head>
10
+ <title><?php _e("Insert YouTube Video", "virtue"); ?></title>
11
+ <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
12
+ <script language="javascript" type="text/javascript" src="<?php echo get_option('siteurl'); ?>/wp-includes/js/tinymce/tiny_mce_popup.js"></script>
13
+ <script language="javascript" type="text/javascript" src="<?php echo get_option('siteurl'); ?>/wp-includes/js/tinymce/utils/form_utils.js"></script>
14
+ <base target="_self" />
15
+ <?php wp_print_scripts(); ?>
16
+ <script type="text/javascript">
17
+ var ButtonDialog = {
18
+ local_ed : 'ed',
19
+ init : function(ed) {
20
+ ButtonDialog.local_ed = ed;
21
+ tinyMCEPopup.resizeToInnerSize();
22
+ },
23
+ insert : function insertButton(ed) {
24
+
25
+ // Try and remove existing style / blockquote
26
+ tinyMCEPopup.execCommand('mceRemoveNode', false, null);
27
+
28
+ // set up variables to contain our input values
29
+ var video_url = jQuery('#youtube-dialog input#video').val();
30
+ var max_width = jQuery('#youtube-dialog input#maxwidth').val();
31
+ var width = jQuery('#youtube-dialog input#width').val();
32
+ var height = jQuery('#youtube-dialog input#height').val();
33
+
34
+ var output = '';
35
+ output = '[kad_youtube ';
36
+ output += 'url="' + video_url + '" ';
37
+ if(width) {output += ' width=' + width + ' ';}
38
+ if(height) {output += ' height=' + height + ' ';}
39
+ if(max_width) {output += ' maxwidth=' + max_width + ' '; }
40
+ output += ']';
41
+
42
+ tinyMCEPopup.execCommand('mceInsertContent', false, output);
43
+
44
+ // Return
45
+ tinyMCEPopup.close();
46
+ }
47
+ };
48
+ tinyMCEPopup.onInit.add(ButtonDialog.init, ButtonDialog);
49
+
50
+ </script>
51
+ <style type="text/css" media="screen"> #youtube-dialog label {font-size:14px; font-weight: bold; display:block; padding:4px; margin-top: 5px;} #youtube-dialog input[type=text] {display:block; width: 100%;
52
+ padding: 8px;
53
+ box-sizing: border-box;
54
+ } #youtube-dialog a#insert {margin-top:10px;} #youtube-dialog span {
55
+ font-size: 10px;
56
+ }
57
+ body {padding: 0 8px; font-size: 0;}
58
+
59
+ </style>
60
+
61
+ </head>
62
+ <body>
63
+ <div id="youtube-dialog">
64
+ <form action="/" method="get" accept-charset="utf-8">
65
+ <div>
66
+ <label for="video"><?php _e("YouTube Link", "virtue"); ?></label>
67
+ <input type="text" name="video" name="video" id="video" />
68
+ </div>
69
+ <div>
70
+ <label for="width"><?php _e("Width", "virtue"); ?></label>
71
+ <input type="text" name="width" value="" id="width" />
72
+ <span style="display:inline-block; padding-left:5px;">(*<?php _e("note just use number", "virtue"); ?>)</span>
73
+ </div>
74
+ <div>
75
+ <label for="height"><?php _e("Height", "virtue"); ?></label>
76
+ <input type="text" name="height" value="" id="height" />
77
+ <span style="display:inline-block; padding-left:5px;">(*<?php _e("note just use number", "virtue"); ?>)</span>
78
+ </div>
79
+ <div>
80
+ <label for="maxwidth"><?php _e("(Optional) Max Width", "virtue"); ?></label>
81
+ <input type="text" name="maxwidth" value="" id="maxwidth" />
82
+ <span style="display:inline-block; padding-left:5px;">(*<?php _e("note just use number", "virtue"); ?>)</span>
83
+ </div>
84
+ <div>
85
+ <a href="javascript:ButtonDialog.insert(ButtonDialog.local_ed)" id="insert" style="display: block; line-height: 24px; text-align:center"><?php _e("Insert", "virtue"); ?></a>
86
+ </div>
87
+ </form>
88
+ </div>
89
+ </body>
90
+ </html>
shortcodes/youtube/youtube_shortgen.js ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function() {
2
+ tinymce.create('tinymce.plugins.kadyoutube', {
3
+ init : function(ed, url) {
4
+ var t = this;
5
+ // Register commands
6
+ ed.addCommand('mcekadyoutube', function() {
7
+ ed.windowManager.open({
8
+ file: ajaxurl + '?action=kadyoutube_tinymce',
9
+ width : 350 + ed.getLang('button.delta_width', 0), // size of our window
10
+ height : 350 + ed.getLang('button.delta_height', 0), // size of our window
11
+ inline : 1
12
+ }, {
13
+ plugin_url : url
14
+ });
15
+ });
16
+
17
+ // Register buttons
18
+ ed.addButton('kadyoutube', {title : 'Insert youtube', cmd : 'mcekadyoutube', image: url + '/img/youtube.png' });
19
+
20
+ },
21
+
22
+ getInfo : function() {
23
+ return {
24
+ longname : 'Insert YouTube Video',
25
+ author : 'Benjamin Ritner',
26
+ authorurl : 'http://kadencethemes.com',
27
+ infourl : 'http://kadencethemes.com',
28
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
29
+ };
30
+ }
31
+ });
32
+
33
+ // Register plugin
34
+ // first parameter is the button ID and must match ID elsewhere
35
+ // second parameter must match the first parameter of the tinymce.create() function above
36
+ tinymce.PluginManager.add('kadyoutube', tinymce.plugins.kadyoutube);
37
+
38
+ })();
virtue_toolkit.php CHANGED
@@ -3,7 +3,7 @@
3
  /*
4
  Plugin Name: Virtue ToolKit
5
  Description: Custom Portfolio and Shortcode functionality for Virtue Theme
6
- Version: 1.6
7
  Author: Kadence Themes
8
  Author URI: http://kadencethemes.com/
9
  License: GPLv2 or later
3
  /*
4
  Plugin Name: Virtue ToolKit
5
  Description: Custom Portfolio and Shortcode functionality for Virtue Theme
6
+ Version: 1.7
7
  Author: Kadence Themes
8
  Author URI: http://kadencethemes.com/
9
  License: GPLv2 or later