PluginProbe
Woody Code Snippets – Insert PHP, CSS, JS, and Header/Footer Scripts / trunk
Woody Code Snippets – Insert PHP, CSS, JS, and Header/Footer Scripts vtrunk
2.7.7 2.7.6 2.7.5 2.7.4 trunk 1.3 2.0.4 2.0.6 2.1.91 2.2.4 2.2.7 2.2.9 2.3.1 2.3.10 2.4.10 2.4.2 2.4.4 2.4.5 2.4.6 2.4.7 2.4.8 2.4.9 2.6.0 2.6.1 2.7.0 All 28 releases
← All changes | readme.txt +611 -443 2.4.2trunk View file →
@@ -1,443 +1,611 @@
1 -=== Woody code snippets - Insert Header Footer Code, AdSense Ads ===
2 -Contributors: WillBontrager, creativemotion
3 -Donate link: https://woodysnippet.com
4 -Tags: code snippets, woocommerce, shortcode, adsense, header
5 -Requires at least: 4.8
6 -Tested up to: 5.8
7 -Requires PHP: 7.0
8 -Stable tag: trunk
9 -License: GPLv2 or later
10 -License URI: http://www.gnu.org/licenses/gpl-2.0.html
11 -
12 -Insert Headers and Footers, executes PHP code, uses conditional logic to insert ads, text, media content and external service’s code.
13 -
14 -== Description ==
15 -
16 -### Need professional support? ###
17 -[Get starting FREE support](http://forum.webcraftic.com/forums/problems-and-solutions.3/ "Get starting free support")
18 -[Get starting PREMIUM support](https://webcraftic.com/premium-support/ "Get starting premium support")
19 -
20 -- Stop re-using the same content over and over again!
21 -- Stop inserting PHP code to function.php!
22 -- Stop adding google analytics, yandex metrics and external code to header and footer php files!
23 -- Stop wasting time on changing 100 pages with repeated content!
24 -
25 -Woody Code Snippets will make your life so much easier. The plugin helps to create and store code snippets or duplicated text in a special library at the admin bar of your website. Use the shortcode to add a snippet anywhere on your website. Or do it automatically, for example: head, footer and post injections. You can show or hide code snippets using conditional logic.
26 -
27 -### Why do you need this plugin? ###
28 -
29 -- Insert Headers and Footers
30 -- Insert Google AdSense Ads, Amazon Native Shopping Contextual Ads, Yandex Direct Ads, Media.net on your website.
31 -- Insert Google Analytic Tracking code, Yandex Metrika Tracking Code, Yandex Counter to Header, Footer.
32 -- Insert PHP Code Snippets and execute on your website. Register PHP functions, classes, global variables everywhere.
33 -- Insert Social media widgets, add any external resources widgets.
34 -- Insert Facebook Pixels, Facebook Scripts, Facebook og:image Tag, Google Conversion Pixels, Vk Pixels.
35 -- Show or hide code snippets based on conditional logic.
36 -- You can save templates of posts or page builders, quotes, and galleries to re-use them on your website.
37 -- Roll back changes with Code Revisions **[(Premium)](https://woodysnippet.com/pricing/ "Get PRO")**
38 -- Cloud storage for snippets **[(Premium)](https://woodysnippet.com/pricing/ "Get PRO")**
39 -- Synchronize snippets between your sites using the cloud (**Coming soon**)
40 -- Ready-made snippets in our cloud that will help you solve some of your cases (**[Premium](https://woodysnippet.com/pricing/ "Get PRO")**)
41 -
42 -### Need premium features? ###
43 -
44 -**[Get Premium version](https://woodysnippet.com/pricing/)**
45 -
46 -### How It Works? ###
47 -
48 -#### Example #1 ####
49 - You create a new javascript snippet and add a code you’d like to place on a website. Html snippet editor provides you with tooltips and highlights errors in syntax. Now you need to define where to put a code. For example, you can place the code in header, footer of all pages. This works great for Google Analytics. Create an additional condition: do not show this code to the administrator. It will prevent from tracking user role.
50 -
51 -#### Example #2 ####
52 -You create a text snippet and add a repeated text or a template. You can add a shortcode for the contact form, in case it’s universal for all website pages. Now you can add conditions to show this content to registered users only. Save the text snippet and go to editing pages. If you use the Gutenberg editor, you need to select a special unit. For the classic editor, click the icon of our plugin and add a shortcode of your new snippet.
53 -As you can see, working with snippets is super easy!
54 -
55 -https://youtu.be/FNoNsl_jy2k
56 -
57 -### All Plugin Features:###
58 -* Header footer code manager
59 -* User-friendly code editor with syntax highlighter.
60 -* Create rich text ads using a classic WordPress editor TinyMCE.
61 -* Use shortcodes to place a snippet anywhere on a website.
62 -* Use a special unit to add a snippet in Gutenberg Editor.
63 -* You can send content and additional attributes to a snippet using a shortcode or a special unit (Gutenberg Editor).
64 -* Place post snippets automatically on all pages.
65 -* Run PHP code everywhere or for a certain shortcode.
66 -* Use JavaScript, CSS, and HTML code to create code snippets.
67 -* The Unlimited number of code snippets.
68 -* Use shortcodes of other plugins.
69 -* Show or hide code snippets based on conditional logic.
70 -* Export/Import of code snippets.
71 -
72 -### Where Can You Place a Snippet Automatically? ###
73 -
74 -**All website:**
75 -
76 -**Insert Headers and Footers on all pages:**
77 -
78 -* Insert Header — code snippet is added to the source code in header before the </head> tag.
79 -* Insert Footer — code snippet is added to the source code in footer before the </body> tag.
80 -
81 -**Insert to Posts, pages, custom posts:**
82 -
83 -* Insert ads Before Post — post snippets is added to the source code before the </head> tag.
84 -* Insert ads Before Content — page snippets is added before the post/page content.
85 -* Insert ads Before Paragraph — post snippets is added before a certain paragraph. A paragraph number is listed in the Location number field.
86 -* Insert ads After Paragraph — post snippets is added after a certain paragraph. A paragraph number is listed in the Location number field.
87 -* Insert ads After Content — page snippets is added after the post/page content.
88 -* Insert ads After Post — post snippets is added after the post/page.
89 -
90 -**Insert to Categories, archives, tags, taxonomy:**
91 -
92 -* Insert AdSense Before Excerpt — snippet is added before the post/page preview.
93 -* Insert AdSense After Excerpt — snippet is added after the post/page preview.
94 -* Insert AdSense Between Posts — snippet is added between posts.
95 -* Insert AdSense Before post — snippet is added before a certain post. A post number is listed in the Location number field.
96 -* Insert AdSense After post — snippet is added after a certain post. A post number is listed in the Location number field.
97 -
98 -**Insert to Woocommerce pages: [(Premium)](https://woodysnippet.com/pricing/ "Get PRO")**
99 -
100 -* Before the list of products — Snippet will be placed before the list of products.
101 -* After the list of products — Snippet will be placed after the list of products.
102 -* Before a single product — Snippet will be placed before a single product
103 -* After a single product — Snippet will be placed after a single product
104 -* Before a single product summary — Snippet will be placed before a single product summary
105 -* After a single product summary — Snippet will be placed after a single product summary
106 -* After a product title — Snippet will be placed after a product title
107 -* After a product price — Snippet will be placed after a product price
108 -* After a product excerpt — Snippet will be placed after a product excerpt
109 -
110 -* Insert AdSense After post — snippet is added after a certain post. A post number is listed in the Location number field.
111 -
112 -### What Are Conditional Logic Options to Show a Snippet? ###
113 -
114 -**User:**
115 -- Role
116 -- Registration Date
117 -- Cookie Name
118 -- Current Page
119 -- Current Referrer
120 -**Location:**
121 -- Post Type
122 -- Taxonomy page
123 -- Taxonomy of the page
124 -- Page
125 -**Technology [(Premium)](https://woodysnippet.com/pricing/ "Get PRO")**:
126 -- AddBlocker
127 -- Browser
128 -- Use cookie
129 -- Use JavaScript
130 -- Operation system
131 -- Device type
132 -**Auditory [(Premium)](https://woodysnippet.com/pricing/ "Get PRO")**:
133 -- User country (Use Webnet77 or MaxMind geo ip base)
134 -- Viewing depth
135 -- Attendance by time of day
136 -- Total number of visits
137 -
138 -#### Recommended our plugins ####
139 -* [Clearfy - all in one optimization tools](https://wordpress.org/plugins/clearfy/ "Download Clearfy")
140 -* [Robin Image Optimizer - save money on image compression](https://wordpress.org/plugins/robin-image-optimizer/ "Download Robin Image Optimizer")
141 -* [Titan Anti-spam & Security - save money on image compression](https://wordpress.org/plugins/anti-spam/ "Download Titan")
142 -
143 -#### NEED SUPPORT, WE GOT YOU COVERED ####
144 -We provide free support for this plugin. If you are pushed with a problem, just create a new ticket. We will definitely help you!
145 -
146 -1. **[Get starting free support](http://forum.webcraftic.com)**
147 -2. **[Documentation](https://woodysnippet.com/getting-started-with-woody-ad-snippets/)**
148 -
149 -We are very need for your help with [translating Woody Code Snippets plugin](https://translate.wordpress.org/projects/wp-plugins/insert-php) into your native language. We want to make it international and understandable for everyone. Please contact us via email inside the plugin, or create a topic on our [support forum](http://forum.webcraftic.com) if you can help with the translations. In exchange for your help, we will give you better support and our premium plugins absolutely free!
150 -
151 -### Setting options ###
152 -* Keep the HTML entities, don't convert to its character - If you want to use an HTML entity in your code (for example > or "), but the editor keeps on changing them to its equivalent character (> and " for the previous example), then you might want to enable this option.
153 -* Execute shortcodes in snippets - Execute shortcodes in the snippet code before executing the snippet.
154 -* Complete Uninstall - When the plugin is deleted from the Plugins menu, also delete all snippets and plugin settings.
155 -* Support old shortcodes [insert_php] - If you used our plugin from version 1.3.0, then you could use the old shortcodes [insert_php][/insert_php]; from version 2.2.0 we disabled this type of shortcodes by default, as their use is not safe. If you still want to execute your php code via [insert_php][/insert_php] shortcodes, you can enable this option.
156 -#### Code Editor ####
157 -* Code style - The optional feature. You can customize the code style in the snippet editor. The "Default" style is applied by default.
158 -* Indent With Tabs - The optional feature. Whether, when indenting, the first N*tabSize spaces should be replaced by N tabs. The default is false.
159 -* Tab Size - The optional feature. Pressing Tab in the code editor increases left indent to N spaces. N is a number pre-defined by you.
160 -* Indent Unit - The optional feature. The indent for code lines (units). Example: select a snippet, press Tab. The left indent in the selected code increases to N spaces. N is a number pre-defined by you.
161 -* Wrap Lines - The optional feature. If ON, the editor will wrap long lines. Otherwise, it will create a horizontal scroll.
162 -* Line Numbers - The optional feature. If ON, all lines in the editor will be numbered.
163 -* Auto Close Brackets - The optional feature. If ON, the editor will automatically close opened quotes or brackets. Sometimes, it speeds up coding.
164 -* Highlight Selection Matches - The optional feature. If ON, it searches for matches for the selected variable/function name. Highlight matches with green. Improves readability.
165 -#### Geolocation ####
166 -IP geolocation database (Webnet77 or MaxMind) - Select IP geolocation database
167 -
168 -### History, Developers, Credits ###
169 -
170 -If you are a long-term user, you may be confused about the new plugin update. You’ve been using an old plugin – Insert php 1.3.0, and now got an extended product – Woody Code Snippets. Insert php was the first plugin version to work with PHP code. It was created by Will Bontrager Software, LLC. In 2018, the Webcraftic studio started to actively develop the plugin. We’ve created a roadmap and released several powerful updates that help you to use PHP code more comfortable and secure. Now plugin supports not only PHP but other snippet types as well. We’ve decided to rename the plugin as Woody Code Snippets. This name is more suitable for new and powerful plugin features.
171 -
172 -More information about the Insert PHP plugin can be found here:
173 -http://www.willmaster.com/software/WPplugins/go/iphphome_iphplugin
174 -
175 -== Installation ==
176 -
177 -1. Upload the plugin files to the `/wp-content/plugins/plugin-name` directory, or install the plugin through the WordPress plugins screen directly.
178 -2. Activate the plugin through the 'Plugins' screen in WordPress
179 -3. Use the PHP Snippets -> Add snippet, to create a new snippet
180 -
181 -== Frequently Asked Questions ==
182 -
183 -= How to pass attributes to a snippet using a shortcode? =
184 -
185 -Add a new attribute “simple” to the shortcode [wbcr_php_snippet id=”xx” simple=”example”].
186 -The attribute “simple” is available in the snippet as the $simple variable. The attribute name can contain Latin letters and lowercase digits. You can also use underscore.
187 -
188 -= The snippet code executed with an error and I cannot change it, what should I do? =
189 -
190 -Do not despair! Even an experienced person can make mistakes. We created a secure mode for this case. Go into it and your snippets code will not be executed.
191 -
192 -1. Go to the safe mode by this link: http://your-site-name.dev/wp-admin/?wbcr-php-snippets-safe-mode
193 -2. Edit the snippet in which you made a mistake;
194 -3. Leave safe mode by clicking the link: http://your-site-name.dev/wp-admin/?wbcr-php-snippets-disable-safe-mode
195 -
196 -Great, now you should not have any issues!
197 -
198 -= How to pass page content to a snippet? =
199 -
200 -Pretty often we’d like to hide a part of a text or a form on particular pages and set up display conditions. You need to wrap the content you’d like to pass to a snippet with shortcodes [wbcr_php_snippet id=”xx” simple=”example”]page content[/wbcr_php_snippet]. Page content in a snippet is located in the $content variable.
201 -
202 -= Does plugin support Gutenberg editor? =
203 -
204 -Yes, it does. You can add there special blocks from our plugin.
205 -
206 -= I used the old plugin Insert php 1.3.0. What should I expect in 2.x.x version? =
207 -
208 -The old version of Insert php 1.3.0 worked this way: you wrapped PHP code with shortcodes [insert_php]php code[/insert_php]. Starting from version 2.x.x and higher, you need to create special snippets to place PHP code. Use a snippet shortcode [wbcr_php_snippetid=”xx”] instead of shortcodes [insert_php][/insert_php] to execute PHP code on pages.
209 -We recommend you to move all your code from the post editor to snippets.
210 -Important! TinyMCE converts double quotes to special characters. So if you place this code on the snippet editor, it may not work. To avoid this problem, replace all special symbols of double quotes in your PHP code with classic double quotes.
211 -
212 -= How long are you planning to support the old version 1.3.0? =
213 -
214 -60% users have already downloaded 2.x.x version. We are trying to reach the number of 80%. The deadline for support is scheduled for March 1, 2019.
215 -You can download the old plugin version from [here](https://downloads.wordpress.org/plugin/insert-php.1.3.zip).
216 -
217 -= I don’t like the new plugin version. How can I roll back to 1.3.0 and don’t get updates? =
218 -
219 -First of all, please, take some time to actually go through the new version. Usually, it takes a week to see how useful this version may be for you. If you’ve faced any problems or found some bugs, feel free to contact us at our [support forum](http://forum.webcraftic.com).
220 -You can always download the old version (1.3.0) from [here](https://downloads.wordpress.org/plugin/insert-php.1.3.zip).
221 -To avoid getting updates, open the PHP file wp-content/plugins/insert-php/insert_php.php and change the plugin version to 9.9.9.
222 -
223 -= Is there any plugin documentation? =
224 -
225 -You can find the detailed documentation in [here](https://woodysnippet.com/getting-started-with-woody-ad-snippets/).
226 -
227 -= Is plugin compatible with GDPR? =
228 -
229 -Yes, the plugin is fully compatible with GDPR.
230 -
231 -= Can the plugin be completely uninstalled? =
232 -
233 -Go to the settings page and enable the "Complete uninstall" option. Than, when you delete Woody Code Snippets using the ‘Plugins’ menu in WordPress it will clean up the database table and a few other bits of data. Be careful not to remove Woody Code Snippets by deleting it from the Plugins menu unless you want this to happen.
234 -
235 -= How to remove plugin via ftp client? =
236 -
237 -You have to delete the folder with the plugin, which is located here: wp-content/plugins/insert-php
238 -This will not clear the plugin data from the database. You have to remove the plugin through the admin panel with the "Full Uninstall" option enabled in order to completely clear the plugin data.
239 -
240 -= Will I lose my snippets if I change the theme or upgrade WordPress? =
241 -
242 -No, the snippets are stored in the WordPress database and are independent of the theme and unaffected by WordPress upgrades.
243 -
244 -= Does plugin work with multisite? =
245 -
246 -The plugin doesn’t support multi-sites.
247 -We will definitely add multisite support in the future. You can speed up this process by leaving a request on our [support forum](http://forum.webcraftic.com).
248 -
249 -== Screenshots ==
250 -
251 -1. Snippets list
252 -2. Edit php snippet
253 -3. Code revisions
254 -4. Setting up automatic placement of snippets
255 -5. Setting conditional logic to display a snippet
256 -6. Creating a Snippet for Gutenberg Editor
257 -7. Adding a snippet shortcode to a text widget
258 -7. Custom shortcode name
259 -
260 -== Changelog ==
261 -= 2.4.2 =
262 -* Fix: Snippets library not load
263 -* Turn off redirect after activate
264 -
265 -= 2.4.1 =
266 -* Fix: Snippets not working after updating to version 2.4.0, if Woocommerce is activated
267 -
268 -= 2.4.0 =
269 -* Add: Insertion locations for Woocommerce (PRO)
270 -* Add: Snippet conditional execution logic for Woocommerce
271 -* Tweak: Improved performance
272 -* Up the minimum version of PHP -> 7.0
273 -
274 -= 2.3.10 =
275 -* Fixed: Hot fix
276 -
277 -= 2.3.9 =
278 -* Fixed: jQuery.fn.load() and other bugs after update to Wordpress 5.5
279 -
280 -= 2.3.8 =
281 -* Added: "Execute shortcodes in snippets" option in plugin settings. OFF by default!
282 -
283 -= 2.3.7 =
284 -* FIX: WPML compatibility
285 -
286 -= 2.3.6 =
287 -* Add WPML compatibility
288 -* Fix snippet switch
289 -
290 -= 2.3.5 =
291 -* Fixed "Warning: filter_var()". The attributes of the snippets work
292 -
293 -= 2.3.2 =
294 -* Fixed: compatibility with PHP 7.4.
295 -* Added: JS snippets support attributes
296 -* Added: Filter by type of the snippet.
297 -* Added: Priority of snippets execution.
298 -* Added: Sorting by priority.
299 -* Added: Sorting by name.
300 -* Added: New Advertisement snippet type.
301 -* Added: Conditional logic for current page taxonomies
302 -
303 -= 2.3.1 (26.11.2019) =
304 -* Fixed: Bug with images on the about page.
305 -
306 -= 2.3.0 (19.11.2019) =
307 -* Fixed: Minor bugs
308 -* Fixed: Import/Export. When user selected some files and clicked to submit, he could be get error "No files selected!"
309 -* Added: Video preview for every snippets in the library.
310 -
311 -= 2.2.9 (16.09.2019) =
312 -* Fixed: Due to a problem with WPML, we were forced to cancel the added WPML compatibility in the previous version.
313 -* Fixed: Security issue
314 -
315 -= 2.2.8 (13.09.2019) =
316 -* Added: Compatibility with WPML proposed in the support [forum](https://wpml.org/forums/topic/header-and-foster-scripts-translation/)
317 -* Fixed: Security issue
318 -* Fixed: Some users saw the code in the plugin description column. This could lead to JavaScript execution, which led to problems using the plugin [Issue #1](http://forum.webcraftic.com/threads/script-tags-execute-from-description-list.282/), [Issue #2](http://forum.webcraftic.com/threads/insert-php-code-appears-in-description-column.407/#post-1377).
319 -* Fixed: Conditional logic for taxonomies worked only inside singular posts. In taxonomies, tags, and categories, this did not work [Issue #3](http://forum.webcraftic.com/threads/kak-propisat-vyvod-snipeta-na-konkretnoj-stranice.399/)
320 -
321 -= 2.2.7 =
322 -* Fixed: Critical php errors
323 -
324 -= 2.2.6 =
325 -* Fixed: Some issues with plugin security.
326 -* Fixed: After save JS snippets, the html tags in javascript code were cut out in compiled code.
327 -* Fixed: Minor bugs
328 -
329 -= 2.2.5 =
330 -* Fixed: Some issues with plugin security.
331 -* Fixed: When you save the php snippet (running everywhere), there is a conflict with himself.
332 -* Fixed: A notification to install the premium version did not hidden, even if the premium plugin was installed.
333 -* Fixed: Removed spaces in beginning and end of the universal snippets. Please make fix your snippets if you have missing spaces at the beginning and end of the universal snippet.
334 -
335 -= 2.2.4 =
336 -* Fixed: Php error (Cannot declare class Post)
337 -* Fixed: Some hooks did not work, when using php snippet with space to run everywhere.
338 -* Fixed: Slashes removed in css snippet: \f058 becomes f058
339 -
340 -= 2.2.2 =
341 -- Fixed: Disabled wpautop for snippets
342 -- Fixed: Added compatibility with plugin Robin image optimizer
343 -
344 -= 2.2.1 =
345 -- Warning: Support for the old shortcodes ([insert_php]) has been discontinued for new users. Users who have upgraded from version 1.3.0 still have support [insert_php].
346 -- Fixed: Removed warnings about support for old shortcodes for new users.
347 -- Fixed: Сkeditor editor over the code editor, the issue is related to The Rex theme
348 -- Fixed: Warning Invalid argument supplied for foreach(). (It’s the warning in plugin insert-php (method getMetaOption) because get_post_meta could return non-array value if $single is true.)
349 -- Fixed: Some users lost the code editor
350 -- Fixed: Infinite redirect after updating or installing a plugin
351 -- Fixed: Infinite redirect on multisites
352 -- Added: New snippet type: Html. Perfect for you if you do not use php code.
353 -- Added: New snippet type: JavaScript
354 -- Added: New snippet type: Css
355 -- Added: JS and CSS snippets can be asset as external files
356 -- Added: Compatible with Wordpress 5.2
357 -- Added: Multisite support
358 -- Added: Premium plugin support added
359 -- Added: Added setting: "Complete Uninstall". When the plugin is deleted from the Plugins menu, also delete all snippets and plugin settings.- Added: Added setting: "Complete Uninstall". When the plugin is deleted from the Plugins menu, also delete all snippets and plugin settings.
360 -- Added: Added setting: "Support old shortcodes [insert_php]". If you used our plugin from version 1.3.0, then you could use the old shortcodes [insert_php][/insert_php]; from version 2.2.0 we disabled this type of shortcodes by default, as their use is not safe. If you still want to execute your php code via [insert_php][/insert_php] shortcodes, you can enable this option.
361 -- Added: Added setting: "Keep the HTML entities, don't convert to its character". If you want to use an HTML entity in your code (for example > or "), but the editor keeps on changing them to its equivalent character (> and " for the previous example), then you might want to enable this option.
362 -
363 -= 2.1.91 =
364 -- Fixed: some users were redirected to about page an infinite number of times
365 -- Fixed: safe mode did not work, since it could be started only after the snippet
366 -- Added: php lint for code editor
367 -- Added: hook wbcr/factory/bootstrap/cache_enable to disable caching of Woody assets. Some users use cdn, it may be useful to them.
368 -
369 -= 2.1.9 =
370 -- Fixed: demo snippets were created several times, because of which it could bring a headache
371 -- Fixed: it was impossible to hide metaboxing with ads
372 -- Fixed: some users were redirected to about page an infinite number of times
373 -
374 -= 2.1.7 =
375 -- Fixed: Multisite minor bug
376 -
377 -= 2.1.6 =
378 -- Fixed: shortcodes don't work in No Cache Ajax Widgets plugin
379 -- Fixed: in Gutenberg when creating a block, the drop-down list is not saved the state of selected option
380 -- Fixed: menu was not displayed in multisite
381 -- Fixed: fixed php bug with import_upload_size_limit function in multisite
382 -
383 -= 2.1.5 =
384 -- Fixed: It was impossible to change theme style for code editor
385 -- Fixed: After updating plugin, formatting for code editor was destroyed
386 -- Fixed: Safe mode doesn't work for scripts running with shortcode [insert_php]
387 -
388 -= 2.1.4 =
389 -- Fixed: plugin tries to process shortcodes in php code, which causes conflict with do_shortcode
390 -- Fixed: visual composer compatibility added
391 -
392 -= 2.1.3 =
393 -- Fixed: bug with escape html code in snippets editor, if you entered the textarea tag, it could destroy the editor.
394 -
395 -= 2.1.2 =
396 -- Added: 3 new snippet types. You can use PHP, text, and universal snippets.
397 -- Added: Snippet export/import.
398 -- Added: Conditional logic for text and universal plugins. You can show/hide snippets based on certain conditions.
399 -- Added: Gutenberg support. A new unit for Gutenberg has been added. There you can select available snippets. You can also send content from the editor to a snippet.
400 -- Improved: Support of attributes that are sent to snippets through shortcodes. Now you can use shortcode attributes to send additional values inside snippets. You can limit the number of supported attributes.
401 -- Added: WordPress 5.x.x support.
402 -- Improved: The code editor support. Now it has an inbuilt syntax checker and auto-complete.
403 -- Added: TinyMCE rich-text editor for text snippets.
404 -- Added: Snippet auto-placement on all website. You can automatically place the code to head or footer on all pages. Or you can insert the ad code to all posts (check out the documentation to learn more).
405 -- Added: demo snippet auto-creation on plugin installation.
406 -- Added: special feature to uninstall the plugin. If enabled, all snippets and plugin data will be removed along with the plugin.
407 -- Fixed: error in values sent through shortcode attributes.
408 -- Fixed: error in visual unit preview in Gutenberg editor.
409 -- Fixed: snippet counter for tags.
410 -- Changed: plugin name.
411 -- Changed: plugin icons.
412 -- Changed: plugin description.
413 -
414 -= 2.0.6 =
415 -* Changed the way to safely save snippets. Now in case of an error, you will not lose the snippet changes. And also now there is no verification for snippets created for shortcodes, because of what many users had a problem with saving their old code.
416 -* You can get the values of the variables from the shortcode attributes. For example, if you set the my_type attribute for the shortcode [wbcr_php_snippet id="2864" my_type="button"], you can get the value of the my_type attribute in the snippet by calling $my_type var.
417 -* Added feature to set tags for snippets
418 -* Added an instruction on how to export and import your own snippets
419 -* Some bugs fixed.
420 -
421 -= 2.0.4 =
422 -* Fixed critical bug with $wp_query. It was a conflict with some plugins that overwritten the global variable $wp_query.
423 -* All created and updated snippets by default, are now active.
424 -
425 -= 2.0.2 =
426 -Fixed a bug where you do not have enough permissions to view the page.
427 -
428 -= 2.0.1 =
429 -Attention! This new 2.0 plugin version, we added the ability to insert php code using snippets. This is a more convenient and secure way than using shortcodes [insert_php] code execute [/ insert_php]. However, for compatibility reasons, we left support for [insert_php] shortcodes, but we will depreciate them in the next versions of the plugin.
430 -
431 -We strongly recommend you to transfer your php code to snippets and call them in your posts/pages and widgets using [wbcr_php_snippet id = "000"] shortcodes.
432 -
433 -= 1.3 =
434 -Fixed issue with str_replace() when haystack contained a slash character.
435 -
436 -= 1.2 =
437 -Changed handling of content.
438 -
439 -= 1.1 =
440 -Bug fix. Added ob_end_flush(); and changed variable names to remove opportunity for conflict with user-provided PHP code.
441 -
442 -= 1.0 =
443 -First public distribution version.
1 +=== Woody Code Snippets – Insert PHP, CSS, JS, and Header/Footer Scripts ===
2 +Contributors: themeisle
3 +Tags: code snippets, php, insert php, header footer, custom css
4 +Requires at least: 5.6
5 +Tested up to: 7.1
6 +Requires PHP: 7.0
7 +Stable tag: 2.7.7
8 +License: GPLv2 or later
9 +License URI: http://www.gnu.org/licenses/gpl-2.0.html
10 +
11 +Insert PHP, JavaScript, CSS, HTML, ads & tracking code into WordPress headers, footers, pages & content with conditional logic — no theme editing.
12 +
13 +== Description ==
14 +
15 +Woody Code Snippets is a WordPress plugin that helps you insert code into your site without editing theme files.
16 +
17 +Many WordPress users still add PHP, JavaScript, CSS, tracking pixels, or ad scripts directly into functions.php, header.php, or footer.php. This approach breaks easily when themes update and becomes hard to manage as your site grows.
18 +
19 +Woody solves this by giving you a centralized code snippet manager where you can safely add header scripts, footer scripts, PHP snippets, custom CSS, JavaScript, and HTML from the WordPress admin.
20 +
21 +You can use Woody as a header and footer code manager, a PHP snippet plugin, or a way to reuse content and scripts across your site using shortcodes or automatic insertion.
22 +
23 +Each snippet can be enabled or disabled instantly, placed in specific locations like before content or after paragraphs, and shown only when certain conditions are met.
24 +
25 +### Quick Links
26 +
27 +📘 [Documentation](https://docs.themeisle.com/collection/2410-woody-code-snippets) – Complete setup and configuration guide
28 +
29 +💬 [Support Forum](https://wordpress.org/support/plugin/insert-php/) – Community help and expert support
30 +
31 +⭐ [Go Pro](https://woodysnippet.com/upgrade/?utm_source=wordpressorg&utm_medium=readme&utm_campaign=woody_quicklinks) – Unlock advanced features and priority support
32 +
33 +### What Problems Does Woody Solve?
34 +
35 +Woody is built for real WordPress workflows. It helps you:
36 +
37 +- Insert code into headers and footers without editing theme files
38 +- Add analytics scripts, tracking pixels, and ad code safely
39 +- Manage PHP snippets without touching functions.php
40 +- Reuse scripts and content across pages using shortcodes
41 +- Control where code runs using placement rules and conditions
42 +- Enable, disable, or roll back snippets without breaking your site
43 +
44 +Whether you are building client sites, running marketing experiments, or maintaining your own project, Woody gives you control without unnecessary complexity.
45 +
46 +### How It Works
47 +
48 +Woody lets you create code snippets and control where and when they run, all from the WordPress admin.
49 +
50 +#### Example #1 ####
51 +Create a JavaScript snippet and add your analytics or tracking code.
52 +Place it in the site header and add a condition to exclude administrators so your own visits are not tracked.
53 +
54 +#### Example #2 ####
55 +Create a text snippet with reusable content or a shortcode.
56 +Add conditions to show it only to logged-in users, then insert it anywhere using the snippet shortcode or automatic placement rules.
57 +
58 +This makes it easy to manage repeated logic and content without editing theme files.
59 +
60 +### Who Should Use Woody Code Snippets
61 +
62 +Woody is designed for:
63 +
64 +- Developers who want a structured way to manage custom code
65 +- Marketers adding analytics, ads, and tracking scripts
66 +- Solopreneurs who want flexibility without editing theme files
67 +- Agencies managing multiple sites and shared snippets
68 +
69 +If you regularly need to insert code into WordPress, Woody fits naturally into your workflow.
70 +
71 +### Supported Snippet Types
72 +
73 +Woody supports multiple snippet types, so you can manage all custom code in one place. You can create:
74 +
75 +- **PHP snippets** for functions, hooks, classes, and global variables
76 +- **JavaScript snippets** for analytics, integrations, and interactive features
77 +- **CSS snippets** to add custom styles without editing theme files
78 +- **HTML snippets** for markup and layout elements
79 +- **Text snippets** using the WordPress editor for reusable content
80 +- **Ad snippets** for ads and banners
81 +- **Universal snippets** that combine PHP, HTML, CSS, and JavaScript
82 +
83 +### Why do you need this plugin?
84 +
85 +- Insert Google AdSense Ads, Amazon Native Shopping Contextual Ads, Yandex Direct Ads, Media.net on your website.
86 +- Insert Google Analytic Tracking code, Yandex Metrika Tracking Code, Yandex Counter to Header, Footer.
87 +- Insert PHP Code Snippets and execute on your website. Register PHP functions, classes, global variables everywhere.
88 +- Insert Social media widgets, add any external resources widgets.
89 +- Insert Facebook Pixels, Facebook Scripts, Facebook og:image Tag, Google Conversion Pixels, Vk Pixels.
90 +
91 +### Header and Footer Code Management
92 +
93 +Woody works as a full header and footer code manager.
94 +
95 +You can insert snippets:
96 +- Into the site header before the closing </head> tag
97 +- Into the site footer before the closing </body> tag
98 +
99 +Common examples include analytics scripts, tracking pixels, verification tags, and global JavaScript or CSS.
100 +
101 +### Advanced Placement Options
102 +
103 +Beyond headers and footers, Woody lets you insert snippets into specific locations.
104 +
105 +You can place code:
106 +
107 +- Before or after post or page content
108 +- Before or after a specific paragraph
109 +- Before or after a post
110 +- Inside archives, categories, and taxonomy pages
111 +- Between posts on archive pages
112 +
113 +#### WooCommerce Pages
114 +
115 +Woody supports automatic snippet placement on WooCommerce pages.
116 +
117 +You can insert snippets:
118 +
119 +- Before or after the product list
120 +- Before or after a single product
121 +- Before or after the single product summary
122 +- After the product title, price, or excerpt
123 +
124 +Common use cases include conversion tracking, promotional banners, custom JavaScript, and trust notices.
125 +
126 +### Shortcodes and Reusable Content ###
127 +
128 +Woody supports shortcodes so you can insert snippets exactly where you need them. You can place snippets inside posts, pages, widgets, and page builders.
129 +
130 +With [Pro](https://woodysnippet.com/upgrade/?utm_source=wordpressorg&utm_medium=readme&utm_campaign=woody_shortcode), you can define custom shortcode names that are readable and portable across sites.
131 +
132 +### Conditional Logic for Code Snippets
133 +
134 +Woody allows you to control when a snippet is displayed.
135 +
136 +[FREE] Available in the free version:
137 +- User role and registration date
138 +- Page, post type, or taxonomy
139 +- Referrer or cookie value
140 +
141 +[PRO] Advanced conditions available in [Pro](https://woodysnippet.com/upgrade/?utm_source=wordpressorg&utm_medium=readme&utm_campaign=woody_conditions):
142 +- Device type, browser, and operating system
143 +- JavaScript availability or ad blocker detection
144 +- User country, visit depth, time of day, and total visits
145 +
146 +Conditions can be combined using AND and OR logic.
147 +
148 +Unlock advanced conditions with [Woody Pro](https://woodysnippet.com/upgrade/?utm_source=wordpressorg&utm_medium=readme&utm_campaign=woody_conditions).
149 +
150 +### Snippet Management and Organization
151 +
152 +Woody includes features to keep snippets organized and easy to manage.
153 +
154 +You can:
155 +- Enable or disable snippets instantly
156 +- Control execution order using priorities
157 +- Tag and clone snippets
158 +- Import and export snippets between sites
159 +
160 +### Code Revisions and Rollback [PRO] ###
161 +
162 +With [Pro](https://woodysnippet.com/upgrade/?utm_source=wordpressorg&utm_medium=readme&utm_campaign=woody_restore), Woody automatically saves snippet revisions. You can view previous versions, compare changes, and restore earlier revisions if something goes wrong.
163 +
164 +This adds an extra layer of safety when working with custom code.
165 +
166 +### Cloud Templates and Sync [PRO] ###
167 +
168 +[Woody Pro](https://woodysnippet.com/upgrade/?utm_source=wordpressorg&utm_medium=readme&utm_campaign=woody_cloud) includes cloud-based snippet templates.
169 +
170 +You can save snippets as templates and reuse them across multiple sites, which is especially useful for agencies and developers managing repeated setups.
171 +
172 +
173 +### Settings and Developer Options
174 +
175 +Woody includes advanced settings for fine-grained control.
176 +
177 +You can:
178 +
179 +- Preserve HTML entities without automatic conversion
180 +- Execute shortcodes inside snippets
181 +- Enable error email notifications
182 +- Automatically activate snippets on save
183 +- Fully remove plugin data on uninstall
184 +
185 +#### Code Editor
186 +
187 +The built-in editor includes:
188 +- Syntax highlighting and line numbers
189 +- Configurable indentation and tab size
190 +- Optional line wrapping
191 +- Automatic bracket and quote closing
192 +- Highlighting of matching variables and functions
193 +
194 +### Use This Plugin Responsibly ###
195 +
196 +Woody allows you to run custom PHP, JavaScript, and CSS on your site. Always make sure you understand the code you add. Using unverified or outdated scripts may affect site security or stability. On multisite installations, only trusted administrators should have access to snippet creation.
197 +
198 +Woody includes safeguards such as snippet disabling, revisions, and error notifications, but it cannot validate third-party code you choose to run.
199 +
200 +### Support ###
201 +
202 +Need help? Open a new thread in the WordPress [support forum](https://wordpress.org/support/plugin/insert-php/), and we will be happy to assist.
203 +
204 +### Documentation ###
205 +
206 +Learn how to make the most of Woody with our detailed and user-friendly [documentation](https://docs.themeisle.com/collection/2410-woody-code-snippets).
207 +
208 +Woody is backed by [Themeisle](https://themeisle.com/?utm_source=wordpressorg&utm_medium=readme&utm_campaign=woody), trusted by over 1 million WordPress users worldwide.
209 +
210 +== Installation ==
211 +
212 +1. Upload the plugin files to the `/wp-content/plugins/plugin-name` directory, or install the plugin through the WordPress plugins screen directly.
213 +2. Activate the plugin through the 'Plugins' screen in WordPress
214 +3. Use the PHP Snippets -> Add snippet, to create a new snippet
215 +
216 +== Frequently Asked Questions ==
217 +
218 += How to pass attributes to a snippet using a shortcode? =
219 +
220 +Add a new attribute “simple” to the shortcode [wbcr_php_snippet id=”xx” simple=”example”].
221 +The attribute “simple” is available in the snippet as the $simple variable. The attribute name can contain Latin letters and lowercase digits. You can also use underscore.
222 +
223 += The snippet code executed with an error and I cannot change it, what should I do? =
224 +
225 +Don’t worry. Mistakes can happen, even with experienced users. Woody includes a Safe Mode that temporarily disables snippet execution so you can fix the issue.
226 +
227 +1. Go to the safe mode by this link: http://your-site-name.dev/wp-admin/?wbcr-php-snippets-safe-mode
228 +2. Edit the snippet in which you made a mistake;
229 +3. Leave safe mode by clicking the link: http://your-site-name.dev/wp-admin/?wbcr-php-snippets-disable-safe-mode
230 +
231 +Great, now you should not have any issues!
232 +
233 += How to pass page content to a snippet? =
234 +
235 +Pretty often we’d like to hide a part of a text or a form on particular pages and set up display conditions. You need to wrap the content you’d like to pass to a snippet with shortcodes [wbcr_php_snippet id=”xx” simple=”example”]page content[/wbcr_php_snippet]. Page content in a snippet is located in the $content variable.
236 +
237 += Does plugin support Gutenberg editor? =
238 +
239 +Yes, it does. You can add there special blocks from our plugin.
240 +
241 += I used the old plugin Insert php 1.3.0. What should I expect in 2.x.x version? =
242 +
243 +The old version of Insert php 1.3.0 worked this way: you wrapped PHP code with shortcodes [insert_php]php code[/insert_php]. Starting from version 2.x.x and higher, you need to create special snippets to place PHP code. Use a snippet shortcode [wbcr_php_snippetid=”xx”] instead of shortcodes [insert_php][/insert_php] to execute PHP code on pages.
244 +We recommend you to move all your code from the post editor to snippets.
245 +Important! TinyMCE converts double quotes to special characters. So if you place this code on the snippet editor, it may not work. To avoid this problem, replace all special symbols of double quotes in your PHP code with classic double quotes.
246 +
247 += Is there any plugin documentation? =
248 +
249 +You can find the detailed documentation in [here](https://docs.themeisle.com/collection/2410-woody-code-snippets).
250 +
251 += Is plugin compatible with GDPR? =
252 +
253 +Yes, the plugin is fully compatible with GDPR.
254 +
255 += Can the plugin be completely uninstalled? =
256 +
257 +Go to the settings page and enable the "Complete uninstall" option. Than, when you delete Woody Code Snippets using the ‘Plugins’ menu in WordPress it will clean up the database table and a few other bits of data. Be careful not to remove Woody Code Snippets by deleting it from the Plugins menu unless you want this to happen.
258 +
259 += How to remove plugin via ftp client? =
260 +
261 +You have to delete the folder with the plugin, which is located here: wp-content/plugins/insert-php
262 +This will not clear the plugin data from the database. You have to remove the plugin through the admin panel with the "Full Uninstall" option enabled in order to completely clear the plugin data.
263 +
264 += Will I lose my snippets if I change the theme or upgrade WordPress? =
265 +
266 +No, the snippets are stored in the WordPress database and are independent of the theme and unaffected by WordPress upgrades.
267 +
268 += Does plugin work with multisite? =
269 +
270 +The plugin doesn’t support multi-sites setup.
271 +
272 +== Screenshots ==
273 +
274 +1. Manage all snippets from one dashboard
275 +2. Set conditions to control when snippets load
276 +3. Choose the exact location where the code runs
277 +4. Catch code errors before they affect your site
278 +5. Insert snippets directly inside the editor
279 +6. Compare changes and restore previous versions
280 +7. Use custom shortcode names for reusing snippets
281 +
282 +== Changelog ==
283 +
284 +##### Version 2.7.7 (2026-09-14)
285 +
286 +- Improved the plugins reliability with expanded automated testing
287 +- Fixed fatal PHP error details missing from the Safe Mode screen for administrators.
288 +- Fixed PHP shortcodes crashing pages when a stored snippet has invalid PHP.
289 +- Improved the Woody Snippets block setup when no snippets are available.
290 +- Fixed PHP shortcodes that stopped page indexing after a snippet error.
291 +- Fixed Safe Mode to stop all shortcode snippets for administrators.
292 +- Fixed PHP shortcodes that could crash pages after a snippet runtime error.
293 +- Fixed snippet saves that crashed when a function name was already in use.
294 +- Fixed frontend pages stopping when a PHP shortcode snippet has a runtime error.
295 +
296 +
297 +
298 +
299 +##### Version 2.7.6 (2026-07-22)
300 +
301 +- Fixed a PHP warning that could appear in server logs when the plugin checked incoming REST API requests.
302 +- Fixed an issue where a snippet error message could be shown to site visitors instead of only to administrators.
303 +- Updated dependencies
304 +
305 +
306 +
307 +
308 +##### Version 2.7.5 (2026-05-15)
309 +
310 +- Improved compatibility with PHP 8.1
311 +- Added display of actual PHP error message on the snippet error splash page
312 +
313 +
314 +
315 +
316 +##### Version 2.7.4 (2026-04-27)
317 +
318 +- Fixed error caused by dependencies
319 +
320 +
321 +
322 +
323 +##### Version 2.7.3 (2026-04-23)
324 +
325 +- Added an option to disable the Active Snippets notice from the menu
326 +- Fixed issue with tags area is not visible unless you enable/disable it from Screen Options
327 +- Fixed issue with text snippets paragraph formatting when rendered via shortcode
328 +- Fixed issue where Tags and Custom shortcode names are not imported when importing snippets
329 +- Enhanced security
330 +- Updated dependencies
331 +
332 +
333 +
334 +
335 +##### Version 2.7.2 (2026-01-27)
336 +
337 +- This release focuses on improving the security and robustness of snippet type handling in the codebase.
338 +
339 +
340 +
341 +
342 +##### Version 2.7.1 (2026-01-21)
343 +
344 +- Added a compatibility check for the Woody Pro version during activation to prevent fatal errors.
345 +
346 +#### Version 2.7.0 (2026-01-19)
347 +
348 +### New Features
349 +
350 +- Export and clone functionality now available in free version
351 +- Active snippets menu item for better snippet management
352 +- New feature to receive emails during fatal error caused by snippets
353 +- New Improved Plugin UI.
354 +- Non-premium snippets can now be accessed via API
355 +- Use IPHub as Geolocation Tool. [PRO]
356 +
357 +### Enhancements
358 +
359 +- Improved PHP code validation before saving
360 +- Better Location terminology for improved clarity
361 +- Added save hotkey support
362 +- Enhanced snippet labels in library for easier identification
363 +- Improved Add Snippet button UI for better user experience
364 +- Updated license management system (SDK-based approach)
365 +
366 +### Bug Fixes
367 +
368 +- Fixed translation and deprecation errors
369 +- Fixed safe mode functionality
370 +- Fixed location number field not appearing with certain conditions
371 +- Fixed inactive snippets not being exported
372 +- Fixed RTL (right-to-left) issues in toggle controls
373 +- Fixed sync modal not appearing for advert type snippets
374 +- Fixed license message display issues
375 +- Fixed critical error with export logs tool permission checking
376 +- Fixed trashing posts from removing associated metadata
377 +
378 +##### Version 2.6.1 (2025-10-21)
379 +
380 +- fix error with missing asset files
381 +
382 +#### Version 2.6.0 (2025-10-20)
383 +
384 +Woody Snippets plugin has been acquired by Themeisle 🎉
385 +We’re happy to announce that Themeisle is now the new owner of Woody Snippets. This acquisition will help ensure the plugin’s continued development, better support, and exciting new updates in the future.
386 +
387 +Your existing setup will continue to work as usual — no action is required on your part.
388 +
389 +
390 += 2.5.1 =
391 +* Fixed: [insert_php] shortcodes are no longer supported due to the security risk to your site.
392 +* Fixed: Compatibility with Wordpress 6.5
393 +* Fixed: Compatibility with php 8.3
394 +
395 += 2.5.0 =
396 +* Fixed: Compatibility with Wordpress 6.4
397 +* Fixed: Compatibility with php 8.2
398 +
399 += 2.4.10 =
400 +* Minor fixes
401 +* New API for Snippets Library
402 +
403 += 2.4.9 =
404 +* WP 6.2 compatibility
405 +
406 += 2.4.8 =
407 +* Fixed: Reset priority when saving snippet
408 +
409 += 2.4.7 =
410 +* Fixed: Some bugs and issues
411 +
412 += 2.4.6 (31.05.2022) =
413 +* Fixed: Compatibility with Wordpress 6.0
414 +* Fixed: Some bugs and issues
415 +
416 += 2.4.4 (23.03.2022) =
417 +* Fixed: Compatibility with Wordpress 5.9
418 +* Added: Compatibility with premium plugin
419 +
420 += 2.4.4 (23.03.2022) =
421 +* Allow post editors to use snippet shortcodes
422 +* Fixed a bug in TinyMCE
423 +
424 += 2.4.3 =
425 +* Updated plugin framework
426 +* Added warning notice that using the plugin may be dangerous
427 +* Added additional security measures for multisites
428 +
429 += 2.4.2 =
430 +* Fix: Snippets library not load
431 +* Turn off redirect after activate
432 +
433 += 2.4.1 =
434 +* Fix: Snippets not working after updating to version 2.4.0, if Woocommerce is activated
435 +
436 += 2.4.0 =
437 +* Add: Insertion locations for Woocommerce (PRO)
438 +* Add: Snippet conditional execution logic for Woocommerce
439 +* Tweak: Improved performance
440 +* Up the minimum version of PHP -> 7.0
441 +
442 += 2.3.10 =
443 +* Fixed: Hot fix
444 +
445 += 2.3.9 =
446 +* Fixed: jQuery.fn.load() and other bugs after update to Wordpress 5.5
447 +
448 += 2.3.8 =
449 +* Added: "Execute shortcodes in snippets" option in plugin settings. OFF by default!
450 +
451 += 2.3.7 =
452 +* FIX: WPML compatibility
453 +
454 += 2.3.6 =
455 +* Add WPML compatibility
456 +* Fix snippet switch
457 +
458 += 2.3.5 =
459 +* Fixed "Warning: filter_var()". The attributes of the snippets work
460 +
461 += 2.3.2 =
462 +* Fixed: compatibility with PHP 7.4.
463 +* Added: JS snippets support attributes
464 +* Added: Filter by type of the snippet.
465 +* Added: Priority of snippets execution.
466 +* Added: Sorting by priority.
467 +* Added: Sorting by name.
468 +* Added: New Advertisement snippet type.
469 +* Added: Conditional logic for current page taxonomies
470 +
471 += 2.3.1 (26.11.2019) =
472 +* Fixed: Bug with images on the about page.
473 +
474 += 2.3.0 (19.11.2019) =
475 +* Fixed: Minor bugs
476 +* Fixed: Import/Export. When user selected some files and clicked to submit, he could be get error "No files selected!"
477 +* Added: Video preview for every snippets in the library.
478 +
479 += 2.2.9 (16.09.2019) =
480 +* Fixed: Due to a problem with WPML, we were forced to cancel the added WPML compatibility in the previous version.
481 +* Fixed: Security issue
482 +
483 += 2.2.8 (13.09.2019) =
484 +* Added: Compatibility with WPML proposed in the support [forum](https://wpml.org/forums/topic/header-and-foster-scripts-translation/)
485 +* Fixed: Security issue
486 +* Fixed: Some users saw the code in the plugin description column. This could lead to JavaScript execution, which led to problems using the plugin [Issue #1](http://forum.webcraftic.com/threads/script-tags-execute-from-description-list.282/), [Issue #2](http://forum.webcraftic.com/threads/insert-php-code-appears-in-description-column.407/#post-1377).
487 +* Fixed: Conditional logic for taxonomies worked only inside singular posts. In taxonomies, tags, and categories, this did not work [Issue #3](http://forum.webcraftic.com/threads/kak-propisat-vyvod-snipeta-na-konkretnoj-stranice.399/)
488 +
489 += 2.2.7 =
490 +* Fixed: Critical php errors
491 +
492 += 2.2.6 =
493 +* Fixed: Some issues with plugin security.
494 +* Fixed: After save JS snippets, the html tags in javascript code were cut out in compiled code.
495 +* Fixed: Minor bugs
496 +
497 += 2.2.5 =
498 +* Fixed: Some issues with plugin security.
499 +* Fixed: When you save the php snippet (running everywhere), there is a conflict with himself.
500 +* Fixed: A notification to install the premium version did not hidden, even if the premium plugin was installed.
501 +* Fixed: Removed spaces in beginning and end of the universal snippets. Please make fix your snippets if you have missing spaces at the beginning and end of the universal snippet.
502 +
503 += 2.2.4 =
504 +* Fixed: Php error (Cannot declare class Post)
505 +* Fixed: Some hooks did not work, when using php snippet with space to run everywhere.
506 +* Fixed: Slashes removed in css snippet: \f058 becomes f058
507 +
508 += 2.2.2 =
509 +- Fixed: Disabled wpautop for snippets
510 +- Fixed: Added compatibility with plugin Robin image optimizer
511 +
512 += 2.2.1 =
513 +- Warning: Support for the old shortcodes ([insert_php]) has been discontinued for new users. Users who have upgraded from version 1.3.0 still have support [insert_php].
514 +- Fixed: Removed warnings about support for old shortcodes for new users.
515 +- Fixed: Сkeditor editor over the code editor, the issue is related to The Rex theme
516 +- Fixed: Warning Invalid argument supplied for foreach(). (It’s the warning in plugin insert-php (method getMetaOption) because get_post_meta could return non-array value if $single is true.)
517 +- Fixed: Some users lost the code editor
518 +- Fixed: Infinite redirect after updating or installing a plugin
519 +- Fixed: Infinite redirect on multisites
520 +- Added: New snippet type: Html. Perfect for you if you do not use php code.
521 +- Added: New snippet type: JavaScript
522 +- Added: New snippet type: Css
523 +- Added: JS and CSS snippets can be asset as external files
524 +- Added: Compatible with Wordpress 5.2
525 +- Added: Multisite support
526 +- Added: Premium plugin support added
527 +- Added: Added setting: "Complete Uninstall". When the plugin is deleted from the Plugins menu, also delete all snippets and plugin settings.- Added: Added setting: "Complete Uninstall". When the plugin is deleted from the Plugins menu, also delete all snippets and plugin settings.
528 +- Added: Added setting: "Support old shortcodes [insert_php]". If you used our plugin from version 1.3.0, then you could use the old shortcodes [insert_php][/insert_php]; from version 2.2.0 we disabled this type of shortcodes by default, as their use is not safe. If you still want to execute your php code via [insert_php][/insert_php] shortcodes, you can enable this option.
529 +- Added: Added setting: "Keep the HTML entities, don't convert to its character". If you want to use an HTML entity in your code (for example > or "), but the editor keeps on changing them to its equivalent character (> and " for the previous example), then you might want to enable this option.
530 +
531 += 2.1.91 =
532 +- Fixed: some users were redirected to about page an infinite number of times
533 +- Fixed: safe mode did not work, since it could be started only after the snippet
534 +- Added: php lint for code editor
535 +- Added: hook wbcr/factory/bootstrap/cache_enable to disable caching of Woody assets. Some users use cdn, it may be useful to them.
536 +
537 += 2.1.9 =
538 +- Fixed: demo snippets were created several times, because of which it could bring a headache
539 +- Fixed: it was impossible to hide metaboxing with ads
540 +- Fixed: some users were redirected to about page an infinite number of times
541 +
542 += 2.1.7 =
543 +- Fixed: Multisite minor bug
544 +
545 += 2.1.6 =
546 +- Fixed: shortcodes don't work in No Cache Ajax Widgets plugin
547 +- Fixed: in Gutenberg when creating a block, the drop-down list is not saved the state of selected option
548 +- Fixed: menu was not displayed in multisite
549 +- Fixed: fixed php bug with import_upload_size_limit function in multisite
550 +
551 += 2.1.5 =
552 +- Fixed: It was impossible to change theme style for code editor
553 +- Fixed: After updating plugin, formatting for code editor was destroyed
554 +- Fixed: Safe mode doesn't work for scripts running with shortcode [insert_php]
555 +
556 += 2.1.4 =
557 +- Fixed: plugin tries to process shortcodes in php code, which causes conflict with do_shortcode
558 +- Fixed: visual composer compatibility added
559 +
560 += 2.1.3 =
561 +- Fixed: bug with escape html code in snippets editor, if you entered the textarea tag, it could destroy the editor.
562 +
563 += 2.1.2 =
564 +- Added: 3 new snippet types. You can use PHP, text, and universal snippets.
565 +- Added: Snippet export/import.
566 +- Added: Conditional logic for text and universal plugins. You can show/hide snippets based on certain conditions.
567 +- Added: Gutenberg support. A new unit for Gutenberg has been added. There you can select available snippets. You can also send content from the editor to a snippet.
568 +- Improved: Support of attributes that are sent to snippets through shortcodes. Now you can use shortcode attributes to send additional values inside snippets. You can limit the number of supported attributes.
569 +- Added: WordPress 5.x.x support.
570 +- Improved: The code editor support. Now it has an inbuilt syntax checker and auto-complete.
571 +- Added: TinyMCE rich-text editor for text snippets.
572 +- Added: Snippet auto-placement on all website. You can automatically place the code to head or footer on all pages. Or you can insert the ad code to all posts (check out the documentation to learn more).
573 +- Added: demo snippet auto-creation on plugin installation.
574 +- Added: special feature to uninstall the plugin. If enabled, all snippets and plugin data will be removed along with the plugin.
575 +- Fixed: error in values sent through shortcode attributes.
576 +- Fixed: error in visual unit preview in Gutenberg editor.
577 +- Fixed: snippet counter for tags.
578 +- Changed: plugin name.
579 +- Changed: plugin icons.
580 +- Changed: plugin description.
581 +
582 += 2.0.6 =
583 +* Changed the way to safely save snippets. Now in case of an error, you will not lose the snippet changes. And also now there is no verification for snippets created for shortcodes, because of what many users had a problem with saving their old code.
584 +* You can get the values of the variables from the shortcode attributes. For example, if you set the my_type attribute for the shortcode [wbcr_php_snippet id="2864" my_type="button"], you can get the value of the my_type attribute in the snippet by calling $my_type var.
585 +* Added feature to set tags for snippets
586 +* Added an instruction on how to export and import your own snippets
587 +* Some bugs fixed.
588 +
589 += 2.0.4 =
590 +* Fixed critical bug with $wp_query. It was a conflict with some plugins that overwritten the global variable $wp_query.
591 +* All created and updated snippets by default, are now active.
592 +
593 += 2.0.2 =
594 +Fixed a bug where you do not have enough permissions to view the page.
595 +
596 += 2.0.1 =
597 +Attention! This new 2.0 plugin version, we added the ability to insert php code using snippets. This is a more convenient and secure way than using shortcodes [insert_php] code execute [/ insert_php]. However, for compatibility reasons, we left support for [insert_php] shortcodes, but we will depreciate them in the next versions of the plugin.
598 +
599 +We strongly recommend you to transfer your php code to snippets and call them in your posts/pages and widgets using [wbcr_php_snippet id = "000"] shortcodes.
600 +
601 += 1.3 =
602 +Fixed issue with str_replace() when haystack contained a slash character.
603 +
604 += 1.2 =
605 +Changed handling of content.
606 +
607 += 1.1 =
608 +Bug fix. Added ob_end_flush(); and changed variable names to remove opportunity for conflict with user-provided PHP code.
609 +
610 += 1.0 =
611 +First public distribution version.