Insert PHP Code Snippet - Version 1.2.5

Version Description

  • Added fix for output buffering issue
Download this release

Release Info

Developer f1logic
Plugin Icon 128x128 Insert PHP Code Snippet
Version 1.2.5
Comparing to
See all releases

Code changes from version 1.2.4 to 1.2.5

admin/footer.php CHANGED
@@ -1,250 +1,189 @@
1
- <?php
2
- if ( ! defined( 'ABSPATH' ) )
3
- exit;
4
-
5
- if(get_option('xyz_ips_premium_version_ads')==1){?>
6
- <div id="xyz-ips-premium">
7
-
8
- <div style="float: left; padding: 0 5px">
9
- <h2 style="vertical-align: middle;">
10
- <a target="_blank"
11
- href="https://xyzscripts.com/wordpress-plugins/xyz-wp-insert-code-snippet/details">Fully Featured XYZ WP Insert Code Snippet Premium Plugin</a>
12
- - Just 19 USD
13
- </h2>
14
- </div>
15
- <div style="float: left; margin-top: 3px">
16
- <a target="_blank"
17
- href="https://xyzscripts.com/members/product/purchase/XYZWPICSPRE"><img
18
- src="<?php echo plugins_url("images/orange_buynow.png",XYZ_INSERT_PHP_PLUGIN_FILE); ?>">
19
- </a>
20
- </div>
21
- <div style="float: left; padding: 0 5px">
22
- <h2 style="vertical-align: middle;text-shadow: 1px 1px 1px #686868">
23
- ( <a href="<?php echo admin_url('admin.php?page=insert-php-code-snippet-about');?>">Compare Features</a> )
24
- </h2>
25
- </div>
26
- </div>
27
- <?php
28
- }
29
- ?>
30
- <div style="clear: both;"></div>
31
-
32
-
33
- <div style="width: 100%">
34
-
35
-
36
- <div class="xyz_ips_social_media">
37
-
38
-
39
- <h3 class="xyz_ips_inner_head">Follow Us </h3>
40
-
41
-
42
- <a target="_blank" href="http://facebook.com/xyzscripts" class="xyz_home_fbook"></a>
43
- <a target="_blank" href="http://twitter.com/xyzscripts" class="xyz_home_twitt"></a>
44
- <a target="_blank" href="https://plus.google.com/+Xyzscripts/" class="xyz_home_gplus"></a>
45
- <a style="margin-right:0px;" target="_blank" href="https://www.linkedin.com/company/xyzscripts" class="xyz_home_linkedin"></a>
46
-
47
-
48
- </div>
49
-
50
- <div class="xyz_rate_us">
51
-
52
-
53
- <h3 class="xyz_ips_inner_head">Rate Us & Donate</h3>
54
-
55
- <p><a target="_blank" href="https://wordpress.org/support/plugin/insert-php-code-snippet/reviews/" >Please Rate Us
56
-
57
- </a></p>
58
-
59
-
60
- <a target="_blank" href="https://wordpress.org/support/plugin/insert-php-code-snippet/reviews/" ><span class="xyz_new_star"></span></a>
61
-
62
- <p><a target="_blank" href="https://xyzscripts.com/donate/5" >Donate</a></p>
63
-
64
- </div>
65
-
66
- <div class="xyz_ips_sugession">
67
-
68
-
69
- <h3 class="xyz_ips_inner_head">Support</h3>
70
-
71
-
72
- <p><a target="_blank" href="https://wordpress.org/support/plugin/insert-php-code-snippet/" >Create a ticket at Wordpress forum</a></p>
73
- <p><a target="_blank" href="https://xyzscripts.com/support/" >Contact Us</a></p>
74
-
75
-
76
-
77
- </div>
78
-
79
-
80
-
81
-
82
-
83
-
84
-
85
-
86
-
87
-
88
- <div class="xyz_new_subscribe">
89
-
90
-
91
- <h3 class="xyz_ips_inner_head">Stay tuned for our updates</h3>
92
-
93
-
94
-
95
-
96
-
97
-
98
-
99
-
100
-
101
-
102
- <script language="javascript">
103
- function check_email(emailString)
104
- {
105
- var mailPattern = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,})$/;
106
- var matchArray = emailString.match(mailPattern);
107
- if (emailString.length == 0)
108
- return false;
109
-
110
- if (matchArray == null) {
111
- return false;
112
- }else{
113
- return true;
114
- }
115
- }
116
-
117
-
118
- function verify_lists(form)
119
- {
120
-
121
- var total=0;
122
- var checkBox=form['chk[]'];
123
-
124
- if(checkBox.length){
125
-
126
- for(var i=0;i<checkBox.length;i++){
127
- checkBox[i].checked?total++:null;
128
- }
129
- }else{
130
-
131
- checkBox.checked?total++:null;
132
-
133
- }
134
- if(total>0){
135
- return true;
136
- }else{
137
- return false;
138
- }
139
-
140
- }
141
-
142
- function verify_fields()
143
- {
144
-
145
- if(check_email(document.email_subscription.email.value) == false){
146
- alert("Please check whether the email is correct.");
147
- document.email_subscription.email.select();
148
- return false;
149
- }else if(verify_lists(document.email_subscription)==false){
150
- alert("Select atleast one list.");
151
- }
152
- else{
153
- document.email_subscription.submit();
154
- }
155
-
156
- }
157
- </script>
158
- <?php global $current_user; wp_get_current_user();?>
159
- <form action="https://xyzscripts.com/newsletter/index.php?page=list/subscribe" method="post" name="email_subscription" id="email_subscription" target="_blank">
160
- <input type="hidden" name="fieldNameIds" value="1,">
161
- <input type="hidden" name="redirActive" value="http://xyzscripts.com/subscription/pending/XYZWPIPSFRE">
162
- <input type="hidden" name="redirPending" value="http://xyzscripts.com/subscription/active/XYZWPIPSFRE">
163
- <input type="hidden" name="mode" value="1">
164
-
165
- <input class="xyz_name" type="text" placeholder="Name" name="field1" value="<?php
166
- if ($current_user->user_firstname != "" || $current_user->user_lastname != "")
167
- {
168
- echo $current_user->user_firstname . " " . $current_user->user_lastname;
169
- }
170
- else if (strcasecmp($current_user->display_name, 'admin')!=0 && strcasecmp($current_user->display_name , "administrator")!=0 )
171
- {
172
- echo $current_user->display_name;
173
- }
174
- else if (strcasecmp($current_user->user_login ,"admin")!=0 && strcasecmp($current_user->user_login , "administrator")!=0 )
175
- {
176
- echo $current_user->user_login;
177
- }
178
- ?>" >
179
-
180
- <input class="xyz_email" name="email"
181
- type="text" placeholder="Email" value="<?php echo $current_user->user_email; ?>" />
182
-
183
- <input id="xyz_ips_submit_ips" type="submit" value="Subscribe" name="Submit" onclick="javascript: if(!verify_fields()) return false; " />
184
-
185
- <input type="hidden" name="listName" value="6,1,"/>
186
- </form>
187
-
188
-
189
-
190
-
191
-
192
-
193
-
194
- </div>
195
-
196
-
197
-
198
-
199
-
200
-
201
- </div>
202
-
203
-
204
-
205
-
206
-
207
- <div style="clear: both;"></div>
208
- <div style="width: 100%">
209
-
210
- <div class="xyz_our_plugins_new">
211
- <p class="xyz_plugin_head">Our Plugins : </p>
212
-
213
- <a target="_blank" href="https://xyzscripts.com/wordpress-plugins/social-media-auto-publish/"><span>1</span>Social Media Auto Publish</a>
214
- <a target="_blank" href="https://xyzscripts.com/wordpress-plugins/facebook-auto-publish/"><span>2</span>Facebook Auto Publish</a>
215
- <a target="_blank" href="https://xyzscripts.com/wordpress-plugins/twitter-auto-publish/"><span>3</span>Twitter Auto Publish</a>
216
- <a target="_blank" href="https://xyzscripts.com/wordpress-plugins/linkedin-auto-publish/"><span>4</span>LinkedIn Auto Publish</a>
217
-
218
- <a target="_blank" href="https://xyzscripts.com/wordpress-plugins/insert-html-snippet/"><span>5</span>Insert HTML Snippet</a>
219
- <a target="_blank" href="https://xyzscripts.com/wordpress-plugins/insert-php-code-snippet/"><span>6</span>Insert PHP Code Snippet</a>
220
- <a target="_blank" href="https://xyzscripts.com/wordpress-plugins/contact-form-manager/"><span>7</span>Contact Form Manager</a>
221
- <a target="_blank" href="https://xyzscripts.com/wordpress-plugins/newsletter-manager/"><span>8</span>Newsletter Manager</a>
222
-
223
-
224
-
225
-
226
-
227
- <a target="_blank" href="https://xyzscripts.com/wordpress-plugins/lightbox-pop/"><span>9</span>Lightbox Pop</a>
228
- <a target="_blank" href="https://xyzscripts.com/wordpress-plugins/full-screen-popup/"><span>10</span>Full Screen Popup</a>
229
- <a target="_blank" href="https://xyzscripts.com/wordpress-plugins/popup-dialog-box/"><span>11</span>Popup Dialog Box</a>
230
- <a target="_blank" href="https://xyzscripts.com/wordpress-plugins/quick-bar/"><span>12</span>Quick Bar</a>
231
- <a target="_blank" href="https://xyzscripts.com/wordpress-plugins/quick-box-popup/"><span>13</span>Quick Box Popup</a>
232
-
233
-
234
-
235
-
236
- <a target="_blank" href="https://xyzscripts.com/wordpress-plugins/custom-field-manager/"><span>14</span> Custom Field Manager</a>
237
-
238
-
239
- <a target="_blank" href="https://xyzscripts.com/wordpress-plugins/wp-filter-posts/"><span>15</span> WP Filter Posts</a>
240
-
241
- <a target="_blank" href="https://xyzscripts.com/wordpress-plugins/wp-gallery-manager/"><span>16</span> WP Gallery Manager</a>
242
- </div>
243
- </div>
244
- <div class="xyz_ips_poweredBy">
245
- Powered by <a href="http://xyzscripts.com" target="_blank">XYZScripts</a>
246
- </div>
247
- <div style="clear: both;"></div>
248
-
249
-
250
- <p style="clear: both;"></p>
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) )
3
+ exit;
4
+
5
+ if(get_option('xyz_ips_premium_version_ads')==1){?>
6
+ <div id="xyz-ips-premium">
7
+
8
+ <div style="float: left; padding: 0 5px">
9
+ <h2 style="vertical-align: middle;">
10
+ <a target="_blank"
11
+ href="https://xyzscripts.com/wordpress-plugins/xyz-wp-insert-code-snippet/details">Fully Featured XYZ WP Insert Code Snippet Premium Plugin</a>
12
+ - Just 19 USD
13
+ </h2>
14
+ </div>
15
+ <div style="float: left; margin-top: 3px">
16
+ <a target="_blank"
17
+ href="https://xyzscripts.com/members/product/purchase/XYZWPICSPRE"><img
18
+ src="<?php echo plugins_url("images/orange_buynow.png",XYZ_INSERT_PHP_PLUGIN_FILE); ?>">
19
+ </a>
20
+ </div>
21
+ <div style="float: left; padding: 0 5px">
22
+ <h2 style="vertical-align: middle;text-shadow: 1px 1px 1px #686868">
23
+ ( <a href="<?php echo admin_url('admin.php?page=insert-php-code-snippet-about');?>">Compare Features</a> )
24
+ </h2>
25
+ </div>
26
+ </div>
27
+ <?php
28
+ }
29
+ ?>
30
+ <div style="clear: both;"></div>
31
+
32
+
33
+ <div style="width: 100%">
34
+
35
+
36
+ <div class="xyz_ips_social_media">
37
+
38
+
39
+ <h3 class="xyz_ips_inner_head">Follow Us </h3>
40
+
41
+
42
+ <a target="_blank" href="http://facebook.com/xyzscripts" class="xyz_home_fbook"></a>
43
+ <a target="_blank" href="http://twitter.com/xyzscripts" class="xyz_home_twitt"></a>
44
+ <a target="_blank" href="https://plus.google.com/+Xyzscripts/" class="xyz_home_gplus"></a>
45
+ <a style="margin-right:0px;" target="_blank" href="https://www.linkedin.com/company/xyzscripts" class="xyz_home_linkedin"></a>
46
+
47
+
48
+ </div>
49
+
50
+ <div class="xyz_rate_us">
51
+
52
+
53
+ <h3 class="xyz_ips_inner_head">Rate Us & Donate</h3>
54
+
55
+ <p><a target="_blank" href="https://wordpress.org/support/plugin/insert-php-code-snippet/reviews/" >Please Rate Us
56
+
57
+ </a></p>
58
+
59
+
60
+ <a target="_blank" href="https://wordpress.org/support/plugin/insert-php-code-snippet/reviews/" ><span class="xyz_new_star"></span></a>
61
+
62
+ <p><a target="_blank" href="https://xyzscripts.com/donate/5" >Donate</a></p>
63
+
64
+ </div>
65
+
66
+ <div class="xyz_ips_sugession">
67
+ <h3 class="xyz_ips_inner_head">Support</h3>
68
+ <p><a target="_blank" href="https://wordpress.org/support/plugin/insert-php-code-snippet/" >Create a ticket at Wordpress forum</a></p>
69
+ <p><a target="_blank" href="https://xyzscripts.com/support/" >Contact Us</a></p>
70
+ </div>
71
+ <div class="xyz_new_subscribe">
72
+ <h3 class="xyz_ips_inner_head">Stay tuned for our updates</h3>
73
+
74
+ <script language="javascript">
75
+ function check_email(emailString)
76
+ {
77
+ var mailPattern = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,})$/;
78
+ var matchArray = emailString.match(mailPattern);
79
+ if (emailString.length == 0)
80
+ return false;
81
+
82
+ if (matchArray == null) {
83
+ return false;
84
+ }else{
85
+ return true;
86
+ }
87
+ }
88
+
89
+
90
+ function verify_lists(form)
91
+ {
92
+
93
+ var total=0;
94
+ var checkBox=form['chk[]'];
95
+
96
+ if(checkBox.length){
97
+
98
+ for(var i=0;i<checkBox.length;i++){
99
+ checkBox[i].checked?total++:null;
100
+ }
101
+ }else{
102
+
103
+ checkBox.checked?total++:null;
104
+
105
+ }
106
+ if(total>0){
107
+ return true;
108
+ }else{
109
+ return false;
110
+ }
111
+
112
+ }
113
+
114
+ function verify_fields()
115
+ {
116
+
117
+ if(check_email(document.email_subscription.email.value) == false){
118
+ alert("Please check whether the email is correct.");
119
+ document.email_subscription.email.select();
120
+ return false;
121
+ }else if(verify_lists(document.email_subscription)==false){
122
+ alert("Select atleast one list.");
123
+ }
124
+ else{
125
+ document.email_subscription.submit();
126
+ }
127
+
128
+ }
129
+ </script>
130
+ <?php global $current_user; wp_get_current_user();?>
131
+ <form action="https://xyzscripts.com/newsletter/index.php?page=list/subscribe" method="post" name="email_subscription" id="email_subscription" target="_blank">
132
+ <input type="hidden" name="fieldNameIds" value="1,">
133
+ <input type="hidden" name="redirActive" value="http://xyzscripts.com/subscription/pending/XYZWPIPSFRE">
134
+ <input type="hidden" name="redirPending" value="http://xyzscripts.com/subscription/active/XYZWPIPSFRE">
135
+ <input type="hidden" name="mode" value="1">
136
+
137
+ <input class="xyz_name" type="text" placeholder="Name" name="field1" value="<?php
138
+ if ($current_user->user_firstname != "" || $current_user->user_lastname != "")
139
+ {
140
+ echo $current_user->user_firstname . " " . $current_user->user_lastname;
141
+ }
142
+ else if (strcasecmp($current_user->display_name, 'admin')!=0 && strcasecmp($current_user->display_name , "administrator")!=0 )
143
+ {
144
+ echo $current_user->display_name;
145
+ }
146
+ else if (strcasecmp($current_user->user_login ,"admin")!=0 && strcasecmp($current_user->user_login , "administrator")!=0 )
147
+ {
148
+ echo $current_user->user_login;
149
+ }
150
+ ?>" >
151
+
152
+ <input class="xyz_email" name="email"
153
+ type="text" placeholder="Email" value="<?php echo $current_user->user_email; ?>" />
154
+
155
+ <input id="xyz_ips_submit_ips" type="submit" value="Subscribe" name="Submit" onclick="javascript: if(!verify_fields()) return false; " />
156
+
157
+ <input type="hidden" name="listName" value="6,1,"/>
158
+ </form>
159
+ </div>
160
+ </div>
161
+ <div style="clear: both;"></div>
162
+ <div style="width: 100%">
163
+ <div class="xyz_our_plugins_new">
164
+ <p class="xyz_plugin_head">Our Plugins : </p>
165
+ <a target="_blank" href="https://wordpress.org/plugins/social-media-auto-publish/"><span>1</span>Social Media Auto Publish</a>
166
+ <a target="_blank" href="https://wordpress.org/plugins/facebook-auto-publish/"><span>2</span>WP Facebook Auto Publish</a>
167
+ <a target="_blank" href="https://wordpress.org/plugins/twitter-auto-publish/"><span>3</span>WP Twitter Auto Publish</a>
168
+ <a target="_blank" href="https://wordpress.org/plugins/linkedin-auto-publish/"><span>4</span>WP to LinkedIn Auto Publish</a>
169
+ <a target="_blank" href="https://wordpress.org/plugins/insert-html-snippet/"><span>5</span>Insert HTML Snippet</a>
170
+ <a target="_blank" href="https://wordpress.org/plugins/insert-php-code-snippet/"><span>6</span>Insert PHP Code Snippet</a>
171
+ <a target="_blank" href="https://wordpress.org/plugins/contact-form-manager/"><span>7</span>Contact Form Manager</a>
172
+ <a target="_blank" href="https://wordpress.org/plugins/newsletter-manager/"><span>8</span>Newsletter Manager</a>
173
+ <a target="_blank" href="https://wordpress.org/plugins/lightbox-pop/"><span>9</span>Lightbox Pop</a>
174
+ <a target="_blank" href="https://wordpress.org/plugins/full-screen-popup/"><span>10</span>Full Screen Popup</a>
175
+ <a target="_blank" href="https://wordpress.org/plugins/popup-dialog-box/"><span>11</span>Popup Dialog Box</a>
176
+ <a target="_blank" href="https://wordpress.org/plugins/quick-bar/"><span>12</span>Quick Bar</a>
177
+ <a target="_blank" href="https://wordpress.org/plugins/quick-box-popup/"><span>13</span>Quick Box Popup</a>
178
+ <a target="_blank" href="https://wordpress.org/plugins/custom-field-manager/"><span>14</span> Custom Field Manager</a>
179
+ <a target="_blank" href="https://wordpress.org/plugins/wp-filter-posts/"><span>15</span> WP Filter Posts</a>
180
+ <a target="_blank" href="https://wordpress.org/plugins/wp-gallery-manager/"><span>16</span> WP Gallery Manager</a>
181
+ </div>
182
+ </div>
183
+ <div class="xyz_ips_poweredBy">
184
+ Powered by <a href="http://xyzscripts.com" target="_blank">XYZScripts</a>
185
+ </div>
186
+ <div style="clear: both;"></div>
187
+
188
+
189
+ <p style="clear: both;"></p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/menu.php CHANGED
@@ -18,6 +18,9 @@ if(isset($_GET['action']) && $_GET['action']=='snippet-edit' ){
18
  ob_start();
19
  }
20
 
 
 
 
21
  add_action('admin_menu', 'xyz_ips_menu');
22
 
23
  function xyz_ips_menu(){
@@ -27,7 +30,7 @@ function xyz_ips_menu(){
27
  add_submenu_page('insert-php-code-snippet-manage', 'PHPCode Snippets', 'PHPCode Snippets', 'manage_options', 'insert-php-code-snippet-manage','xyz_ips_snippets');
28
  add_submenu_page('insert-php-code-snippet-manage', 'PHPCode Snippets - Manage settings', 'Settings', 'manage_options', 'insert-php-code-snippet-settings' ,'xyz_ips_settings');
29
  add_submenu_page('insert-php-code-snippet-manage', 'PHPCode Snippets - About', 'About', 'manage_options', 'insert-php-code-snippet-about' ,'xyz_ips_about');
30
-
31
  }
32
 
33
  function xyz_ips_snippets(){
@@ -77,6 +80,11 @@ function xyz_ips_about(){
77
  require( dirname( __FILE__ ) . '/footer.php' );
78
  }
79
 
 
 
 
 
 
80
 
81
  function xyz_ips_add_style_script(){
82
 
18
  ob_start();
19
  }
20
 
21
+ if(isset($_GET['page']) && $_GET['page']=='insert-php-code-snippet-suggest-features' ){
22
+ ob_start();
23
+ }
24
  add_action('admin_menu', 'xyz_ips_menu');
25
 
26
  function xyz_ips_menu(){
30
  add_submenu_page('insert-php-code-snippet-manage', 'PHPCode Snippets', 'PHPCode Snippets', 'manage_options', 'insert-php-code-snippet-manage','xyz_ips_snippets');
31
  add_submenu_page('insert-php-code-snippet-manage', 'PHPCode Snippets - Manage settings', 'Settings', 'manage_options', 'insert-php-code-snippet-settings' ,'xyz_ips_settings');
32
  add_submenu_page('insert-php-code-snippet-manage', 'PHPCode Snippets - About', 'About', 'manage_options', 'insert-php-code-snippet-about' ,'xyz_ips_about');
33
+ add_submenu_page('insert-php-code-snippet-manage', 'PHPCode Snippets - Suggest Feature', 'Suggest a Feature', 'manage_options', 'insert-php-code-snippet-suggest-features' ,'xyz_ips_suggest_feature');
34
  }
35
 
36
  function xyz_ips_snippets(){
80
  require( dirname( __FILE__ ) . '/footer.php' );
81
  }
82
 
83
+ function xyz_ips_suggest_feature(){
84
+ require( dirname( __FILE__ ) . '/header.php' );
85
+ require( dirname( __FILE__ ) . '/suggest_feature.php' );
86
+ require( dirname( __FILE__ ) . '/footer.php' );
87
+ }
88
 
89
  function xyz_ips_add_style_script(){
90
 
admin/suggest_feature.php ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if( !defined('ABSPATH') ){ exit();}
3
+ global $wpdb;$xyz_ips_message='';
4
+ if(isset($_GET['xyz_ips_msg']))
5
+ $xyz_ips_message = $_GET['xyz_ips_msg'];
6
+ if($xyz_ips_message == 1){
7
+ ?>
8
+ <div class="xyz_system_notice_area_style1" id="xyz_system_notice_area">
9
+ Thank you for the suggestion.&nbsp;&nbsp;&nbsp;<span
10
+ id="xyz_system_notice_area_dismiss">Dismiss</span>
11
+ </div>
12
+ <?php
13
+ }
14
+ else if($xyz_ips_message == 2){
15
+ ?>
16
+ <div class="xyz_system_notice_area_style0" id="xyz_system_notice_area">
17
+ wp_mail not able to process the request.&nbsp;&nbsp;&nbsp;<span
18
+ id="xyz_system_notice_area_dismiss">Dismiss</span>
19
+ </div>
20
+ <?php
21
+ }
22
+ else if($xyz_ips_message == 3){
23
+ ?>
24
+ <div class="xyz_system_notice_area_style0" id="xyz_system_notice_area">
25
+ Please suggest a feature.&nbsp;&nbsp;&nbsp;<span
26
+ id="xyz_system_notice_area_dismiss">Dismiss</span>
27
+ </div>
28
+ <?php
29
+ }
30
+ if (isset($_POST) && isset($_POST['xyz_ips_send_mail']))
31
+ {
32
+
33
+ if (! isset( $_REQUEST['_wpnonce'] )|| ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'xyz_ips_suggest_feature_form_nonce' ))
34
+ {
35
+ wp_nonce_ays( 'xyz_ips_suggest_feature_form_nonce' );
36
+ exit();
37
+ }
38
+ if (isset($_POST['xyz_ips_suggested_feature']) && $_POST['xyz_ips_suggested_feature']!='')
39
+ {
40
+
41
+ $xyz_ips_feature_content=$_POST['xyz_ips_suggested_feature'];
42
+ $xyz_ips_sender_email = get_option('admin_email');
43
+ $entries0 = $wpdb->get_results( $wpdb->prepare( 'SELECT display_name FROM '.$wpdb->base_prefix.'users WHERE user_email=%s',array($xyz_ips_sender_email)));
44
+ foreach( $entries0 as $entry ) {
45
+ $xyz_ips_admin_username=$entry->display_name;
46
+ }
47
+ $xyz_ips_recv_email='support@xyzscripts.com';
48
+ $xyz_ips_mail_subject="INSERT PHP CODE SNIPPET - FEATURE SUGGESTION";
49
+ $xyz_ips_headers = array('From: '.$xyz_ips_admin_username.' <'. $xyz_ips_sender_email .'>' ,'Content-Type: text/html; charset=UTF-8');
50
+ $wp_mail_processed=wp_mail( $xyz_ips_recv_email, $xyz_ips_mail_subject, $xyz_ips_feature_content, $xyz_ips_headers );
51
+ if ($wp_mail_processed==true){
52
+ header("Location:".admin_url('admin.php?page=insert-php-code-snippet-suggest-features&xyz_ips_msg=1'));
53
+ exit();
54
+ }
55
+ else
56
+ {
57
+ header("Location:".admin_url('admin.php?page=insert-php-code-snippet-suggest-features&xyz_ips_msg=2'));exit();
58
+ }
59
+ }
60
+ else {
61
+ header("Location:".admin_url('admin.php?page=insert-php-code-snippet-suggest-features&xyz_ips_msg=3'));exit();
62
+ }
63
+ }?>
64
+ <form method="post" >
65
+ <?php wp_nonce_field( 'xyz_ips_suggest_feature_form_nonce' );?>
66
+ <h3>Contribute And Get Rewarded</h3>
67
+ <span style="color: #1A87B9;font-size:13px;padding-left: 10px;" >* Suggest a feature for this plugin and stand a chance to get a free copy of premium version of this plugin.</span>
68
+ <table class="widefat" style="width:98%;padding-top: 10px;">
69
+ <tr><td>
70
+ <textarea name="xyz_ips_suggested_feature" id="xyz_ips_suggested_feature" style="width:750px;height:250px !important;"></textarea>
71
+ </td></tr>
72
+ <tr>
73
+ <td><input name="xyz_ips_send_mail" class="button-primary" style="color:#FFFFFF;border-radius:4px;margin-bottom:10px;" type="submit" value="Send Mail To Us">
74
+ </td></tr>
75
+ </table>
76
+ </form>
editor_plugin.js.php CHANGED
@@ -1,125 +1,125 @@
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($shortcodesXYZEP))
10
- $shortcodesXYZEP = new XYZ_Insert_Php_TinyMCESelector();
11
-
12
- global $wpdb;
13
-
14
-
15
- $xyz_snippets_arr=$wpdb->get_results($wpdb->prepare( "SELECT id,title FROM ".$wpdb->prefix."xyz_ips_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)
21
- {
22
- ?>
23
- (function() {
24
-
25
- tinymce.PluginManager.add('<?php echo $shortcodesXYZEP->buttonName; ?>', function( editor, url ) {
26
- editor.addButton( '<?php echo $shortcodesXYZEP->buttonName; ?>', {
27
- title: 'Insert PHP Code Snippet',
28
- type: 'menubutton',
29
- icon: 'icon xyz-ips-own-icon',
30
- menu: [
31
- <?php foreach ($xyz_snippets_arr as $key=>$val) { ?>
32
- {
33
- text: '<?php echo addslashes($val['title']); ?>',
34
- value: '[xyz-ips snippet="<?php echo addslashes($val['title']); ?>"]',
35
- onclick: function() {
36
- editor.insertContent(this.value());
37
- }
38
- },
39
- <?php } ?>
40
- ]
41
- });
42
- });
43
-
44
- })();
45
- <?php } else {
46
-
47
- $xyz_snippets = array(
48
- 'title' =>'Insert PHP Code Snippet',
49
- 'url' => plugins_url('images/logo.png', XYZ_INSERT_PHP_PLUGIN_FILE),
50
- 'xyz_ips_snippets' => $xyz_snippets_arr
51
- );
52
- ?>
53
-
54
- var tinymce_<?php echo $shortcodesXYZEP->buttonName; ?> =<?php echo json_encode($xyz_snippets) ?>;
55
-
56
-
57
- (function() {
58
- //******* Load plugin specific language pack
59
-
60
- tinymce.create('tinymce.plugins.<?php echo $shortcodesXYZEP->buttonName; ?>', {
61
- /**
62
- * Initializes the plugin, this will be executed after the plugin has been created.
63
- * This call is done before the editor instance has finished it's initialization so use the onInit event
64
- * of the editor instance to intercept that event.
65
- *
66
- * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
67
- * @param {string} url Absolute URL to where the plugin is located.
68
- */
69
- init : function(ed, url) {
70
-
71
- tinymce_<?php echo $shortcodesXYZEP->buttonName; ?>.insert = function(){
72
- if(this.v && this.v != ''){
73
- tinymce.execCommand('mceInsertContent', false, '[xyz-ips snippet="'+tinymce_<?php echo $shortcodesXYZEP->buttonName; ?>.xyz_ips_snippets[this.v]['title']+'"]');
74
- }
75
- };
76
-
77
- },
78
-
79
- /**
80
- * Creates control instances based in the incomming name. This method is normally not
81
- * needed since the addButton method of the tinymce.Editor class is a more easy way of adding buttons
82
- * but you sometimes need to create more complex controls like listboxes, split buttons etc then this
83
- * method can be used to create those.
84
- *
85
- * @param {String} n Name of the control to create.
86
- * @param {tinymce.ControlManager} cm Control manager to use inorder to create new control.
87
- * @return {tinymce.ui.Control} New control instance or null if no control was created.
88
- */
89
- createControl : function(n, cm) {
90
- if(n=='<?php echo $shortcodesXYZEP->buttonName; ?>'){
91
- var c = cm.createSplitButton('<?php echo $shortcodesXYZEP->buttonName; ?>', {
92
- title : tinymce_<?php echo $shortcodesXYZEP->buttonName; ?>.title,
93
- image : tinymce_<?php echo $shortcodesXYZEP->buttonName; ?>.url,
94
- onclick : tinymce_<?php echo $shortcodesXYZEP->buttonName; ?>.insert
95
- });
96
-
97
- // Add some values to the list box
98
-
99
-
100
- c.onRenderMenu.add(function(c, m){
101
- for (var id in tinymce_<?php echo $shortcodesXYZEP->buttonName; ?>.xyz_ips_snippets){
102
- m.add({
103
- v : id,
104
- title : tinymce_<?php echo $shortcodesXYZEP->buttonName; ?>.xyz_ips_snippets[id]['title'],
105
- onclick : tinymce_<?php echo $shortcodesXYZEP->buttonName; ?>.insert
106
- });
107
- }
108
- });
109
-
110
-
111
- // Return the new listbox instance
112
- return c;
113
- }
114
-
115
- return null;
116
- },
117
-
118
-
119
- });
120
-
121
- // Register plugin
122
- tinymce.PluginManager.add('<?php echo $shortcodesXYZEP->buttonName; ?>', tinymce.plugins.<?php echo $shortcodesXYZEP->buttonName; ?>);
123
- })();
124
-
125
- <?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($shortcodesXYZEP))
10
+ $shortcodesXYZEP = new XYZ_Insert_Php_TinyMCESelector();
11
+
12
+ global $wpdb;
13
+
14
+
15
+ $xyz_snippets_arr=$wpdb->get_results($wpdb->prepare( "SELECT id,title FROM ".$wpdb->prefix."xyz_ips_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)
21
+ {
22
+ ?>
23
+ (function() {
24
+
25
+ tinymce.PluginManager.add('<?php echo $shortcodesXYZEP->buttonName; ?>', function( editor, url ) {
26
+ editor.addButton( '<?php echo $shortcodesXYZEP->buttonName; ?>', {
27
+ title: 'Insert PHP Code Snippet',
28
+ type: 'menubutton',
29
+ icon: 'icon xyz-ips-own-icon',
30
+ menu: [
31
+ <?php foreach ($xyz_snippets_arr as $key=>$val) { ?>
32
+ {
33
+ text: '<?php echo addslashes($val['title']); ?>',
34
+ value: '[xyz-ips snippet="<?php echo addslashes($val['title']); ?>"]',
35
+ onclick: function() {
36
+ editor.insertContent(this.value());
37
+ }
38
+ },
39
+ <?php } ?>
40
+ ]
41
+ });
42
+ });
43
+
44
+ })();
45
+ <?php } else {
46
+
47
+ $xyz_snippets = array(
48
+ 'title' =>'Insert PHP Code Snippet',
49
+ 'url' => plugins_url('images/logo.png', XYZ_INSERT_PHP_PLUGIN_FILE),
50
+ 'xyz_ips_snippets' => $xyz_snippets_arr
51
+ );
52
+ ?>
53
+
54
+ var tinymce_<?php echo $shortcodesXYZEP->buttonName; ?> =<?php echo json_encode($xyz_snippets) ?>;
55
+
56
+
57
+ (function() {
58
+ //******* Load plugin specific language pack
59
+
60
+ tinymce.create('tinymce.plugins.<?php echo $shortcodesXYZEP->buttonName; ?>', {
61
+ /**
62
+ * Initializes the plugin, this will be executed after the plugin has been created.
63
+ * This call is done before the editor instance has finished it's initialization so use the onInit event
64
+ * of the editor instance to intercept that event.
65
+ *
66
+ * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
67
+ * @param {string} url Absolute URL to where the plugin is located.
68
+ */
69
+ init : function(ed, url) {
70
+
71
+ tinymce_<?php echo $shortcodesXYZEP->buttonName; ?>.insert = function(){
72
+ if(this.v && this.v != ''){
73
+ tinymce.execCommand('mceInsertContent', false, '[xyz-ips snippet="'+tinymce_<?php echo $shortcodesXYZEP->buttonName; ?>.xyz_ips_snippets[this.v]['title']+'"]');
74
+ }
75
+ };
76
+
77
+ },
78
+
79
+ /**
80
+ * Creates control instances based in the incomming name. This method is normally not
81
+ * needed since the addButton method of the tinymce.Editor class is a more easy way of adding buttons
82
+ * but you sometimes need to create more complex controls like listboxes, split buttons etc then this
83
+ * method can be used to create those.
84
+ *
85
+ * @param {String} n Name of the control to create.
86
+ * @param {tinymce.ControlManager} cm Control manager to use inorder to create new control.
87
+ * @return {tinymce.ui.Control} New control instance or null if no control was created.
88
+ */
89
+ createControl : function(n, cm) {
90
+ if(n=='<?php echo $shortcodesXYZEP->buttonName; ?>'){
91
+ var c = cm.createSplitButton('<?php echo $shortcodesXYZEP->buttonName; ?>', {
92
+ title : tinymce_<?php echo $shortcodesXYZEP->buttonName; ?>.title,
93
+ image : tinymce_<?php echo $shortcodesXYZEP->buttonName; ?>.url,
94
+ onclick : tinymce_<?php echo $shortcodesXYZEP->buttonName; ?>.insert
95
+ });
96
+
97
+ // Add some values to the list box
98
+
99
+
100
+ c.onRenderMenu.add(function(c, m){
101
+ for (var id in tinymce_<?php echo $shortcodesXYZEP->buttonName; ?>.xyz_ips_snippets){
102
+ m.add({
103
+ v : id,
104
+ title : tinymce_<?php echo $shortcodesXYZEP->buttonName; ?>.xyz_ips_snippets[id]['title'],
105
+ onclick : tinymce_<?php echo $shortcodesXYZEP->buttonName; ?>.insert
106
+ });
107
+ }
108
+ });
109
+
110
+
111
+ // Return the new listbox instance
112
+ return c;
113
+ }
114
+
115
+ return null;
116
+ },
117
+
118
+
119
+ });
120
+
121
+ // Register plugin
122
+ tinymce.PluginManager.add('<?php echo $shortcodesXYZEP->buttonName; ?>', tinymce.plugins.<?php echo $shortcodesXYZEP->buttonName; ?>);
123
+ })();
124
+
125
+ <?php } ?>
insert-php-code-snippet.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Insert PHP Code Snippet
4
  Plugin URI: http://xyzscripts.com/wordpress-plugins/insert-php-code-snippet/
5
  Description: Insert and run PHP code in your pages and posts easily using shortcodes. This plugin lets you create a shortcode corresponding to any random PHP code and use the same in your posts, pages or widgets.
6
- Version: 1.2.4
7
  Author: xyzscripts.com
8
  Author URI: http://xyzscripts.com/
9
  Text Domain: insert-php-code-snippet
3
  Plugin Name: Insert PHP Code Snippet
4
  Plugin URI: http://xyzscripts.com/wordpress-plugins/insert-php-code-snippet/
5
  Description: Insert and run PHP code in your pages and posts easily using shortcodes. This plugin lets you create a shortcode corresponding to any random PHP code and use the same in your posts, pages or widgets.
6
+ Version: 1.2.5
7
  Author: xyzscripts.com
8
  Author URI: http://xyzscripts.com/
9
  Text Domain: insert-php-code-snippet
readme.txt CHANGED
@@ -1,116 +1,119 @@
1
  === Insert PHP Code Snippet ===
2
- Contributors: f1logic
3
  Donate link: http://xyzscripts.com/donate/
4
- Tags: insert PHP, add PHP, insert PHP code, insert PHP tag, insert PHP snippet, insert PHP code snippet , insert PHP snippet, add PHP code, insert PHP tag, add PHP snippet, add PHP code snippet, integrate PHP codes, raw PHP, embed PHP, PHP inserter, PHP code inserter, PHP snippet inserter
5
- Requires at least: 2.8
6
- Tested up to: 4.9.4
7
- Stable tag: 1.2.4
8
- License: GPLv2 or later
9
-
10
- Add PHP code to your pages and posts easily using shortcodes.
11
-
12
- == Description ==
13
-
14
- A quicklook into Insert PHP Code Snippet
15
-
16
- ★ Convert PHP snippets to shortcodes
17
- ★ Insert PHP code easily using shortcode
18
- ★ Support for PHP snippet shortcodes in widgets
19
- ★ Dropdown menu in TinyMCE editor to pick snippet shortcodes easily
20
-
21
- = Features in Detail =
22
-
23
- Insert PHP Code Snippet allows you to create shortcodes corresponding to PHP code snippets. You can create a shortcode corresponding to any random PHP code such as ad codes, login validation etc. and use the same in your posts, pages or widgets.
24
-
25
- 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 PHP snippets with your posts and pages.
26
-
27
- = About =
28
-
29
- Insert PHP Code 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").
30
-
31
- ★ [Insert PHP Code Snippet User Guide](http://help.xyzscripts.com/docs/insert-php-code-snippet/user-guide)
32
- ★ [Insert PHP Code Snippet FAQ](http://help.xyzscripts.com/docs/insert-php-code-snippet/faq/)
33
-
34
- == Installation ==
35
-
36
- ★ [Insert PHP Code Snippet User Guide](http://help.xyzscripts.com/docs/insert-php-code-snippet/user-guide)
37
- ★ [Insert PHP Code Snippet FAQ](http://help.xyzscripts.com/docs/insert-php-code-snippet/faq/)
38
-
39
- 1. Extract `insert-php-code-snippet.zip` to your `/wp-content/plugins/` directory.
40
- 2. In the admin panel under plugins activate Insert PHP Code Snippet.
41
-
42
- If you need any further help, you may contact our [support desk](http://xyzscripts.com/support/ "XYZScripts Support").
43
-
44
- == Frequently Asked Questions ==
45
-
46
- ★ [Insert PHP Code Snippet User Guide](http://help.xyzscripts.com/docs/insert-php-code-snippet/user-guide)
47
- ★ [Insert PHP Code Snippet FAQ](http://help.xyzscripts.com/docs/insert-php-code-snippet/faq/)
48
-
49
- = 1. The Insert PHP Code Snippet is not working properly. =
50
-
51
- 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 php code snippet` plugin uploaded to the folder `wp-content/plugins/`
52
-
53
- = 2. I have 2 PHP shortcodes placed adjacently, but only one of them works. =
54
-
55
- Please use a whitespace to separate 2 shortcodes.
56
-
57
- More questions ? [Drop a mail](http://xyzscripts.com/members/support/ "XYZScripts Support") and we shall get back to you with the answers.
58
-
59
-
60
- == Screenshots ==
61
-
62
- 1. This is the shortcode generator page
63
- 2. This is page where you can manage all your snippets
64
- 3. The shortcodes are easily accessible in the content editor
65
-
66
-
67
- == Changelog ==
68
-
 
 
 
69
  = 1.2.4 =
70
  * Removed deprecated widget initializing function
71
 
72
  = 1.2.3 =
73
  * Option to enable auto insert of php opening tags added.
74
 
75
- = 1.2.2 =
76
  * Automatic detection and correction of php opening and closing tags in snippet
77
  * Updated nonces and validations
78
  * Premium version details and comparison added
79
-
80
- = 1.2.1 =
81
  * Nonces Added
82
  * A few bug fixes
83
-
84
- = 1.2 =
85
- * Compatibility with wordpress 4.3
86
  * Added options to sort snippets in admin area by id and title
87
  * Removed redirection after snippet edit
88
-
89
- = 1.1 =
90
  * Snippet chooser TinyMCE plugin modified
91
- * Compatibility with wordpress 3.9
92
  * A few bug fixes
93
-
94
- = 1.0 =
95
  * First official launch
96
-
97
- == Upgrade Notice ==
98
-
99
-
100
- == More Information ==
101
-
102
- ★ [Insert PHP Code Snippet User Guide](http://help.xyzscripts.com/docs/insert-php-code-snippet/user-guide)
103
- ★ [Insert PHP Code Snippet FAQ](http://help.xyzscripts.com/docs/insert-php-code-snippet/faq/)
104
-
105
- = Troubleshooting =
106
-
107
- Please read the FAQ first if you are having problems.
108
-
109
- = Requirements =
110
-
111
- WordPress 3.0+
112
- PHP 5+
113
-
114
- = Feedback =
115
-
116
- 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 PHP Code Snippet ===
2
+ Contributors: f1logic
3
  Donate link: http://xyzscripts.com/donate/
4
+ Tags: insert PHP, add PHP, insert PHP code, insert PHP tag, insert PHP snippet, insert PHP code snippet , insert PHP snippet, add PHP code, insert PHP tag, add PHP snippet, add PHP code snippet, integrate PHP codes, raw PHP, embed PHP, PHP inserter, PHP code inserter, PHP snippet inserter
5
+ Requires at least: 2.8
6
+ Tested up to: 4.9.6
7
+ Stable tag: 1.2.5
8
+ License: GPLv2 or later
9
+
10
+ Add PHP code to your pages and posts easily using shortcodes.
11
+
12
+ == Description ==
13
+
14
+ A quicklook into Insert PHP Code Snippet
15
+
16
+ ★ Convert PHP snippets to shortcodes
17
+ ★ Insert PHP code easily using shortcode
18
+ ★ Support for PHP snippet shortcodes in widgets
19
+ ★ Dropdown menu in TinyMCE editor to pick snippet shortcodes easily
20
+
21
+ = Features in Detail =
22
+
23
+ Insert PHP Code Snippet allows you to create shortcodes corresponding to PHP code snippets. You can create a shortcode corresponding to any random PHP code such as ad codes, login validation etc. and use the same in your posts, pages or widgets.
24
+
25
+ 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 PHP snippets with your posts and pages.
26
+
27
+ = About =
28
+
29
+ Insert PHP Code 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").
30
+
31
+ ★ [Insert PHP Code Snippet User Guide](http://help.xyzscripts.com/docs/insert-php-code-snippet/user-guide)
32
+ ★ [Insert PHP Code Snippet FAQ](http://help.xyzscripts.com/docs/insert-php-code-snippet/faq/)
33
+
34
+ == Installation ==
35
+
36
+ ★ [Insert PHP Code Snippet User Guide](http://help.xyzscripts.com/docs/insert-php-code-snippet/user-guide)
37
+ ★ [Insert PHP Code Snippet FAQ](http://help.xyzscripts.com/docs/insert-php-code-snippet/faq/)
38
+
39
+ 1. Extract `insert-php-code-snippet.zip` to your `/wp-content/plugins/` directory.
40
+ 2. In the admin panel under plugins activate Insert PHP Code Snippet.
41
+
42
+ If you need any further help, you may contact our [support desk](http://xyzscripts.com/support/ "XYZScripts Support").
43
+
44
+ == Frequently Asked Questions ==
45
+
46
+ ★ [Insert PHP Code Snippet User Guide](http://help.xyzscripts.com/docs/insert-php-code-snippet/user-guide)
47
+ ★ [Insert PHP Code Snippet FAQ](http://help.xyzscripts.com/docs/insert-php-code-snippet/faq/)
48
+
49
+ = 1. The Insert PHP Code Snippet is not working properly. =
50
+
51
+ 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 php code snippet` plugin uploaded to the folder `wp-content/plugins/`
52
+
53
+ = 2. I have 2 PHP shortcodes placed adjacently, but only one of them works. =
54
+
55
+ Please use a whitespace to separate 2 shortcodes.
56
+
57
+ More questions ? [Drop a mail](http://xyzscripts.com/members/support/ "XYZScripts Support") and we shall get back to you with the answers.
58
+
59
+
60
+ == Screenshots ==
61
+
62
+ 1. This is the shortcode generator page
63
+ 2. This is page where you can manage all your snippets
64
+ 3. The shortcodes are easily accessible in the content editor
65
+
66
+
67
+ == Changelog ==
68
+
69
+ = 1.2.5 =
70
+ * Added fix for output buffering issue
71
+
72
  = 1.2.4 =
73
  * Removed deprecated widget initializing function
74
 
75
  = 1.2.3 =
76
  * Option to enable auto insert of php opening tags added.
77
 
78
+ = 1.2.2 =
79
  * Automatic detection and correction of php opening and closing tags in snippet
80
  * Updated nonces and validations
81
  * Premium version details and comparison added
82
+
83
+ = 1.2.1 =
84
  * Nonces Added
85
  * A few bug fixes
86
+
87
+ = 1.2 =
88
+ * Compatibility with wordpress 4.3
89
  * Added options to sort snippets in admin area by id and title
90
  * Removed redirection after snippet edit
91
+
92
+ = 1.1 =
93
  * Snippet chooser TinyMCE plugin modified
94
+ * Compatibility with wordpress 3.9
95
  * A few bug fixes
96
+
97
+ = 1.0 =
98
  * First official launch
99
+
100
+ == Upgrade Notice ==
101
+
102
+
103
+ == More Information ==
104
+
105
+ ★ [Insert PHP Code Snippet User Guide](http://help.xyzscripts.com/docs/insert-php-code-snippet/user-guide)
106
+ ★ [Insert PHP Code Snippet FAQ](http://help.xyzscripts.com/docs/insert-php-code-snippet/faq/)
107
+
108
+ = Troubleshooting =
109
+
110
+ Please read the FAQ first if you are having problems.
111
+
112
+ = Requirements =
113
+
114
+ WordPress 3.0+
115
+ PHP 5+
116
+
117
+ = Feedback =
118
+
119
+ 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
@@ -11,10 +11,10 @@ function xyz_ips_display_content($xyz_snippet_name){
11
  if(count($query)>0){
12
  foreach ($query as $sippetdetails){
13
  if($sippetdetails->status==1){
14
- if(is_numeric(ini_get('output_buffering'))){
15
  $tmp=ob_get_contents();
16
  if(strlen($tmp)>0)
17
- ob_clean();
18
  ob_start();
19
  $content_to_eval=$sippetdetails->content;
20
 
@@ -65,12 +65,12 @@ else{
65
  eval($content_to_eval);
66
  $xyz_em_content = ob_get_contents();
67
  ob_clean();
68
- echo $tmp;
69
  return $xyz_em_content;
70
- }
71
  else{
72
  eval($sippetdetails->content);
73
- }
74
  }
75
  else{
76
  return '';
11
  if(count($query)>0){
12
  foreach ($query as $sippetdetails){
13
  if($sippetdetails->status==1){
14
+ /* if(is_numeric(ini_get('output_buffering'))){
15
  $tmp=ob_get_contents();
16
  if(strlen($tmp)>0)
17
+ ob_clean();*/
18
  ob_start();
19
  $content_to_eval=$sippetdetails->content;
20
 
65
  eval($content_to_eval);
66
  $xyz_em_content = ob_get_contents();
67
  ob_clean();
68
+ // echo $tmp;
69
  return $xyz_em_content;
70
+ /* }
71
  else{
72
  eval($sippetdetails->content);
73
+ }*/
74
  }
75
  else{
76
  return '';