| @@ -1,181 +1,213 @@ | ||
| 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: 6.0 | |
| 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 | |
| 7 | 6 | Requires PHP: 7.0 |
| 8 | -Stable tag: trunk | |
| 7 | +Stable tag: 2.7.8 | |
| 9 | 8 | License: GPLv2 or later |
| 10 | 9 | License URI: http://www.gnu.org/licenses/gpl-2.0.html |
| 11 | 10 | |
| 12 | -Insert Headers and Footers, executes PHP code, uses conditional logic to insert ads, text, media content and external service’s code. | |
| 11 | +Insert PHP, JavaScript, CSS, HTML, ads & tracking code into WordPress headers, footers, pages & content with conditional logic — no theme editing. | |
| 13 | 12 | |
| 14 | 13 | == Description == |
| 15 | 14 | |
| 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") | |
| 15 | +Woody Code Snippets is a WordPress plugin that helps you insert code into your site without editing theme files. | |
| 19 | 16 | |
| 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! | |
| 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. | |
| 24 | 18 | |
| 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. | |
| 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. | |
| 26 | 20 | |
| 27 | -### Why do you need this plugin? ### | |
| 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. | |
| 28 | 22 | |
| 29 | -- Insert Headers and Footers | |
| 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 | + | |
| 30 | 85 | - Insert Google AdSense Ads, Amazon Native Shopping Contextual Ads, Yandex Direct Ads, Media.net on your website. |
| 31 | 86 | - Insert Google Analytic Tracking code, Yandex Metrika Tracking Code, Yandex Counter to Header, Footer. |
| 32 | 87 | - Insert PHP Code Snippets and execute on your website. Register PHP functions, classes, global variables everywhere. |
| 33 | 88 | - Insert Social media widgets, add any external resources widgets. |
| 34 | 89 | - 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 | 90 | |
| 42 | -### Need premium features? ### | |
| 91 | +### Header and Footer Code Management | |
| 43 | 92 | |
| 44 | -**[Get Premium version](https://woodysnippet.com/pricing/)** | |
| 93 | +Woody works as a full header and footer code manager. | |
| 45 | 94 | |
| 46 | -### How It Works? ### | |
| 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 | |
| 47 | 98 | |
| 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. | |
| 99 | +Common examples include analytics scripts, tracking pixels, verification tags, and global JavaScript or CSS. | |
| 50 | 100 | |
| 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! | |
| 101 | +### Advanced Placement Options | |
| 54 | 102 | |
| 55 | -https://youtu.be/FNoNsl_jy2k | |
| 103 | +Beyond headers and footers, Woody lets you insert snippets into specific locations. | |
| 56 | 104 | |
| 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. | |
| 105 | +You can place code: | |
| 71 | 106 | |
| 72 | -### Where Can You Place a Snippet Automatically? ### | |
| 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 | |
| 73 | 112 | |
| 74 | -**All website:** | |
| 113 | +#### WooCommerce Pages | |
| 75 | 114 | |
| 76 | -**Insert Headers and Footers on all pages:** | |
| 115 | +Woody supports automatic snippet placement on WooCommerce pages. | |
| 77 | 116 | |
| 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. | |
| 117 | +You can insert snippets: | |
| 80 | 118 | |
| 81 | -**Insert to Posts, pages, custom posts:** | |
| 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 | |
| 82 | 123 | |
| 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. | |
| 124 | +Common use cases include conversion tracking, promotional banners, custom JavaScript, and trust notices. | |
| 89 | 125 | |
| 90 | -**Insert to Categories, archives, tags, taxonomy:** | |
| 126 | +### Shortcodes and Reusable Content ### | |
| 91 | 127 | |
| 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. | |
| 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. | |
| 97 | 129 | |
| 98 | -**Insert to Woocommerce pages: [(Premium)](https://woodysnippet.com/pricing/ "Get PRO")** | |
| 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. | |
| 99 | 131 | |
| 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 | |
| 132 | +### Conditional Logic for Code Snippets | |
| 109 | 133 | |
| 110 | -* Insert AdSense After post — snippet is added after a certain post. A post number is listed in the Location number field. | |
| 134 | +Woody allows you to control when a snippet is displayed. | |
| 111 | 135 | |
| 112 | -### What Are Conditional Logic Options to Show a Snippet? ### | |
| 136 | +[FREE] Available in the free version: | |
| 137 | +- User role and registration date | |
| 138 | +- Page, post type, or taxonomy | |
| 139 | +- Referrer or cookie value | |
| 113 | 140 | |
| 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 | |
| 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 | |
| 137 | 145 | |
| 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") | |
| 146 | +Conditions can be combined using AND and OR logic. | |
| 142 | 147 | |
| 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! | |
| 148 | +Unlock advanced conditions with [Woody Pro](https://woodysnippet.com/upgrade/?utm_source=wordpressorg&utm_medium=readme&utm_campaign=woody_conditions). | |
| 145 | 149 | |
| 146 | -1. **[Get starting free support](http://forum.webcraftic.com)** | |
| 147 | -2. **[Documentation](https://woodysnippet.com/getting-started-with-woody-ad-snippets/)** | |
| 150 | +### Snippet Management and Organization | |
| 148 | 151 | |
| 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! | |
| 152 | +Woody includes features to keep snippets organized and easy to manage. | |
| 150 | 153 | |
| 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 | |
| 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 | |
| 167 | 159 | |
| 168 | -### Use this plugin with care! ### | |
| 169 | -ATTENTION! Check your php scripts before inserting on your site. If you don't understand how the php script you are using works, try to avoid using it. Using unverified or outdated php scripts can damage the security of your site! Using the plugin on multisites can be dangerous as it will allow all administrators to insert php, js code. If you cannot control the work of administrators, we recommend that you do not use this plugin for security reasons. We are constantly working to improve the security of the plugin, but unfortunately we cannot check the code scripts you use that may violate the security of your site! | |
| 160 | +### Code Revisions and Rollback [PRO] ### | |
| 170 | 161 | |
| 171 | -### History, Developers, Credits ### | |
| 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. | |
| 172 | 163 | |
| 173 | -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. | |
| 164 | +This adds an extra layer of safety when working with custom code. | |
| 174 | 165 | |
| 175 | -More information about the Insert PHP plugin can be found here: | |
| 176 | -http://www.willmaster.com/software/WPplugins/go/iphphome_iphplugin | |
| 166 | +### Cloud Templates and Sync [PRO] ### | |
| 177 | 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 | + | |
| 178 | 210 | == Installation == |
| 179 | 211 | |
| 180 | 212 | 1. Upload the plugin files to the `/wp-content/plugins/plugin-name` directory, or install the plugin through the WordPress plugins screen directly. |
| 181 | 213 | 2. Activate the plugin through the 'Plugins' screen in WordPress |
| @@ -189,9 +221,9 @@ | ||
| 189 | 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. |
| 190 | 222 | |
| 191 | 223 | = The snippet code executed with an error and I cannot change it, what should I do? = |
| 192 | 224 | |
| 193 | -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. | |
| 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. | |
| 194 | 226 | |
| 195 | 227 | 1. Go to the safe mode by this link: http://your-site-name.dev/wp-admin/?wbcr-php-snippets-safe-mode |
| 196 | 228 | 2. Edit the snippet in which you made a mistake; |
| 197 | 229 | 3. Leave safe mode by clicking the link: http://your-site-name.dev/wp-admin/?wbcr-php-snippets-disable-safe-mode |
| @@ -211,22 +243,11 @@ | ||
| 211 | 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. |
| 212 | 244 | We recommend you to move all your code from the post editor to snippets. |
| 213 | 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. |
| 214 | 246 | |
| 215 | -= How long are you planning to support the old version 1.3.0? = | |
| 216 | - | |
| 217 | -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. | |
| 218 | -You can download the old plugin version from [here](https://downloads.wordpress.org/plugin/insert-php.1.3.zip). | |
| 219 | - | |
| 220 | -= I don’t like the new plugin version. How can I roll back to 1.3.0 and don’t get updates? = | |
| 221 | - | |
| 222 | -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). | |
| 223 | -You can always download the old version (1.3.0) from [here](https://downloads.wordpress.org/plugin/insert-php.1.3.zip). | |
| 224 | -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. | |
| 225 | - | |
| 226 | 247 | = Is there any plugin documentation? = |
| 227 | 248 | |
| 228 | -You can find the detailed documentation in [here](https://woodysnippet.com/getting-started-with-woody-ad-snippets/). | |
| 249 | +You can find the detailed documentation in [here](https://docs.themeisle.com/collection/2410-woody-code-snippets). | |
| 229 | 250 | |
| 230 | 251 | = Is plugin compatible with GDPR? = |
| 231 | 252 | |
| 232 | 253 | Yes, the plugin is fully compatible with GDPR. |
| @@ -245,23 +266,162 @@ | ||
| 245 | 266 | No, the snippets are stored in the WordPress database and are independent of the theme and unaffected by WordPress upgrades. |
| 246 | 267 | |
| 247 | 268 | = Does plugin work with multisite? = |
| 248 | 269 | |
| 249 | -The plugin doesn’t support multi-sites. | |
| 250 | -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). | |
| 270 | +The plugin doesn’t support multi-sites setup. | |
| 251 | 271 | |
| 252 | 272 | == Screenshots == |
| 253 | 273 | |
| 254 | -1. Snippets list | |
| 255 | -2. Edit php snippet | |
| 256 | -3. Code revisions | |
| 257 | -4. Setting up automatic placement of snippets | |
| 258 | -5. Setting conditional logic to display a snippet | |
| 259 | -6. Creating a Snippet for Gutenberg Editor | |
| 260 | -7. Adding a snippet shortcode to a text widget | |
| 261 | -7. Custom shortcode name | |
| 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 | |
| 262 | 281 | |
| 263 | 282 | == Changelog == |
| 283 | + | |
| 284 | +##### Version 2.7.8 (2026-09-29) | |
| 285 | + | |
| 286 | +- Updated dependencies | |
| 287 | +- Added AI agent support: let AI assistants read and change your Woody code snippets and settings. | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | +##### Version 2.7.7 (2026-09-14) | |
| 293 | + | |
| 294 | +- Improved the plugins reliability with expanded automated testing | |
| 295 | +- Fixed fatal PHP error details missing from the Safe Mode screen for administrators. | |
| 296 | +- Fixed PHP shortcodes crashing pages when a stored snippet has invalid PHP. | |
| 297 | +- Improved the Woody Snippets block setup when no snippets are available. | |
| 298 | +- Fixed PHP shortcodes that stopped page indexing after a snippet error. | |
| 299 | +- Fixed Safe Mode to stop all shortcode snippets for administrators. | |
| 300 | +- Fixed PHP shortcodes that could crash pages after a snippet runtime error. | |
| 301 | +- Fixed snippet saves that crashed when a function name was already in use. | |
| 302 | +- Fixed frontend pages stopping when a PHP shortcode snippet has a runtime error. | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | +##### Version 2.7.6 (2026-07-22) | |
| 308 | + | |
| 309 | +- Fixed a PHP warning that could appear in server logs when the plugin checked incoming REST API requests. | |
| 310 | +- Fixed an issue where a snippet error message could be shown to site visitors instead of only to administrators. | |
| 311 | +- Updated dependencies | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | +##### Version 2.7.5 (2026-05-15) | |
| 317 | + | |
| 318 | +- Improved compatibility with PHP 8.1 | |
| 319 | +- Added display of actual PHP error message on the snippet error splash page | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | +##### Version 2.7.4 (2026-04-27) | |
| 325 | + | |
| 326 | +- Fixed error caused by dependencies | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | +##### Version 2.7.3 (2026-04-23) | |
| 332 | + | |
| 333 | +- Added an option to disable the Active Snippets notice from the menu | |
| 334 | +- Fixed issue with tags area is not visible unless you enable/disable it from Screen Options | |
| 335 | +- Fixed issue with text snippets paragraph formatting when rendered via shortcode | |
| 336 | +- Fixed issue where Tags and Custom shortcode names are not imported when importing snippets | |
| 337 | +- Enhanced security | |
| 338 | +- Updated dependencies | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | +##### Version 2.7.2 (2026-01-27) | |
| 344 | + | |
| 345 | +- This release focuses on improving the security and robustness of snippet type handling in the codebase. | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | +##### Version 2.7.1 (2026-01-21) | |
| 351 | + | |
| 352 | +- Added a compatibility check for the Woody Pro version during activation to prevent fatal errors. | |
| 353 | + | |
| 354 | +#### Version 2.7.0 (2026-01-19) | |
| 355 | + | |
| 356 | +### New Features | |
| 357 | + | |
| 358 | +- Export and clone functionality now available in free version | |
| 359 | +- Active snippets menu item for better snippet management | |
| 360 | +- New feature to receive emails during fatal error caused by snippets | |
| 361 | +- New Improved Plugin UI. | |
| 362 | +- Non-premium snippets can now be accessed via API | |
| 363 | +- Use IPHub as Geolocation Tool. [PRO] | |
| 364 | + | |
| 365 | +### Enhancements | |
| 366 | + | |
| 367 | +- Improved PHP code validation before saving | |
| 368 | +- Better Location terminology for improved clarity | |
| 369 | +- Added save hotkey support | |
| 370 | +- Enhanced snippet labels in library for easier identification | |
| 371 | +- Improved Add Snippet button UI for better user experience | |
| 372 | +- Updated license management system (SDK-based approach) | |
| 373 | + | |
| 374 | +### Bug Fixes | |
| 375 | + | |
| 376 | +- Fixed translation and deprecation errors | |
| 377 | +- Fixed safe mode functionality | |
| 378 | +- Fixed location number field not appearing with certain conditions | |
| 379 | +- Fixed inactive snippets not being exported | |
| 380 | +- Fixed RTL (right-to-left) issues in toggle controls | |
| 381 | +- Fixed sync modal not appearing for advert type snippets | |
| 382 | +- Fixed license message display issues | |
| 383 | +- Fixed critical error with export logs tool permission checking | |
| 384 | +- Fixed trashing posts from removing associated metadata | |
| 385 | + | |
| 386 | +##### Version 2.6.1 (2025-10-21) | |
| 387 | + | |
| 388 | +- fix error with missing asset files | |
| 389 | + | |
| 390 | +#### Version 2.6.0 (2025-10-20) | |
| 391 | + | |
| 392 | +Woody Snippets plugin has been acquired by Themeisle 🎉 | |
| 393 | +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. | |
| 394 | + | |
| 395 | +Your existing setup will continue to work as usual — no action is required on your part. | |
| 396 | + | |
| 397 | + | |
| 398 | += 2.5.1 = | |
| 399 | +* Fixed: [insert_php] shortcodes are no longer supported due to the security risk to your site. | |
| 400 | +* Fixed: Compatibility with Wordpress 6.5 | |
| 401 | +* Fixed: Compatibility with php 8.3 | |
| 402 | + | |
| 403 | += 2.5.0 = | |
| 404 | +* Fixed: Compatibility with Wordpress 6.4 | |
| 405 | +* Fixed: Compatibility with php 8.2 | |
| 406 | + | |
| 407 | += 2.4.10 = | |
| 408 | +* Minor fixes | |
| 409 | +* New API for Snippets Library | |
| 410 | + | |
| 411 | += 2.4.9 = | |
| 412 | +* WP 6.2 compatibility | |
| 413 | + | |
| 414 | += 2.4.8 = | |
| 415 | +* Fixed: Reset priority when saving snippet | |
| 416 | + | |
| 417 | += 2.4.7 = | |
| 418 | +* Fixed: Some bugs and issues | |
| 419 | + | |
| 420 | += 2.4.6 (31.05.2022) = | |
| 421 | +* Fixed: Compatibility with Wordpress 6.0 | |
| 422 | +* Fixed: Some bugs and issues | |
| 423 | + | |
| 264 | 424 | = 2.4.4 (23.03.2022) = |
| 265 | 425 | * Fixed: Compatibility with Wordpress 5.9 |
| 266 | 426 | * Added: Compatibility with premium plugin |
| 267 | 427 | |