Insert Html Snippet - Version 1.3.3

Version Description

  • Minor bugs fixed
Download this release

Release Info

Developer f1logic
Plugin Icon 128x128 Insert Html Snippet
Version 1.3.3
Comparing to
See all releases

Code changes from version 1.3.2 to 1.3.3

add_shortcode_tynimce.php CHANGED
@@ -1,69 +1,69 @@
1
- <?php
2
- if ( ! defined( 'ABSPATH' ) )
3
- exit;
4
-
5
- add_action( 'admin_init', 'xyz_ihs_tinymce_button' );
6
-
7
- function xyz_ihs_tinymce_button() {
8
- if ( current_user_can( 'edit_posts' ) && current_user_can( 'edit_pages' ) ) {
9
-
10
- if ( get_user_option('rich_editing') == 'true') {
11
-
12
- add_filter( 'mce_buttons', 'xyz_ihs_register_tinymce_button' );
13
- add_filter( 'mce_external_plugins', 'xyz_ihs_add_tinymce_button' );
14
- }
15
- }
16
- }
17
-
18
- function xyz_ihs_register_tinymce_button( $buttons ) {
19
-
20
- $buttonName = 'xyz_ihs_snippet_selector';
21
-
22
- array_push( $buttons, $buttonName);
23
- return $buttons;
24
- }
25
-
26
- function xyz_ihs_add_tinymce_button( $plugin_array ) {
27
- $plugin_array['xyz_ihs_buttons'] = get_site_url() . '/index.php?wp_ihs=editor_plugin_js';
28
- return $plugin_array;
29
- }
30
-
31
-
32
- /*if(!class_exists('XYZ_Insert_Html_TinyMCESelector')):
33
-
34
- class XYZ_Insert_Html_TinyMCESelector{
35
- var $buttonName = 'xyz_ihs_snippet_selector';
36
- function addSelector(){
37
- // Don't bother doing this stuff if the current user lacks permissions
38
- if ( ! current_user_can('edit_posts') && ! current_user_can('edit_pages') )
39
- return;
40
-
41
- // Add only in Rich Editor mode
42
- if ( get_user_option('rich_editing') == 'true') {
43
- add_filter('mce_external_plugins', array($this, 'registerTmcePlugin'));
44
- //you can use the filters mce_buttons_2, mce_buttons_3 and mce_buttons_4
45
- //to add your button to other toolbars of your tinymce
46
- add_filter('mce_buttons', array($this, 'registerButton'));
47
- }
48
- }
49
-
50
- function registerButton($buttons){
51
- array_push($buttons, "separator", $this->buttonName);
52
- return $buttons;
53
- }
54
-
55
- function registerTmcePlugin($plugin_array){
56
- $plugin_array[$this->buttonName] =get_site_url() . '/index.php?wp_ihs=editor_plugin_js';
57
- if ( get_user_option('rich_editing') == 'true')
58
- //var_dump($plugin_array);
59
- return $plugin_array;
60
- }
61
- }
62
-
63
- endif;
64
-
65
- if(!isset($shortcodesXYZEH)){
66
- $shortcodesXYZEH = new XYZ_Insert_Html_TinyMCESelector();
67
- add_action('admin_head', array($shortcodesXYZEH, 'addSelector'));
68
- }*/
69
  ?>
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) )
3
+ exit;
4
+
5
+ add_action( 'admin_init', 'xyz_ihs_tinymce_button' );
6
+
7
+ function xyz_ihs_tinymce_button() {
8
+ if ( current_user_can( 'edit_posts' ) && current_user_can( 'edit_pages' ) ) {
9
+
10
+ if ( get_user_option('rich_editing') == 'true') {
11
+
12
+ add_filter( 'mce_buttons', 'xyz_ihs_register_tinymce_button' );
13
+ add_filter( 'mce_external_plugins', 'xyz_ihs_add_tinymce_button' );
14
+ }
15
+ }
16
+ }
17
+
18
+ function xyz_ihs_register_tinymce_button( $buttons ) {
19
+
20
+ $buttonName = 'xyz_ihs_snippet_selector';
21
+
22
+ array_push( $buttons, $buttonName);
23
+ return $buttons;
24
+ }
25
+
26
+ function xyz_ihs_add_tinymce_button( $plugin_array ) {
27
+ $plugin_array['xyz_ihs_buttons'] = get_site_url() . '/index.php?wp_ihs=editor_plugin_js';
28
+ return $plugin_array;
29
+ }
30
+
31
+
32
+ /*if(!class_exists('XYZ_Insert_Html_TinyMCESelector')):
33
+
34
+ class XYZ_Insert_Html_TinyMCESelector{
35
+ var $buttonName = 'xyz_ihs_snippet_selector';
36
+ function addSelector(){
37
+ // Don't bother doing this stuff if the current user lacks permissions
38
+ if ( ! current_user_can('edit_posts') && ! current_user_can('edit_pages') )
39
+ return;
40
+
41
+ // Add only in Rich Editor mode
42
+ if ( get_user_option('rich_editing') == 'true') {
43
+ add_filter('mce_external_plugins', array($this, 'registerTmcePlugin'));
44
+ //you can use the filters mce_buttons_2, mce_buttons_3 and mce_buttons_4
45
+ //to add your button to other toolbars of your tinymce
46
+ add_filter('mce_buttons', array($this, 'registerButton'));
47
+ }
48
+ }
49
+
50
+ function registerButton($buttons){
51
+ array_push($buttons, "separator", $this->buttonName);
52
+ return $buttons;
53
+ }
54
+
55
+ function registerTmcePlugin($plugin_array){
56
+ $plugin_array[$this->buttonName] =get_site_url() . '/index.php?wp_ihs=editor_plugin_js';
57
+ if ( get_user_option('rich_editing') == 'true')
58
+ //var_dump($plugin_array);
59
+ return $plugin_array;
60
+ }
61
+ }
62
+
63
+ endif;
64
+
65
+ if(!isset($shortcodesXYZEH)){
66
+ $shortcodesXYZEH = new XYZ_Insert_Html_TinyMCESelector();
67
+ add_action('admin_head', array($shortcodesXYZEH, 'addSelector'));
68
+ }*/
69
  ?>
admin/about.php CHANGED
File without changes
admin/footer.php CHANGED
@@ -1,166 +1,166 @@
1
- <?php
2
- if ( ! defined( 'ABSPATH' ) )
3
- exit;
4
- if(get_option('xyz_ihs_premium_version_ads')==1){?>
5
- <div id="xyz-ihs-premium">
6
- <div style="float: left; padding: 0 5px">
7
- <h2 style="vertical-align: middle;">
8
- <a target="_blank"
9
- href="https://xyzscripts.com/wordpress-plugins/xyz-wp-insert-code-snippet/details
10
- ">Fully Featured XYZ WP Insert Code Snippet Premium Plugin</a> - Just 19 USD
11
- </h2>
12
- </div>
13
- <div style="float: left; margin-top: 3px">
14
- <a target="_blank" href="https://xyzscripts.com/members/product/purchase/XYZWPICSPRE"><img
15
- src="<?php echo plugins_url("images/orange_buynow.png",XYZ_INSERT_HTML_PLUGIN_FILE); ?>">
16
- </a>
17
- </div>
18
- <div style="float: left; padding: 0 5px">
19
- <h2 style="vertical-align: middle;text-shadow: 1px 1px 1px #686868">
20
- (
21
- <a href="<?php echo admin_url('admin.php?page=insert-html-snippet-about');?>">Compare Features</a>
22
- )
23
- </h2>
24
- </div>
25
- </div>
26
- <?php }
27
- ?>
28
- <div style="clear: both;">
29
- </div>
30
- <div style="width: 100%">
31
- <div class="xyz_ihs_social_media">
32
- <h3 class="xyz_ihs_inner_head">
33
- Follow Us
34
- </h3>
35
- <a target="_blank" href="http://facebook.com/xyzscripts" class="xyz_home_fbook"></a>
36
- <a target="_blank" href="http://twitter.com/xyzscripts" class="xyz_home_twitt"></a>
37
- <a target="_blank" href="https://plus.google.com/+Xyzscripts/" class="xyz_home_gplus"></a>
38
- <a style="margin-right:0px;" target="_blank" href="https://www.linkedin.com/company/xyzscripts" class="xyz_home_linkedin"></a>
39
- </div>
40
- <div class="xyz_ihs_sugession">
41
- <h3 class="xyz_ihs_inner_head"> Support</h3>
42
- <p style="width:100%;"><a target="_blank" href="https://xyzscripts.com/donate/5" >Donate</a></p>
43
- <p style="width:100%;"><a target="_blank" href="https://xyzscripts.com/support/" >Contact Us</a></p>
44
- <p ><a target="_blank" href="https://wordpress.org/support/plugin/insert-html-snippet/reviews/" >Please Rate Us
45
- </a></p>
46
- <a target="_blank" href="https://wordpress.org/support/plugin/insert-html-snippet/reviews/" ><span class="xyz_new_star"></span></a>
47
- <p style="width:100%;"><a target="_blank" href="https://wordpress.org/support/plugin/insert-html-snippet/" >Create a ticket at Wordpress forum</a>
48
- </p>
49
- </div>
50
- <div class="xyz_ihs_new_subscribe">
51
- <h3 class="xyz_ihs_inner_head">
52
- Stay tuned for our updates
53
- </h3>
54
- <script language="javascript">
55
- function check_email(emailString)
56
- {
57
- var mailPattern = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,})$/;
58
- var matchArray = emailString.match(mailPattern);
59
- if (emailString.length == 0)
60
- return false;
61
- if (matchArray == null) {
62
- return false;
63
- }
64
- else{
65
- return true;
66
- }
67
- }
68
- function verify_lists(form)
69
- {
70
- var total=0;
71
- var checkBox=form['chk[]'];
72
- if(checkBox.length){
73
- for(var i=0;i<checkBox.length;i++){
74
- checkBox[i].checked?total++:null;
75
- }
76
- }
77
- else{
78
- checkBox.checked?total++:null;
79
- }
80
- if(total>0){
81
- return true;
82
- }
83
- else{
84
- return false;
85
- }
86
- }
87
- function verify_fields()
88
- {
89
- if(check_email(document.email_subscription.email.value) == false){
90
- alert("Please check whether the email is correct.");
91
- document.email_subscription.email.select();
92
- return false;
93
- }
94
- else if(verify_lists(document.email_subscription)==false){
95
- alert("Select atleast one list.");
96
- }
97
- else{
98
- document.email_subscription.submit();
99
- }
100
- }
101
- </script>
102
- <?php global $current_user; wp_get_current_user();?>
103
- <form action="https://xyzscripts.com/newsletter/index.php?page=list/subscribe" method="post" name="email_subscription" id="email_subscription" target="_blank">
104
- <input type="hidden" name="fieldNameIds" value="1,">
105
- <input type="hidden" name="redirActive" value="http://xyzscripts.com/subscription/pending/XYZWPIHSFRE">
106
- <input type="hidden" name="redirPending" value="http://xyzscripts.com/subscription/active/XYZWPIHSFRE">
107
- <input type="hidden" name="mode" value="1">
108
- <input class="xyz_ihs_name" type="text" placeholder="Name" name="field1" value="
109
- <?php
110
- if ($current_user->user_firstname != "" || $current_user->user_lastname != "")
111
- {
112
- echo $current_user->user_firstname . " " . $current_user->user_lastname;
113
- }
114
- else if (strcasecmp($current_user->display_name, 'admin')!=0 && strcasecmp($current_user->display_name , "administrator")!=0 )
115
- {
116
- echo $current_user->display_name;
117
- }
118
- else if (strcasecmp($current_user->user_login ,"admin")!=0 && strcasecmp($current_user->user_login , "administrator")!=0 )
119
- {
120
- echo $current_user->user_login;
121
- }
122
- ?>" >
123
- <input class="xyz_ihs_email" name="email"
124
- type="text" placeholder="Email" value="
125
- <?php echo $current_user->user_email; ?>" />
126
- <input id="xyz_ihs_submit_btn" type="submit" value="Subscribe" class="xyz_ihs_sbmt_btn" name="Submit" onclick="javascript: if(!verify_fields()) return false; " />
127
- <input type="hidden" name="listName" value="6,1,"/>
128
- </form>
129
- </div>
130
- <div class="xyz_ihs_inmotion" >
131
- <a target="_blank" href="http://inmotion-hosting.evyy.net/c/1150074/260033/4222">
132
- <img src="<?php echo plugins_url()?>/insert-html-snippet/images/xyz.png" class="xyz_ihs_inmotion_label"></a>
133
- </div>
134
- </div>
135
- <div style="clear: both;">
136
- </div>
137
- <div style="width: 100%">
138
- <div class="xyz_our_plugins_new">
139
- <p class="xyz_plugin_head">
140
- Our Plugins :
141
- </p>
142
- <a target="_blank" href="https://wordpress.org/plugins/social-media-auto-publish/"><span>1</span>Social Media Auto Publish</a>
143
- <a target="_blank" href="https://wordpress.org/plugins/facebook-auto-publish/"><span>2</span>Facebook Auto Publish</a>
144
- <a target="_blank" href="https://wordpress.org/plugins/twitter-auto-publish/"><span>3</span>Twitter Auto Publish</a>
145
- <a target="_blank" href="https://wordpress.org/plugins/linkedin-auto-publish/"><span>4</span>LinkedIn Auto Publish</a>
146
- <a target="_blank" href="https://wordpress.org/plugins/insert-html-snippet/"><span>5</span>Insert HTML Snippet</a>
147
- <a target="_blank" href="https://wordpress.org/plugins/insert-php-code-snippet/"><span>6</span>Insert PHP Code Snippet</a>
148
- <a target="_blank" href="https://wordpress.org/plugins/contact-form-manager/"><span>7</span>Contact Form Manager</a>
149
- <a target="_blank" href="https://wordpress.org/plugins/newsletter-manager/"><span>8</span>Newsletter Manager</a>
150
- <a target="_blank" href="https://wordpress.org/plugins/lightbox-pop/"><span>9</span>Lightbox Pop</a>
151
- <a target="_blank" href="https://wordpress.org/plugins/full-screen-popup/"><span>10</span>Full Screen Popup</a>
152
- <a target="_blank" href="https://wordpress.org/plugins/popup-dialog-box/"><span>11</span>Popup Dialog Box</a>
153
- <a target="_blank" href="https://wordpress.org/plugins/quick-bar/"><span>12</span>Quick Bar</a>
154
- <a target="_blank" href="https://wordpress.org/plugins/quick-box-popup/"><span>13</span>Quick Box Popup</a>
155
- <a target="_blank" href="https://wordpress.org/plugins/custom-field-manager/"><span>14</span> Custom Field Manager</a>
156
- <a target="_blank" href="https://wordpress.org/plugins/wp-filter-posts/"><span>15</span> WP Filter Posts</a>
157
- <a target="_blank" href="https://wordpress.org/plugins/wp-gallery-manager/"><span>16</span> WP Gallery Manager</a>
158
- </div>
159
- </div>
160
- <div class="xyz_poweredBy">
161
- Powered by
162
- <a href="http://xyzscripts.com" target="_blank">XYZScripts</a>
163
- </div>
164
- <div style="clear: both;"></div>
165
- <p style="clear: both;"></p>
166
 
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) )
3
+ exit;
4
+ if(get_option('xyz_ihs_premium_version_ads')==1){?>
5
+ <div id="xyz-ihs-premium">
6
+ <div style="float: left; padding: 0 5px">
7
+ <h2 style="vertical-align: middle;">
8
+ <a target="_blank"
9
+ href="https://xyzscripts.com/wordpress-plugins/xyz-wp-insert-code-snippet/details
10
+ ">Fully Featured XYZ WP Insert Code Snippet Premium Plugin</a> - Just 19 USD
11
+ </h2>
12
+ </div>
13
+ <div style="float: left; margin-top: 3px">
14
+ <a target="_blank" href="https://xyzscripts.com/members/product/purchase/XYZWPICSPRE"><img
15
+ src="<?php echo plugins_url("images/orange_buynow.png",XYZ_INSERT_HTML_PLUGIN_FILE); ?>">
16
+ </a>
17
+ </div>
18
+ <div style="float: left; padding: 0 5px">
19
+ <h2 style="vertical-align: middle;text-shadow: 1px 1px 1px #686868">
20
+ (
21
+ <a href="<?php echo admin_url('admin.php?page=insert-html-snippet-about');?>">Compare Features</a>
22
+ )
23
+ </h2>
24
+ </div>
25
+ </div>
26
+ <?php }
27
+ ?>
28
+ <div style="clear: both;">
29
+ </div>
30
+ <div style="width: 100%">
31
+ <div class="xyz_ihs_social_media">
32
+ <h3 class="xyz_ihs_inner_head">
33
+ Follow Us
34
+ </h3>
35
+ <a target="_blank" href="http://facebook.com/xyzscripts" class="xyz_home_fbook"></a>
36
+ <a target="_blank" href="http://twitter.com/xyzscripts" class="xyz_home_twitt"></a>
37
+ <a target="_blank" href="https://plus.google.com/+Xyzscripts/" class="xyz_home_gplus"></a>
38
+ <a style="margin-right:0px;" target="_blank" href="https://www.linkedin.com/company/xyzscripts" class="xyz_home_linkedin"></a>
39
+ </div>
40
+ <div class="xyz_ihs_sugession">
41
+ <h3 class="xyz_ihs_inner_head"> Support</h3>
42
+ <p style="width:100%;"><a target="_blank" href="https://xyzscripts.com/donate/5" >Donate</a></p>
43
+ <p style="width:100%;"><a target="_blank" href="https://xyzscripts.com/support/" >Contact Us</a></p>
44
+ <p ><a target="_blank" href="https://wordpress.org/support/plugin/insert-html-snippet/reviews/" >Please Rate Us
45
+ </a></p>
46
+ <a target="_blank" href="https://wordpress.org/support/plugin/insert-html-snippet/reviews/" ><span class="xyz_new_star"></span></a>
47
+ <p style="width:100%;"><a target="_blank" href="https://wordpress.org/support/plugin/insert-html-snippet/" >Create a ticket at Wordpress forum</a>
48
+ </p>
49
+ </div>
50
+ <div class="xyz_ihs_new_subscribe">
51
+ <h3 class="xyz_ihs_inner_head">
52
+ Stay tuned for our updates
53
+ </h3>
54
+ <script language="javascript">
55
+ function check_email(emailString)
56
+ {
57
+ var mailPattern = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,})$/;
58
+ var matchArray = emailString.match(mailPattern);
59
+ if (emailString.length == 0)
60
+ return false;
61
+ if (matchArray == null) {
62
+ return false;
63
+ }
64
+ else{
65
+ return true;
66
+ }
67
+ }
68
+ function verify_lists(form)
69
+ {
70
+ var total=0;
71
+ var checkBox=form['chk[]'];
72
+ if(checkBox.length){
73
+ for(var i=0;i<checkBox.length;i++){
74
+ checkBox[i].checked?total++:null;
75
+ }
76
+ }
77
+ else{
78
+ checkBox.checked?total++:null;
79
+ }
80
+ if(total>0){
81
+ return true;
82
+ }
83
+ else{
84
+ return false;
85
+ }
86
+ }
87
+ function verify_fields()
88
+ {
89
+ if(check_email(document.email_subscription.email.value) == false){
90
+ alert("Please check whether the email is correct.");
91
+ document.email_subscription.email.select();
92
+ return false;
93
+ }
94
+ else if(verify_lists(document.email_subscription)==false){
95
+ alert("Select atleast one list.");
96
+ }
97
+ else{
98
+ document.email_subscription.submit();
99
+ }
100
+ }
101
+ </script>
102
+ <?php global $current_user; wp_get_current_user();?>
103
+ <form action="https://xyzscripts.com/newsletter/index.php?page=list/subscribe" method="post" name="email_subscription" id="email_subscription" target="_blank">
104
+ <input type="hidden" name="fieldNameIds" value="1,">
105
+ <input type="hidden" name="redirActive" value="http://xyzscripts.com/subscription/pending/XYZWPIHSFRE">
106
+ <input type="hidden" name="redirPending" value="http://xyzscripts.com/subscription/active/XYZWPIHSFRE">
107
+ <input type="hidden" name="mode" value="1">
108
+ <input class="xyz_ihs_name" type="text" placeholder="Name" name="field1" value="
109
+ <?php
110
+ if ($current_user->user_firstname != "" || $current_user->user_lastname != "")
111
+ {
112
+ echo $current_user->user_firstname . " " . $current_user->user_lastname;
113
+ }
114
+ else if (strcasecmp($current_user->display_name, 'admin')!=0 && strcasecmp($current_user->display_name , "administrator")!=0 )
115
+ {
116
+ echo $current_user->display_name;
117
+ }
118
+ else if (strcasecmp($current_user->user_login ,"admin")!=0 && strcasecmp($current_user->user_login , "administrator")!=0 )
119
+ {
120
+ echo $current_user->user_login;
121
+ }
122
+ ?>" >
123
+ <input class="xyz_ihs_email" name="email"
124
+ type="text" placeholder="Email" value="
125
+ <?php echo $current_user->user_email; ?>" />
126
+ <input id="xyz_ihs_submit_btn" type="submit" value="Subscribe" class="xyz_ihs_sbmt_btn" name="Submit" onclick="javascript: if(!verify_fields()) return false; " />
127
+ <input type="hidden" name="listName" value="6,1,"/>
128
+ </form>
129
+ </div>
130
+ <div class="xyz_ihs_inmotion" >
131
+ <a target="_blank" href="http://inmotion-hosting.evyy.net/c/1150074/260033/4222">
132
+ <img src="<?php echo plugins_url()?>/insert-html-snippet/images/xyz.png" class="xyz_ihs_inmotion_label"></a>
133
+ </div>
134
+ </div>
135
+ <div style="clear: both;">
136
+ </div>
137
+ <div style="width: 100%">
138
+ <div class="xyz_our_plugins_new">
139
+ <p class="xyz_plugin_head">
140
+ Our Plugins :
141
+ </p>
142
+ <a target="_blank" href="https://wordpress.org/plugins/social-media-auto-publish/"><span>1</span>Social Media Auto Publish</a>
143
+ <a target="_blank" href="https://wordpress.org/plugins/facebook-auto-publish/"><span>2</span>Facebook Auto Publish</a>
144
+ <a target="_blank" href="https://wordpress.org/plugins/twitter-auto-publish/"><span>3</span>Twitter Auto Publish</a>
145
+ <a target="_blank" href="https://wordpress.org/plugins/linkedin-auto-publish/"><span>4</span>LinkedIn Auto Publish</a>
146
+ <a target="_blank" href="https://wordpress.org/plugins/insert-html-snippet/"><span>5</span>Insert HTML Snippet</a>
147
+ <a target="_blank" href="https://wordpress.org/plugins/insert-php-code-snippet/"><span>6</span>Insert PHP Code Snippet</a>
148
+ <a target="_blank" href="https://wordpress.org/plugins/contact-form-manager/"><span>7</span>Contact Form Manager</a>
149
+ <a target="_blank" href="https://wordpress.org/plugins/newsletter-manager/"><span>8</span>Newsletter Manager</a>
150
+ <a target="_blank" href="https://wordpress.org/plugins/lightbox-pop/"><span>9</span>Lightbox Pop</a>
151
+ <a target="_blank" href="https://wordpress.org/plugins/full-screen-popup/"><span>10</span>Full Screen Popup</a>
152
+ <a target="_blank" href="https://wordpress.org/plugins/popup-dialog-box/"><span>11</span>Popup Dialog Box</a>
153
+ <a target="_blank" href="https://wordpress.org/plugins/quick-bar/"><span>12</span>Quick Bar</a>
154
+ <a target="_blank" href="https://wordpress.org/plugins/quick-box-popup/"><span>13</span>Quick Box Popup</a>
155
+ <a target="_blank" href="https://wordpress.org/plugins/custom-field-manager/"><span>14</span> Custom Field Manager</a>
156
+ <a target="_blank" href="https://wordpress.org/plugins/wp-filter-posts/"><span>15</span> WP Filter Posts</a>
157
+ <a target="_blank" href="https://wordpress.org/plugins/wp-gallery-manager/"><span>16</span> WP Gallery Manager</a>
158
+ </div>
159
+ </div>
160
+ <div class="xyz_poweredBy">
161
+ Powered by
162
+ <a href="http://xyzscripts.com" target="_blank">XYZScripts</a>
163
+ </div>
164
+ <div style="clear: both;"></div>
165
+ <p style="clear: both;"></p>
166
 
admin/header.php CHANGED
File without changes
admin/install.php CHANGED
File without changes
admin/menu.php CHANGED
File without changes
admin/settings.php CHANGED
File without changes
admin/snippet-add.php CHANGED
File without changes
admin/snippet-delete.php CHANGED
File without changes
admin/snippet-edit.php CHANGED
@@ -20,7 +20,7 @@ id="xyz_system_notice_area_dismiss">Dismiss</span>
20
  <?php
21
  }
22
 
23
- if($_GET['goback'])
24
  $goback= intval($_GET['goback']);
25
 
26
 
20
  <?php
21
  }
22
 
23
+ if(isset($_GET['goback']))
24
  $goback= intval($_GET['goback']);
25
 
26
 
admin/snippet-status.php CHANGED
File without changes
admin/snippets.php CHANGED
File without changes
admin/uninstall.php CHANGED
File without changes
ajax-handler.php CHANGED
File without changes
css/xyz_ihs_styles.css CHANGED
File without changes
direct_call.php CHANGED
File without changes
editor_plugin.js.php CHANGED
@@ -1,167 +1,167 @@
1
- <?php
2
- if ( ! defined( 'ABSPATH' ) )
3
- exit;
4
-
5
- header( 'Content-Type: text/javascript' );
6
- if ( ! is_user_logged_in() )
7
- die('You must be logged in to access this script.');
8
-
9
- /*if(!isset($shortcodesXYZEH))
10
- $shortcodesXYZEH = new XYZ_Insert_Html_TinyMCESelector();*/
11
-
12
- global $wpdb;
13
- $buttonName = 'xyz_ihs_snippet_selector';
14
-
15
- $xyz_snippets_arr=$wpdb->get_results($wpdb->prepare( "SELECT id,title FROM ".$wpdb->prefix."xyz_ihs_short_code WHERE status=%d ORDER BY id DESC",1),ARRAY_A );
16
- // print_r($xyz_snippets_arr);
17
- if(count($xyz_snippets_arr)==0)
18
- die;
19
-
20
- if(floatval(get_bloginfo('version'))>=3.9) //version 5 updation
21
- {
22
- ?>
23
- (function() {
24
- /* Register the buttons */
25
- tinymce.create('tinymce.plugins.xyz_ihs_snippet', {
26
- init : function(ed, url) {
27
- /**
28
- * Inserts shortcode content
29
- */
30
- ed.addButton( '<?php echo $buttonName;?>', {
31
- title: 'Insert HTML Snippet',
32
- type: 'menubutton',
33
- icon: 'icon xyz-ihs-own-icon',
34
- menu: [
35
-
36
- <?php foreach ($xyz_snippets_arr as $key=>$val) { ?>
37
- {
38
- text: '<?php echo addslashes($val['title']); ?>',
39
- value: '[xyz-ihs snippet="<?php echo addslashes($val['title']); ?>"]',
40
- onclick: function() {
41
- ed.selection.setContent(this.value());
42
- }
43
- },
44
- <?php } ?>
45
-
46
- ]
47
-
48
- });
49
-
50
-
51
- },
52
- createControl : function(n, cm) {
53
- return null;
54
- },
55
- });
56
- /* Start the buttons */
57
- tinymce.PluginManager.add( 'xyz_ihs_buttons', tinymce.plugins.xyz_ihs_snippet );
58
- })();
59
-
60
- <?php
61
- }
62
- /*else if(floatval(get_bloginfo('version'))>=3.9)
63
- {
64
- ?>
65
- (function() {
66
-
67
- tinymce.PluginManager.add('<?php echo $buttonName; ?>', function( editor, url ) {
68
- editor.addButton( '<?php echo $buttonName; ?>', {
69
- title: 'Insert HTML Snippet',
70
- type: 'menubutton',
71
- icon: 'icon xyz-ihs-own-icon',
72
- menu: [
73
- <?php foreach ($xyz_snippets_arr as $key=>$val) { ?>
74
- {
75
- text: '<?php echo addslashes($val['title']); ?>',
76
- value: '[xyz-ihs snippet="<?php echo addslashes($val['title']); ?>"]',
77
- onclick: function() {
78
- editor.insertContent(this.value());
79
- }
80
- },
81
- <?php } ?>
82
- ]
83
- });
84
- });
85
-
86
- })();
87
- <?php }*/ else {
88
-
89
- $xyz_snippets = array(
90
- 'title' =>'Insert HTML Snippet',
91
- 'url' => plugins_url('images/logo.png',XYZ_INSERT_HTML_PLUGIN_FILE),
92
- 'xyz_ihs_snippets' => $xyz_snippets_arr
93
- );
94
- ?>
95
-
96
- var tinymce_<?php echo $buttonName; ?> =<?php echo json_encode($xyz_snippets) ?>;
97
-
98
-
99
- (function() {
100
- //******* Load plugin specific language pack
101
-
102
- tinymce.create('tinymce.plugins.<?php echo $buttonName; ?>', {
103
- /**
104
- * Initializes the plugin, this will be executed after the plugin has been created.
105
- * This call is done before the editor instance has finished it's initialization so use the onInit event
106
- * of the editor instance to intercept that event.
107
- *
108
- * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
109
- * @param {string} url Absolute URL to where the plugin is located.
110
- */
111
- init : function(ed, url) {
112
-
113
- tinymce_<?php echo $buttonName; ?>.insert = function(){
114
- if(this.v && this.v != ''){
115
- tinymce.execCommand('mceInsertContent', false, '[xyz-ihs snippet="'+tinymce_<?php echo $buttonName; ?>.xyz_ihs_snippets[this.v]['title']+'"]');
116
- }
117
- };
118
-
119
- },
120
-
121
- /**
122
- * Creates control instances based in the incomming name. This method is normally not
123
- * needed since the addButton method of the tinymce.Editor class is a more easy way of adding buttons
124
- * but you sometimes need to create more complex controls like listboxes, split buttons etc then this
125
- * method can be used to create those.
126
- *
127
- * @param {String} n Name of the control to create.
128
- * @param {tinymce.ControlManager} cm Control manager to use inorder to create new control.
129
- * @return {tinymce.ui.Control} New control instance or null if no control was created.
130
- */
131
- createControl : function(n, cm) {
132
- if(n=='<?php echo $buttonName; ?>'){
133
- var c = cm.createSplitButton('<?php echo $buttonName; ?>', {
134
- title : tinymce_<?php echo $buttonName; ?>.title,
135
- image : tinymce_<?php echo $buttonName; ?>.url,
136
- onclick : tinymce_<?php echo $buttonName; ?>.insert
137
- });
138
-
139
- // Add some values to the list box
140
-
141
-
142
- c.onRenderMenu.add(function(c, m){
143
- for (var id in tinymce_<?php echo $buttonName; ?>.xyz_ihs_snippets){
144
- m.add({
145
- v : id,
146
- title : tinymce_<?php echo $buttonName; ?>.xyz_ihs_snippets[id]['title'],
147
- onclick : tinymce_<?php echo $buttonName; ?>.insert
148
- });
149
- }
150
- });
151
-
152
-
153
- // Return the new listbox instance
154
- return c;
155
- }
156
-
157
- return null;
158
- },
159
-
160
-
161
- });
162
-
163
- // Register plugin
164
- tinymce.PluginManager.add('<?php echo $buttonName; ?>', tinymce.plugins.<?php echo $buttonName; ?>);
165
- })();
166
-
167
- <?php } ?>
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) )
3
+ exit;
4
+
5
+ header( 'Content-Type: text/javascript' );
6
+ if ( ! is_user_logged_in() )
7
+ die('You must be logged in to access this script.');
8
+
9
+ /*if(!isset($shortcodesXYZEH))
10
+ $shortcodesXYZEH = new XYZ_Insert_Html_TinyMCESelector();*/
11
+
12
+ global $wpdb;
13
+ $buttonName = 'xyz_ihs_snippet_selector';
14
+
15
+ $xyz_snippets_arr=$wpdb->get_results($wpdb->prepare( "SELECT id,title FROM ".$wpdb->prefix."xyz_ihs_short_code WHERE status=%d ORDER BY id DESC",1),ARRAY_A );
16
+ // print_r($xyz_snippets_arr);
17
+ if(count($xyz_snippets_arr)==0)
18
+ die;
19
+
20
+ if(floatval(get_bloginfo('version'))>=3.9) //version 5 updation
21
+ {
22
+ ?>
23
+ (function() {
24
+ /* Register the buttons */
25
+ tinymce.create('tinymce.plugins.xyz_ihs_snippet', {
26
+ init : function(ed, url) {
27
+ /**
28
+ * Inserts shortcode content
29
+ */
30
+ ed.addButton( '<?php echo $buttonName;?>', {
31
+ title: 'Insert HTML Snippet',
32
+ type: 'menubutton',
33
+ icon: 'icon xyz-ihs-own-icon',
34
+ menu: [
35
+
36
+ <?php foreach ($xyz_snippets_arr as $key=>$val) { ?>
37
+ {
38
+ text: '<?php echo addslashes($val['title']); ?>',
39
+ value: '[xyz-ihs snippet="<?php echo addslashes($val['title']); ?>"]',
40
+ onclick: function() {
41
+ ed.selection.setContent(this.value());
42
+ }
43
+ },
44
+ <?php } ?>
45
+
46
+ ]
47
+
48
+ });
49
+
50
+
51
+ },
52
+ createControl : function(n, cm) {
53
+ return null;
54
+ },
55
+ });
56
+ /* Start the buttons */
57
+ tinymce.PluginManager.add( 'xyz_ihs_buttons', tinymce.plugins.xyz_ihs_snippet );
58
+ })();
59
+
60
+ <?php
61
+ }
62
+ /*else if(floatval(get_bloginfo('version'))>=3.9)
63
+ {
64
+ ?>
65
+ (function() {
66
+
67
+ tinymce.PluginManager.add('<?php echo $buttonName; ?>', function( editor, url ) {
68
+ editor.addButton( '<?php echo $buttonName; ?>', {
69
+ title: 'Insert HTML Snippet',
70
+ type: 'menubutton',
71
+ icon: 'icon xyz-ihs-own-icon',
72
+ menu: [
73
+ <?php foreach ($xyz_snippets_arr as $key=>$val) { ?>
74
+ {
75
+ text: '<?php echo addslashes($val['title']); ?>',
76
+ value: '[xyz-ihs snippet="<?php echo addslashes($val['title']); ?>"]',
77
+ onclick: function() {
78
+ editor.insertContent(this.value());
79
+ }
80
+ },
81
+ <?php } ?>
82
+ ]
83
+ });
84
+ });
85
+
86
+ })();
87
+ <?php }*/ else {
88
+
89
+ $xyz_snippets = array(
90
+ 'title' =>'Insert HTML Snippet',
91
+ 'url' => plugins_url('images/logo.png',XYZ_INSERT_HTML_PLUGIN_FILE),
92
+ 'xyz_ihs_snippets' => $xyz_snippets_arr
93
+ );
94
+ ?>
95
+
96
+ var tinymce_<?php echo $buttonName; ?> =<?php echo json_encode($xyz_snippets) ?>;
97
+
98
+
99
+ (function() {
100
+ //******* Load plugin specific language pack
101
+
102
+ tinymce.create('tinymce.plugins.<?php echo $buttonName; ?>', {
103
+ /**
104
+ * Initializes the plugin, this will be executed after the plugin has been created.
105
+ * This call is done before the editor instance has finished it's initialization so use the onInit event
106
+ * of the editor instance to intercept that event.
107
+ *
108
+ * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
109
+ * @param {string} url Absolute URL to where the plugin is located.
110
+ */
111
+ init : function(ed, url) {
112
+
113
+ tinymce_<?php echo $buttonName; ?>.insert = function(){
114
+ if(this.v && this.v != ''){
115
+ tinymce.execCommand('mceInsertContent', false, '[xyz-ihs snippet="'+tinymce_<?php echo $buttonName; ?>.xyz_ihs_snippets[this.v]['title']+'"]');
116
+ }
117
+ };
118
+
119
+ },
120
+
121
+ /**
122
+ * Creates control instances based in the incomming name. This method is normally not
123
+ * needed since the addButton method of the tinymce.Editor class is a more easy way of adding buttons
124
+ * but you sometimes need to create more complex controls like listboxes, split buttons etc then this
125
+ * method can be used to create those.
126
+ *
127
+ * @param {String} n Name of the control to create.
128
+ * @param {tinymce.ControlManager} cm Control manager to use inorder to create new control.
129
+ * @return {tinymce.ui.Control} New control instance or null if no control was created.
130
+ */
131
+ createControl : function(n, cm) {
132
+ if(n=='<?php echo $buttonName; ?>'){
133
+ var c = cm.createSplitButton('<?php echo $buttonName; ?>', {
134
+ title : tinymce_<?php echo $buttonName; ?>.title,
135
+ image : tinymce_<?php echo $buttonName; ?>.url,
136
+ onclick : tinymce_<?php echo $buttonName; ?>.insert
137
+ });
138
+
139
+ // Add some values to the list box
140
+
141
+
142
+ c.onRenderMenu.add(function(c, m){
143
+ for (var id in tinymce_<?php echo $buttonName; ?>.xyz_ihs_snippets){
144
+ m.add({
145
+ v : id,
146
+ title : tinymce_<?php echo $buttonName; ?>.xyz_ihs_snippets[id]['title'],
147
+ onclick : tinymce_<?php echo $buttonName; ?>.insert
148
+ });
149
+ }
150
+ });
151
+
152
+
153
+ // Return the new listbox instance
154
+ return c;
155
+ }
156
+
157
+ return null;
158
+ },
159
+
160
+
161
+ });
162
+
163
+ // Register plugin
164
+ tinymce.PluginManager.add('<?php echo $buttonName; ?>', tinymce.plugins.<?php echo $buttonName; ?>);
165
+ })();
166
+
167
+ <?php } ?>
images/activate.png CHANGED
File without changes
images/delete.png CHANGED
File without changes
images/edit.png CHANGED
File without changes
images/facebook.png CHANGED
File without changes
images/gplus.png CHANGED
File without changes
images/linkedin.png CHANGED
File without changes
images/logo.png CHANGED
File without changes
images/pause.png CHANGED
File without changes
images/suggest.png CHANGED
File without changes
images/support.png CHANGED
File without changes
images/twitter.png CHANGED
File without changes
images/xyz_logo.png CHANGED
File without changes
insert-html-snippet.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Insert HTML Snippet
4
  Plugin URI: http://xyzscripts.com/wordpress-plugins/insert-html-snippet/
5
  Description: Add HTML code to your pages and posts easily using shortcodes. This plugin lets you create a shortcode corresponding to any random HTML code such as ad codes, javascript, video embedding, etc. and use the same in your posts, pages or widgets.
6
- Version: 1.3.2
7
  Author: xyzscripts.com
8
  Author URI: http://xyzscripts.com/
9
  Text Domain: insert-html-snippet
3
  Plugin Name: Insert HTML Snippet
4
  Plugin URI: http://xyzscripts.com/wordpress-plugins/insert-html-snippet/
5
  Description: Add HTML code to your pages and posts easily using shortcodes. This plugin lets you create a shortcode corresponding to any random HTML code such as ad codes, javascript, video embedding, etc. and use the same in your posts, pages or widgets.
6
+ Version: 1.3.3
7
  Author: xyzscripts.com
8
  Author URI: http://xyzscripts.com/
9
  Text Domain: insert-html-snippet
js/notice.js CHANGED
File without changes
readme.txt CHANGED
@@ -1,145 +1,148 @@
1
- === Insert Html Snippet ===
2
- Contributors: f1logic
3
- Donate link: http://xyzscripts.com/donate/
4
- Tags: insert HTML, add HTML, insert adsense, insert ads, insert addthis code, insert flash , insert javascript, add javascript, insert css, add css, HTML to shortcode, integrate ad codes, raw html, embed html, html inserter, ad inserter, css inserter
5
- Requires at least: 3.0
6
- Tested up to: 5.7
7
- Stable tag: 1.3.2
8
- License: GPLv2 or later
9
-
10
- Add HTML, CSS and javascript code to your pages and posts easily using shortcodes.
11
-
12
- == Description ==
13
-
14
- A quicklook into Insert Html Snippet
15
-
16
- ★ Convert HTML snippets to shortcodes
17
- ★ Convert Javascript codes to shortcodes
18
- ★ Convert CSS codes to shortcodes
19
- ★ Support for snippet shortcodes in widgets
20
- ★ Dropdown menu in TinyMCE editor to pick snippet shortcodes easily
21
- ★ Insert adsense or any adcode
22
- ★ Insert addthis or any social bookmarking code
23
- ★ Insert flash, videos etc. to your posts,pages and widgets
24
-
25
- = Features in Detail =
26
-
27
- Insert Html Snippet allows you to create shortcodes corresponding to html snippets. You can create a shortcode corresponding to any random HTML code such as ad codes (adsense or any adserver), javascript codes (addthis), video embedding codes, css codes etc. and use the same in your posts, pages or widgets.
28
-
29
- The shortcodes generated using the plugin are easily available as a dropdown in the standard wordpress content editor as well as in widget settings, thereby giving you ease of integrating your HTML snippets with your posts and pages.
30
-
31
- = About =
32
-
33
- Insert Html Snippet is developed and maintained by [XYZScripts](http://xyzscripts.com/ "xyzscripts.com"). For any support, you may [contact us](http://xyzscripts.com/support/ "XYZScripts Support").
34
-
35
- ★ [Insert HTML Snippet User Guide](http://help.xyzscripts.com/docs/insert-html-snippet/user-guide)
36
- ★ [Insert HTML Snippet FAQ](http://help.xyzscripts.com/docs/insert-html-snippet/faq/)
37
-
38
- == Installation ==
39
-
40
- ★ [Insert HTML Snippet User Guide](http://help.xyzscripts.com/docs/insert-html-snippet/user-guide)
41
- ★ [Insert HTML Snippet FAQ](http://help.xyzscripts.com/docs/insert-html-snippet/faq/)
42
-
43
- 1. Extract `insert-html-snippet.zip` to your `/wp-content/plugins/` directory.
44
- 2. In the admin panel under plugins activate Insert Html Snippet.
45
-
46
- If you need any further help, you may contact our [support desk](http://xyzscripts.com/support/ "XYZScripts Support").
47
-
48
- == Frequently Asked Questions ==
49
-
50
- ★ [Insert HTML Snippet User Guide](http://help.xyzscripts.com/docs/insert-html-snippet/user-guide)
51
- ★ [Insert HTML Snippet FAQ](http://help.xyzscripts.com/docs/insert-html-snippet/faq/)
52
-
53
- = The Insert Html Snippet is not working properly. =
54
-
55
- Please check the wordpress version you are using. Make sure it meets the minimum version recommended by us. Make sure all files of the `insert html snippet` plugin uploaded to the folder `wp-content/plugins/`
56
-
57
- = Can I use shortcodes in html snippet ? =
58
-
59
- Yes ofcourse.
60
-
61
- = I have 2 html shortcodes placed adjacently, but only one of them works. =
62
-
63
- Please use a whitespace to separate 2 shortcodes.
64
-
65
- More questions ? [Drop a mail](http://xyzscripts.com/members/support/ "XYZScripts Support") and we shall get back to you with the answers.
66
-
67
-
68
- == Screenshots ==
69
-
70
- 1. This is the shortcode generator page
71
- 2. This is page where you can manage all your snippets
72
- 3. The shortcodes are easily accessible in the content editor
73
-
74
-
75
- == Changelog ==
76
-
77
- = 1.3.2 =
78
- * Database collation issue fixed
79
- * Minor bugs fixed
80
-
81
- = 1.3.1 =
82
- * Notice errors fixed
83
-
84
- = 1.3 =
85
- * Snippet selection support in classic editor block of Gutenberg
86
- * Support for Search Snippet by name
87
- * Navigation Improvements
88
-
89
- = 1.2.5 =
90
- * Support for Bulk Actions(activate,deactivate,delete)
91
-
92
- = 1.2.4 =
93
- * Removed deprecated widget initializing function
94
-
95
- = 1.2.3 =
96
- * Updated nonces and validations
97
- * Premium version details and comparison added
98
-
99
- = 1.2.2 =
100
- * Unwanted output removed
101
- * Widget class updated
102
-
103
- = 1.2.1 =
104
- * A few bug fixes
105
-
106
- = 1.2 =
107
- * Compatibility with wordpress 4.3
108
- * Added options to sort snippets in admin area by id and title
109
- * Removed redirection after snippet edit
110
-
111
- = 1.1.1 =
112
- * Compatibility with wordpress 3.9
113
-
114
- = 1.1 =
115
- * Support for shortcodes in html content
116
- * Snippet chooser TinyMCE plugin modified
117
- * A few bug fixes
118
-
119
- = 1.0.1 =
120
- * Support for network installation
121
- * Pagination bug fix
122
-
123
- = 1.0 =
124
- * First official launch.
125
-
126
- == Upgrade Notice ==
127
-
128
-
129
- == More Information ==
130
-
131
- ★ [Insert HTML Snippet User Guide](http://help.xyzscripts.com/docs/insert-html-snippet/user-guide)
132
- [Insert HTML Snippet FAQ](http://help.xyzscripts.com/docs/insert-html-snippet/faq/)
133
-
134
- = Troubleshooting =
135
-
136
- Please read the FAQ first if you are having problems.
137
-
138
- = Requirements =
139
-
140
- WordPress 3.0+
141
- PHP 5+
142
-
143
- = Feedback =
144
-
145
- We would like to receive your feedback and suggestions. You may submit them at our [support desk](http://xyzscripts.com/members/support/ "XYZScripts Support").
 
 
 
1
+ === Insert Html Snippet ===
2
+ Contributors: f1logic
3
+ Donate link: http://xyzscripts.com/donate/
4
+ Tags: insert HTML, add HTML, insert adsense, insert ads, insert addthis code, insert flash , insert javascript, add javascript, insert css, add css, HTML to shortcode, integrate ad codes, raw html, embed html, html inserter, ad inserter, css inserter
5
+ Requires at least: 3.0
6
+ Tested up to: 5.9.1
7
+ Stable tag: 1.3.3
8
+ License: GPLv2 or later
9
+
10
+ Add HTML, CSS and javascript code to your pages and posts easily using shortcodes.
11
+
12
+ == Description ==
13
+
14
+ A quicklook into Insert Html Snippet
15
+
16
+ ★ Convert HTML snippets to shortcodes
17
+ ★ Convert Javascript codes to shortcodes
18
+ ★ Convert CSS codes to shortcodes
19
+ ★ Support for snippet shortcodes in widgets
20
+ ★ Dropdown menu in TinyMCE editor to pick snippet shortcodes easily
21
+ ★ Insert adsense or any adcode
22
+ ★ Insert addthis or any social bookmarking code
23
+ ★ Insert flash, videos etc. to your posts,pages and widgets
24
+
25
+ = Features in Detail =
26
+
27
+ Insert Html Snippet allows you to create shortcodes corresponding to html snippets. You can create a shortcode corresponding to any random HTML code such as ad codes (adsense or any adserver), javascript codes (addthis), video embedding codes, css codes etc. and use the same in your posts, pages or widgets.
28
+
29
+ The shortcodes generated using the plugin are easily available as a dropdown in the standard wordpress content editor as well as in widget settings, thereby giving you ease of integrating your HTML snippets with your posts and pages.
30
+
31
+ = About =
32
+
33
+ Insert Html Snippet is developed and maintained by [XYZScripts](http://xyzscripts.com/ "xyzscripts.com"). For any support, you may [contact us](http://xyzscripts.com/support/ "XYZScripts Support").
34
+
35
+ ★ [Insert HTML Snippet User Guide](http://help.xyzscripts.com/docs/insert-html-snippet/user-guide)
36
+ ★ [Insert HTML Snippet FAQ](http://help.xyzscripts.com/docs/insert-html-snippet/faq/)
37
+
38
+ == Installation ==
39
+
40
+ ★ [Insert HTML Snippet User Guide](http://help.xyzscripts.com/docs/insert-html-snippet/user-guide)
41
+ ★ [Insert HTML Snippet FAQ](http://help.xyzscripts.com/docs/insert-html-snippet/faq/)
42
+
43
+ 1. Extract `insert-html-snippet.zip` to your `/wp-content/plugins/` directory.
44
+ 2. In the admin panel under plugins activate Insert Html Snippet.
45
+
46
+ If you need any further help, you may contact our [support desk](http://xyzscripts.com/support/ "XYZScripts Support").
47
+
48
+ == Frequently Asked Questions ==
49
+
50
+ ★ [Insert HTML Snippet User Guide](http://help.xyzscripts.com/docs/insert-html-snippet/user-guide)
51
+ ★ [Insert HTML Snippet FAQ](http://help.xyzscripts.com/docs/insert-html-snippet/faq/)
52
+
53
+ = The Insert Html Snippet is not working properly. =
54
+
55
+ Please check the wordpress version you are using. Make sure it meets the minimum version recommended by us. Make sure all files of the `insert html snippet` plugin uploaded to the folder `wp-content/plugins/`
56
+
57
+ = Can I use shortcodes in html snippet ? =
58
+
59
+ Yes ofcourse.
60
+
61
+ = I have 2 html shortcodes placed adjacently, but only one of them works. =
62
+
63
+ Please use a whitespace to separate 2 shortcodes.
64
+
65
+ More questions ? [Drop a mail](http://xyzscripts.com/members/support/ "XYZScripts Support") and we shall get back to you with the answers.
66
+
67
+
68
+ == Screenshots ==
69
+
70
+ 1. This is the shortcode generator page
71
+ 2. This is page where you can manage all your snippets
72
+ 3. The shortcodes are easily accessible in the content editor
73
+
74
+
75
+ == Changelog ==
76
+
77
+ = 1.3.3 =
78
+ * Minor bugs fixed
79
+
80
+ = 1.3.2 =
81
+ * Database collation issue fixed
82
+ * Minor bugs fixed
83
+
84
+ = 1.3.1 =
85
+ * Notice errors fixed
86
+
87
+ = 1.3 =
88
+ * Snippet selection support in classic editor block of Gutenberg
89
+ * Support for Search Snippet by name
90
+ * Navigation Improvements
91
+
92
+ = 1.2.5 =
93
+ * Support for Bulk Actions(activate,deactivate,delete)
94
+
95
+ = 1.2.4 =
96
+ * Removed deprecated widget initializing function
97
+
98
+ = 1.2.3 =
99
+ * Updated nonces and validations
100
+ * Premium version details and comparison added
101
+
102
+ = 1.2.2 =
103
+ * Unwanted output removed
104
+ * Widget class updated
105
+
106
+ = 1.2.1 =
107
+ * A few bug fixes
108
+
109
+ = 1.2 =
110
+ * Compatibility with wordpress 4.3
111
+ * Added options to sort snippets in admin area by id and title
112
+ * Removed redirection after snippet edit
113
+
114
+ = 1.1.1 =
115
+ * Compatibility with wordpress 3.9
116
+
117
+ = 1.1 =
118
+ * Support for shortcodes in html content
119
+ * Snippet chooser TinyMCE plugin modified
120
+ * A few bug fixes
121
+
122
+ = 1.0.1 =
123
+ * Support for network installation
124
+ * Pagination bug fix
125
+
126
+ = 1.0 =
127
+ * First official launch.
128
+
129
+ == Upgrade Notice ==
130
+
131
+
132
+ == More Information ==
133
+
134
+ [Insert HTML Snippet User Guide](http://help.xyzscripts.com/docs/insert-html-snippet/user-guide)
135
+ ★ [Insert HTML Snippet FAQ](http://help.xyzscripts.com/docs/insert-html-snippet/faq/)
136
+
137
+ = Troubleshooting =
138
+
139
+ Please read the FAQ first if you are having problems.
140
+
141
+ = Requirements =
142
+
143
+ WordPress 3.0+
144
+ PHP 5+
145
+
146
+ = Feedback =
147
+
148
+ We would like to receive your feedback and suggestions. You may submit them at our [support desk](http://xyzscripts.com/members/support/ "XYZScripts Support").
shortcode-handler.php CHANGED
File without changes
widget.php CHANGED
File without changes
xyz-functions.php CHANGED
@@ -1,53 +1,53 @@
1
- <?php
2
- if ( ! defined( 'ABSPATH' ) )
3
- exit;
4
-
5
- if(!function_exists('xyz_ihs_plugin_get_version'))
6
- {
7
- function xyz_ihs_plugin_get_version()
8
- {
9
- if ( ! function_exists( 'get_plugins' ) )
10
- require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
11
- $plugin_folder = get_plugins( '/' . plugin_basename( dirname( XYZ_INSERT_HTML_PLUGIN_FILE ) ) );
12
- return $plugin_folder['insert-html-snippet.php']['Version'];
13
- }
14
- }
15
-
16
- if(!function_exists('xyz_trim_deep'))
17
- {
18
-
19
- function xyz_trim_deep($value) {
20
- if ( is_array($value) ) {
21
- $value = array_map('xyz_trim_deep', $value);
22
- } elseif ( is_object($value) ) {
23
- $vars = get_object_vars( $value );
24
- foreach ($vars as $key=>$data) {
25
- $value->{$key} = xyz_trim_deep( $data );
26
- }
27
- } else {
28
- $value = trim($value);
29
- }
30
-
31
- return $value;
32
- }
33
-
34
- }
35
-
36
-
37
- if(!function_exists('xyz_ihs_links')){
38
- function xyz_ihs_links($links, $file) {
39
- $base = plugin_basename(XYZ_INSERT_HTML_PLUGIN_FILE);
40
- if ($file == $base) {
41
-
42
- $links[] = '<a href="https://xyzscripts.com/support/" class="xyz_support" title="Support"></a>';
43
- $links[] = '<a href="https://twitter.com/xyzscripts" class="xyz_twitt" title="Follow us on Twitter"></a>';
44
- $links[] = '<a href="https://www.facebook.com/xyzscripts" class="xyz_fbook" title="Like us on Facebook"></a>';
45
- $links[] = '<a href="https://plus.google.com/+Xyzscripts/" class="xyz_gplus" title="+1 us on Google+"></a>';
46
- $links[] = '<a href="https://www.linkedin.com/company/xyzscripts" class="xyz_linkedin" title="Follow us on LinkedIn"></a>';
47
- }
48
- return $links;
49
- }
50
- }
51
- add_filter( 'plugin_row_meta','xyz_ihs_links',10,2);
52
-
53
  ?>
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) )
3
+ exit;
4
+
5
+ if(!function_exists('xyz_ihs_plugin_get_version'))
6
+ {
7
+ function xyz_ihs_plugin_get_version()
8
+ {
9
+ if ( ! function_exists( 'get_plugins' ) )
10
+ require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
11
+ $plugin_folder = get_plugins( '/' . plugin_basename( dirname( XYZ_INSERT_HTML_PLUGIN_FILE ) ) );
12
+ return $plugin_folder['insert-html-snippet.php']['Version'];
13
+ }
14
+ }
15
+
16
+ if(!function_exists('xyz_trim_deep'))
17
+ {
18
+
19
+ function xyz_trim_deep($value) {
20
+ if ( is_array($value) ) {
21
+ $value = array_map('xyz_trim_deep', $value);
22
+ } elseif ( is_object($value) ) {
23
+ $vars = get_object_vars( $value );
24
+ foreach ($vars as $key=>$data) {
25
+ $value->{$key} = xyz_trim_deep( $data );
26
+ }
27
+ } else {
28
+ $value = trim($value);
29
+ }
30
+
31
+ return $value;
32
+ }
33
+
34
+ }
35
+
36
+
37
+ if(!function_exists('xyz_ihs_links')){
38
+ function xyz_ihs_links($links, $file) {
39
+ $base = plugin_basename(XYZ_INSERT_HTML_PLUGIN_FILE);
40
+ if ($file == $base) {
41
+
42
+ $links[] = '<a href="https://xyzscripts.com/support/" class="xyz_support" title="Support"></a>';
43
+ $links[] = '<a href="https://twitter.com/xyzscripts" class="xyz_twitt" title="Follow us on Twitter"></a>';
44
+ $links[] = '<a href="https://www.facebook.com/xyzscripts" class="xyz_fbook" title="Like us on Facebook"></a>';
45
+ $links[] = '<a href="https://plus.google.com/+Xyzscripts/" class="xyz_gplus" title="+1 us on Google+"></a>';
46
+ $links[] = '<a href="https://www.linkedin.com/company/xyzscripts" class="xyz_linkedin" title="Follow us on LinkedIn"></a>';
47
+ }
48
+ return $links;
49
+ }
50
+ }
51
+ add_filter( 'plugin_row_meta','xyz_ihs_links',10,2);
52
+
53
  ?>