PluginProbe
Code Snippets / 4.0.0-beta.2
Code Snippets v4.0.0-beta.2
4.0.0-beta.2 3.10.2 3.10.1 3.10.0 3.10.0-beta.2 3.10.0-beta.1 4.0.0-beta.1 3.9.6 trunk 2.10.0 2.10.1 2.12.0 2.12.1 2.13.0 2.13.1 2.13.2 2.13.3 2.14.0 2.14.1 2.14.2 2.14.3 2.14.4 2.14.5 2.14.6 3.0.0 All 65 releases
code-snippets / readme.txt

readme.txt in Code Snippets 4.0.0-beta.2, at readme.txt

349 lines 16.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 === Code Snippets ===
2 Contributors: bungeshea, ver3, lightbulbman, 0aksmith, johnpixle, carolinaop, tallblokeuk
3 Donate link: https://codesnippets.pro
4 Tags: code, snippets, multisite, php, css
5 License: GPL-2.0-or-later
6 License URI: license.txt
7 Stable tag: 3.10.2
8 Requires at least: 5.5
9 Tested up to: 7.1
10 Requires PHP: 7.4
11
12 An easy, clean, and simple way to enhance your site with code snippets.
13
14 == Description ==
15
16 **✂ Code Snippets** provides an effortless way to enhance your WordPress site.
17
18 **🚀 Upgrade to Code Snippets Pro** for complete CSS, JavaScript, Gutenberg, Elementor and cloud synchronisation integrations. **[Elevate your snippets experience now!](https://codesnippets.pro/pricing)**
19
20 Say goodbye to the hassle of tweaking your theme's `functions.php` file and downloading endless plugins – Code Snippets simplifies the process!
21
22 A snippet is like a mini-plugin for your WordPress site, providing added functionality without the clutter.
23
24 Unlike other solutions that involve dumping code into your `functions.php` file, Code Snippets offers an intuitive graphical interface for seamless integration and real-time execution. Managing snippets is as easy as activating and deactivating plugins, only without the bloat and overhead.
25
26 **🎥 Watch a quick overview by Imran Siddiq:**
27
28 https://youtu.be/uzND-wdSCMQ
29
30 ☁️ Each copy of Code Snippets includes full integration with the community-powered [Code Snippets Cloud](https://codesnippets.cloud/) platform, providing easy access to hundreds of tweaks and enhancements ready to power-up any WordPress site.
31
32 **🌐 Connect with us:**
33
34 * [Support Forum](https://wordpress.org/support/plugin/code-snippets)
35 * [Facebook Community](https://facebook.com/groups/codesnippetsplugin)
36 * [Discord Community](https://snipco.de/discord)
37 * [GitHub Repository](https://github.com/codesnippetspro/code-snippets)
38
39 🌟 Like our plugin? Find it useful? Please consider sharing your experience by [leaving a review on WordPress.org](https://wordpress.org/support/view/plugin-reviews/code-snippets). Your feedback is instrumental to shaping our future growth!
40
41 🌍 We'd like to thank the wonderful people who have helped contribute translations to allow Code Snippets to be used in different languages. [You can find a full list here](https://github.com/codesnippetspro/code-snippets/blob/core/CREDITS.md#translators).
42
43 == Installation ==
44
45 = Automatic Installation =
46
47 1. Log into your WordPress admin
48 2. Click __Plugins__
49
50 3. Click __Add New__
51
52 4. Search for __Code Snippets__
53
54 5. Click __Install Now__ under "Code Snippets"
55 6. Activate the plugin
56
57 = Manual Installation =
58
59 1. Download the plugin
60 2. Extract the contents of the zip file
61 3. Upload the contents of the zip file to the `wp-content/plugins/` folder of your WordPress installation
62 4. Activate the Code Snippets plugin from 'Plugins' page.
63
64 Network Activating Code Snippets through the Network Dashboard will enable a special interface for running snippets across the entire network.
65
66 == Frequently Asked Questions ==
67
68 A full list of our Frequently Asked Questions can be found at [codesnippets.pro](https://codesnippets.pro/docs/faq/).
69
70 = How can I recover my site if it is crashed by a buggy snippet? =
71 You can recover your site by enabling the Code Snippets safe mode feature. Instructions for how to turn it on are available here: <https://codesnippets.pro/doc/safe-mode/>.
72
73 = Will I lose my snippets if I change the theme or upgrade WordPress? =
74 No, the snippets are stored in the WordPress database, independent of the theme and unaffected by WordPress upgrades.
75
76 = Can the plugin be completely uninstalled? =
77 If you enable the 'Complete Uninstall' option on the plugin settings page, Code Snippets will clean up all of its data when deleted through the WordPress 'Plugins' menu. This includes all stored snippets. If you would like to preserve the snippets, ensure they are exported first.
78
79 = Can I copy snippets that I have created to another WordPress site? =
80 Yes! You can individually export a single snippet using the link below the snippet name on the 'Manage Snippets' page or bulk export multiple snippets using the 'Bulk Actions' feature. Snippets can later be imported using the 'Import Snippets' page by uploading the export file.
81
82 = Can I export my snippets to PHP for a site where I'm not using the Code Snippets plugin? =
83 Yes. Click the checkboxes next to the snippets you want to export, and then choose **Export to PHP** from the Bulk Actions menu and click Apply. The generated PHP file will contain the exported snippets' code, as well as their name and description in comments.
84
85 = Can I run network-wide snippets on a multisite installation? =
86 You can run snippets across an entire multisite network by **Network Activating** Code Snippets through the Network Dashboard. You can also activate Code Snippets just on the main site, and then individually on other sites of your choice.
87
88 = Where are the snippets stored in my WordPress database? =
89 Snippets are stored in the `wp_snippets` table in the WordPress database. The table name may differ depending on what your table prefix is set to.
90
91 = Where can I go for help or suggest new features? =
92 You can get help with Code Snippets, report bugs or errors, and suggest new features and improvements either on the [WordPress Support Forums](https://wordpress.org/support/plugin/code-snippets) or on [GitHub](https://github.com/codesnippetspro/code-snippets).
93
94 = How can I help contribute to the development of the Code Snippets plugin? =
95 The best way to do this is to fork the [repository on GitHub](https://github.com/codesnippetspro/code-snippets) and send a pull request.
96
97 = How can I report security bugs found in this plugin? =
98 You can report security bugs found in the source code of this plugin through the [Patchstack Vulnerability Disclosure Program](https://patchstack.com/database/vdp/code-snippets). The Patchstack team will assist with verification, triage, and notification of security vulnerabilities.
99
100 == Screenshots ==
101
102 1. Managing existing snippets
103 2. Adding a new snippet
104 3. Editing a snippet
105 4. Importing snippets from an export file
106
107 == Changelog ==
108
109 = 3.10.2 (2026-09-01) =
110
111 __Added__
112
113 * Added a confirmation flow for run-once snippet execution and hardened the handler to prevent failed or confusing actions.
114
115 __Changed__
116
117 * Snippet names now respect the row truncation Screen Option in the admin list for better readability.
118 * Version switching AJAX requests now validate the correct nonce, improving reliability when updating snippet versions.
119
120 __Fixed__
121
122 * Fixed safe mode fatal errors caused by an undefined wp_get_current_user() call.
123 * Fixed PHP validation being triggered incorrectly when activating snippets in bulk.
124 * Fixed saving issues after a user session expires.
125 * Fixed warnings caused by aliased field names when reading modified snippet fields.
126 * Fixed vendor autoloader issues by stripping unprefixed namespace references.
127 * Resolved issues where snippet names and version switches could behave inconsistently in the admin UI.
128
129 = 3.10.1 (2026-08-28) =
130
131 __Changed__
132
133 * Enhanced active-link visibility in the toolbar with border-based styling.
134
135 __Fixed__
136
137 * Fixed a fatal error affecting snippets that use a `namespace` or `declare` statement.
138 * Fixed the snippets page rendering blank when another plugin's screen settings filter returned an invalid value.
139 * Fixed snippet saving on hosts that block REST API `PUT` and `PATCH` requests, by sending writes as `POST` with a method override.
140 * Fixed the Snippets List Order setting not being applied to the snippets list.
141 * Fixed admin bar snippet scripts failing to load on the free version, including on the site front end.
142 * Fixed snippet modified dates being sent without the correct UTC offset.
143 * Fixed the row truncation screen option not persisting across sessions.
144 * Fixed inconsistent sidebar label sizes.
145 * Fixed the sticky editor sidebar showing an unwanted horizontal scrollbar.
146
147 = 3.10.0 (2026-08-24) =
148
149 __Added__
150
151 * New admin interface for managing snippets, with a cleaner layout, faster interactions, and a more consistent experience across plugin screens.
152 * Card view for browsing snippets, with a view switcher on the snippets table and Community Cloud.
153 * Snippet preview modal for viewing snippet code from the snippets table without opening the editor.
154 * Automatic hiding of unrelated admin notices from other plugins on Code Snippets screens.
155 * Admin bar snippet drawer, based on the Deckerweb Snippets workflow, for quick access to snippets and Safe Mode from the WordPress admin bar.
156 * Snippet locking to help prevent accidental edits or deletion of important snippets. Props to https://github.com/mgiannopoulos24.
157 * Improved screen options on the main snippets table, including controls for visible columns and truncating long snippet names or descriptions.
158 * Bulk actions and bulk code download support in the redesigned snippets table.
159 * Featured snippets and improved browsing in Community Cloud.
160 * WordPress modern theme admin styling compatibility.
161 * Clearer accessibility labels, headings, tab markup, table checkboxes, sort buttons, copy buttons, and drag-and-drop upload controls.
162
163 __Changed__
164
165 * Redesigned the main snippets table with improved search, filtering, sorting, pagination, row actions, and bulk selection.
166 * Improved the snippet import and migration experience, including clearer file upload handling and third-party plugin migration flows.
167 * Improved snippet error handling so activation failures, validation errors, and stack traces are easier to understand.
168 * Improved Community Cloud search and filtering, including server-side filters, better result loading, and clearer empty states.
169 * Updated the welcome screen, toolbar, import screen, and cloud screens to match the new admin experience.
170 * Updated internal plugin architecture to a cleaner PSR-4 structure for better long-term maintainability.
171 * Improved accessibility across the snippets table, import screen, migration flow, Community Cloud, welcome screen, toolbar, dialogs, tooltips, and code editor.
172 * Improved colour contrast and reduced-motion support across admin screens.
173
174 __Fixed__
175
176 * Fixed REST API server error responses on missing snippets.
177 * Fixed redundant frontend logic, improving overall performance.
178 * Fixed Community Cloud search results and pagination to respect WordPress screen options.
179 * Fixed snippet saving and activation feedback to improve validation and runtime error display.
180 * Fixed downloaded Community Cloud snippets appearing as not downloaded after a page reload.
181 * Fixed network snippet lookups using the wrong database table on multisite.
182 * Fixed the inactive snippets count including trashed snippets.
183 * Fixed featured Community Cloud snippets failing to load with some cloud API responses.
184
185 = 3.9.6 (2026-04-28) =
186
187 __Fixed__
188
189 * Improved permissions handling with snippets REST API.
190 * Site admin cannot toggle shared network snippets status.
191
192 = 3.9.5 (2026-02-05) =
193
194 __Fixed__
195
196 * Improved security when handling actions for downloading and updating cloud snippets.
197
198 = 3.9.4 (2026-01-14) =
199
200 __Added__
201
202 * New import functionality to migrate snippets from file uploads with drag-and-drop interface.
203 * Support for importing snippets from other popular plugins (Header Footer Code Manager, Insert Headers and Footers, Insert PHP Code Snippet).
204 * Enhanced file based execution support with improved multisite mode compatibility.
205
206 __Fixed__
207
208 * Fixed multisite capability checks in Plugin class.
209 * Fixed snippet execution logic for multisite support by centralizing trashed snippet handling.
210 * Fixed multisite snippet handling to ensure local snippets use correct table and filter out trashed snippets.
211
212 = 3.9.3 (2025-12-03) =
213
214 __Added__
215
216 * End-to-end tests to verify the toggle visual state in the snippets list page, improving UI verification and test reliability.
217
218 __Fixed__
219
220 * Restored missing styles styling and direction-aware layout from Manage menu.
221 * Ensure correct transformation value is used when detecting state of activation toggle.
222
223 = 3.9.2 (2025-11-17) =
224
225 __Changed__
226
227 * Introduced a custom scissors icon and updated button title for the TinyMCE extension.
228 * Improved back-navigation styling on the edit page.
229 * Refined layout for column names and action buttons in the Cloud Snippets list.
230 * Enhanced overall styling of cloud-related UI components.
231 * Optimized cloud search with more efficient pagination and snippet retrieval.
232 * Introduced groundwork to prevent Composer dependency collisions with other plugins.
233
234 __Fixed__
235
236 * Improved sanitization and normalization across Cloud API and pagination outputs.
237 * Resolved various TinyMCE issues reported in the WordPress support forum.
238
239 = 3.9.1 (2025-11-14) =
240
241 __Changed__
242
243 * Migrated to native CSS direction handling (RTL/LTR) for improved compatibility and simpler styling
244 * Updated dependencies to the latest compatible versions
245
246 __Fixed__
247
248 * Fixed TinyMCE menu button registration to prevent initialization failure
249 * Fixed the position of the 'code direction' control in the editor
250
251 = 3.9.0 (2025-11-13) =
252
253 __Added__
254
255 * Added contextual notices in the Snippets list table to surface action results and warnings in the UI
256 * Expanded Multisite Sharing settings for clearer control over network-wide snippet sharing
257
258 __Changed__
259
260 * Modernized browser support targets and polished admin UI (clearer row-action badges, improved Pro badge hover, refined active snippet name styling)
261
262 __Fixed__
263
264 * Fixed REST API pagination to return correct results and page counts
265 * Resolved styling selector so the active snippet name highlights reliably
266
267 = 3.8.2 (2025-10-31) =
268
269 __Fixed__
270
271 * Improved namespaced PHP snippet handling with file based execution.
272
273 = 3.8.1 (2025-10-28) =
274
275 __Added__
276
277 * Code line explanation widget with apply and remove actions for AI-generated comments. (PRO)
278
279 __Changed__
280
281 * Improved pagination handling and display structure for cloud search results. (PRO)
282 * Enhanced styling for codevault rows and inactive tabs in cloud interface. (PRO)
283
284 __Removed__
285
286 * Removed `guzzlehttp/guzzle` dependency to reduce package conflicts. (PRO)
287
288 __Fixed__
289
290 * Improved file-based snippet handling for multisite installations.
291
292 = 3.8.0 (2025-10-24) =
293
294 __Added__
295
296 * @CarolinaOP and @louiswol94 join the team as plugin contributors.
297 * File-based execution mode for snippets (Optional in Plugin Settings).
298 * Version switch option, to help easily rollback the plugin to an earlier release.
299 * Minor UI improvements to the editor and sidebar.
300
301 __Changed__
302
303 * Prefixed Composer packages to reduce collisions with other plugins.
304 * Snippets REST API now supports pagination via page and per_page query parameters.
305 * Improved editor preview behavior.
306
307 __Fixed__
308
309 * Fixed issues with snippet evaluation and front-end initialization in edge cases.
310 * Improved reliability of snippet evaluation.
311 * JavaScript and CSS snippets loading twice due to a conditions bug. (PRO)
312 * Fixed issue where some conditions didn’t work due to loading before the loop. (PRO)
313
314 = 3.7.0 (2025-08-29) =
315
316 __Added__
317
318 * New 'conditions' feature: control where and when snippets execute with a powerful logic builder. (PRO)
319
320 __Changed__
321
322 * Redesigned edit menu with refreshed look and functionality.
323 * Updated snippet type badges to be more visually distinct.
324 * Redesigned tooltips used throughout the plugin.
325 * Moved content snippet shortcode options into separate modal window.
326 * Updated snippet tag editor to use built-in WordPress tag editor.
327 * Created proper form for sharing beta feedback.
328 * Improved UX of snippet activation toggle.
329
330 __Fixed__
331
332 * Fetching active snippets on a multisite network now respects the 'priority' field above all else when ordering snippets.
333 * Cloud search appears correctly and allows downloading snippets in the free version of Code Snippets.
334 * Improved performance of loading admin menu icon.
335
336 = 3.6.9 (2025-02-17) =
337
338 __Changed__
339
340 * Updated `Cloud_API::get_bundles()` to properly check bundle data and return an empty array if no valid bundles are present.
341 * Refactored `Cloud_List_Table::fetch_snippets()` to always return a valid `Cloud_Snippets` instance.
342 * Cleaned up bundle iteration code and improved translation handling in the bundles view.
343
344 __Fixed__
345
346 * Fixed errors in bundle iteration by adding a check for the bundles array before iterating.
347
348 **[The full changelog is available on GitHub](https://github.com/codesnippetspro/code-snippets/blob/core/CHANGELOG.md)**
349