PluginProbe
Code Snippets / 3.1.0
Code Snippets v3.1.0
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 3.0.1 All 64 releases
code-snippets / readme.txt

readme.txt in Code Snippets 3.1.0, at readme.txt

305 lines 17.9 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
3 Donate link: https://codesnippets.pro
4 Tags: snippets, functions, multisite, code, php, html, css, javascript
5 License: MIT
6 License URI: license.txt
7 Stable tag: 3.1.0
8 Tested up to: 6.0
9
10 An easy, clean and simple way to run code snippets on your site.
11
12 == Description ==
13
14 Code Snippets is an easy, clean and simple way to run code snippets on your site. It removes the need to add custom snippets to your theme's `functions.php` file.
15
16 A snippet is a small chunk of PHP code that you can use to extend the functionality of a WordPress-powered website; essentially a mini-plugin with less load on your site.
17 Most snippet-hosting sites tell you to add snippet code to your active theme's `functions.php` file, which can get rather long and messy after a while.
18 Code Snippets changes that by providing a GUI interface for adding snippets and **actually running them on your site** just as if they were in your theme's `functions.php` file.
19
20 Code Snippets provides graphical interface, similar to the Plugins menu, for managing snippets. Snippets can be activated and deactivated, just like plugins. The snippet editor includes fields for a name, a visual editor-enabled description, tags to allow you to categorize snippets, and a full-featured code editor. Snippets can be exported for transfer to another site, either in JSON for later importing by the Code Snippets plugin, or in PHP for creating your own plugin or theme.
21
22 If you have any feedback, issues, or suggestions for improvements please leave a topic in the [Support Forum](https://wordpress.org/support/plugin/code-snippets), or [join the community on Facebook](https://facebook.com/groups/codesnippetsplugin).
23
24 If you like this plugin, or it is useful to you in some way, please consider reviewing it on [WordPress.org](https://wordpress.org/support/view/plugin-reviews/code-snippets).
25
26 If you'd like to contribute to the plugin's code or translate it into another language, you can [fork the plugin on GitHub](https://github.com/sheabunge/code-snippets).
27
28 == Translations ==
29
30 Code Snippets can be used in these different languages thanks to the following translators:
31
32 * Belarusian – [Hrank.com](https://www.hrank.com)
33 * Brazilian Portuguese – [Bruno Borges](http://brunoborges.info)
34 * Chinese – [Jincheng Shan](http://shanjincheng.com) and [诗语](https://profiles.wordpress.org/f2010525/)
35 * Chinese (Taiwan) – [Alex Lion](https://www.alexclassroom.com/) and [Chun-Chih Cheng](https://profiles.wordpress.org/alex1114/)
36 * Croatian – [Borisa Djuraskovic from Web Hosting Hub](https://www.webhostinghub.com/)
37 * Czech – [Lukáš Tesař](mailto:lukastesar03@gmail.com) and [Jakub Humpolec](https://profiles.wordpress.org/jumphy/)
38 * Danish – [Finn Sommer Jensen](https://profiles.wordpress.org/finnsommer/)
39 * Dutch – [Sander Spies](https://github.com/sander1), [Peter Smits](https://psmits.com) and [mother.of.code.a11n](https://profiles.wordpress.org/imazed/)
40 * English (New Zealand) and English (UK) – [webaware](https://profiles.wordpress.org/webaware/)
41 * English (South Africa) – [webaware](https://profiles.wordpress.org/webaware/) and [Ian Barnes](https://profiles.wordpress.org/ianbarnes/)
42 * French – [momo-fr](https://www.momofr.net/), [Didier Demory](https://www.wptrads.com/), [Cyrille Sanson](https://100son.net/) and [Shea Bunge](https://sheabunge.com)
43 * French (Canada) – [Dominic Desbiens](https://www.dominicdesbiens.com/)
44 * German – [Mario Siegmann](https://web-alltag.de/), [Joerg Knoerchen](https://www.sensorgrafie.de/), [David Decker](https://deckerweb.de) and [Andreas](https://profiles.wordpress.org/perryzelda/)
45 * Greek – [Konstantinos Megas](https://profiles.wordpress.org/nextdoorpanda/) and [Toni Bishop from Jrop](https://www.jrop.com/)
46 * Indonesian – [Jordan Silaen from ChameleonJohn.com](https://www.chameleonjohn.com/)
47 * Italian – [Usman Wagan](https://coupontoaster.com/), [Luisa Ravelli](https://profiles.wordpress.org/darkavenger/) and [ElectricFeet](https://profiles.wordpress.org/electricfeet/)
48 * Japanese – [mt8](https://mt8.biz/), [Takakazu Nagaya](https://profiles.wordpress.org/tanagaya/), [Naoko Takano](https://naoko.blog/) and [melvas](https://profiles.wordpress.org/melvas/)
49 * Persian – [Mohammad Novintanon](http://mnovintan.ir/)
50 * Russian – [Alexander Samsonov](http://www.wordpressplugins.ru/administration/code-snippets.html), [Yui](https://profiles.wordpress.org/fierevere/), [Denis Yanchevskiy](https://denisco.pro/) and [krioteh](https://profiles.wordpress.org/krioteh/)
51 * Slovak – [Ján Fajčák](https://wp.sk)
52 * Spanish (Colombia) and Spanish (Ecuador) – [Javier Esteban](https://javieresteban.org/)
53 * Spanish (Spain) – [Ibidem Group](https://www.ibidemgroup.com), [Javier Esteban](https://javieresteban.org/), [Fernando Tellado](https://ayudawp.com/) and [Juanma Aranda](https://juanmaaranda.com/)
54 * Spanish (Venezuela) – [Yordan Soares](https://yordansoar.es/)
55 * Swedish – [Argentum](https://profiles.wordpress.org/argentum/), [Fredrik](https://profiles.wordpress.org/elbogen/) and [Tor-Bjorn Fjellner](https://profiles.wordpress.org/tobifjellner/)
56 * Urdu – [Samuel Badree](https://mobilemall.pk/)
57 * Vietnamese – [Tuan Phan](https://profiles.wordpress.org/khunglong/)
58
59 == Installation ==
60
61 = Automatic installation =
62
63 1. Log into your WordPress admin
64 2. Click __Plugins__
65 3. Click __Add New__
66 4. Search for __Code Snippets__
67 5. Click __Install Now__ under "Code Snippets"
68 6. Activate the plugin
69
70 = Manual installation =
71
72 1. Download the plugin
73 2. Extract the contents of the zip file
74 3. Upload the contents of the zip file to the `wp-content/plugins/` folder of your WordPress installation
75 4. Activate the Code Snippets plugin from 'Plugins' page.
76
77 Network Activating Code Snippets through the Network Dashboard will enable a special interface for running snippets across the entire network.
78
79 == Frequently Asked Questions ==
80
81 A full list of our Frequently Asked Questions can be found at [help.codesnippets.pro](https://help.codesnippets.pro/collection/3-faq).
82
83 = How can I recover my site if it is crashed by a buggy snippet? =
84 You can recover your site by enabling the Code Snippets safe mode feature. Instructions for how to turn it on are available here: <https://help.codesnippets.pro/article/12-safe-mode>.
85
86 = Will I lose my snippets if I change the theme or upgrade WordPress? =
87 No, the snippets are stored in the WordPress database, independent of the theme and unaffected by WordPress upgrades.
88
89 = Can the plugin be completely uninstalled? =
90 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.
91
92 = Can I copy snippets that I have created to another WordPress site? =
93 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.
94
95 = Can I export my snippets to PHP for a site where I'm not using the Code Snippets plugin? =
96 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.
97
98 = Can I run network-wide snippets on a multisite installation? =
99 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.
100
101 = Where are the snippets stored in my WordPress database? =
102 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.
103
104 = Where can I go for help or suggest new features? =
105 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/sheabunge/code-snippets)
106
107 = How can I help contribute to the development of the Code Snippets plugin? =
108 The best way to do this is to fork the [repository on GitHub](https://github.com/sheabunge/code-snippets) and send a pull request.
109
110 == Screenshots ==
111
112 1. Managing existing snippets
113 2. Adding a new snippet
114 3. Editing a snippet
115 4. Importing snippets from an export file
116
117 == Changelog ==
118
119 = 3.1.0 (17 May 2022) =
120 * Fixed: Caching inconsistencies preventing snippets and settings from refreshing on sites with persistent object caching.
121 * Improved: Simplified database queries.
122 * Added: More comprehensive cache coverage, including for active snippets.
123 * Added: Icon to 'Go Pro' button indicating it opens an external tab.
124 * Improved: Allow display styles in snippet descriptions.
125
126 = 3.0.1 (14 May 2022) =
127 * Fixed: Incompatibility issue with earlier versions of PHP.
128
129 = 3.0.0 (14 May 2022) =
130
131 __Added__
132
133 * Added: HTML content snippets for displaying as shortcodes or including in the page head or footer area.
134 * Added: Notice reminding users to upgrade unsupported PHP versions.
135 * Added: Visual settings to add attributes to shortcodes.
136 * Added: Shortcode buttons to the post and page content editors.
137 * Added: Basic REST API endpoints.
138 * Added: Snippet type column to the snippets table.
139 * Added: Snippet type badges to Edit and Add New Snippet pages.
140 * Added: Setting to control whether the current line of the code editor is highlighted.
141 * Added: Display a warning when saving a snippet with missing title or code.
142 * Added: Add suffix to title of cloned snippets.
143
144 __Changed__
145
146 * Improved: Updated plugin code to use namespaces, preventing name collisions with other plugins.
147 * Improved: Added key for the 'active' and 'scope' database table columns to speed up queries.
148 * Improved: Redirect from edit menu if not editing a valid snippet.
149 * Improved: Moved activation switch into its own table column.
150 * Improved: Updated code documentation according to WordPress standards.
151 * Improved: Added snippet type labels to the tabs on the Snippets page.
152 * Improved: Split settings page into tabs.
153 * Improved: Use the version of CodeMirror included with WordPress where possible to inherit the additional built-in features.
154 * Improved: Added hover effect to priority settings in the snippets table to show that they are editable.
155 * Fixed: Snippets table layout on smaller screens.
156
157 __Deprecated__
158
159 * Removed: Deprecated functions and compatibility code for unsupported PHP versions.
160 * Removed: Option to disable snippet scopes.
161
162 __New in Pro__
163
164 * Added: CSS style snippets for the site front-end and admin area.
165 * Added: JavaScript snippets for the site head and body area on the front-end.
166 * Added: Browser cache versioning for CSS and JavaScript snippets.
167 * Added: Support for exporting and downloading CSS and JavaScript snippets.
168 * Added: Support for highlighting code on the front-end.
169 * Added: Editor syntax highlighting for CSS, JavaScript and HTML snippets.
170 * Added: Button to preview full file when editing CSS or JavaScript snippets.
171 * Added: Option to minify CSS and JavaScript snippets.
172 * Added: Gutenberg editor block for displaying content snippets.
173 * Added: Gutenberg editor block for displaying snippet source code.
174 * Added: Elementor widget for displaying content snippets.
175 * Added: Elementor widget for displaying snippet source code.
176
177 = 2.14.6 (13 May 2022) =
178 * Fixed: Issue with processing uploaded import files.
179 * Fixed: Issue with processing tag filters.
180
181 = 2.14.5 (10 May 2022) =
182 * Fixed: Incompatibility issue with older versions of PHP.
183
184 = 2.14.4 (5 May 2022) =
185 * Fixed: Prevent array key errors when loading the snippet table with unknown order values.
186
187 = 2.14.3 (10 Dec 2021) =
188 * Fixed: Potential security issue outputting snippets-safe-mode query variable value as-is. Thanks to Krzysztof Zaj�
189 c for reporting.
190
191 = 2.14.2 (9 Sep 2021) =
192 * Fixed: Prevent network snippets table from being created on single-site installs.
193 * Added translations:
194 - Spanish by [Ibidem Group](https://www.ibidemgroup.com)
195 - Urdu by [Samuel Badree](https://mobilemall.pk/)
196 - Greek by [Toni Bishop from Jrop](https://www.jrop.com/)
197 * Added: Support for `:class` syntax to the code validator.
198 * Added: PHP8 support to the code linter.
199 * Added: Color picker feature to the code editor.
200 * Added: Failsafe to prevent multiple versions of Code Snippets from running simultaneously.
201
202 = 2.14.1 (10 Mar 2021) =
203 * Added: Czech translation by [Lukáš Tesař](https://github.com/atomicf4ll).
204 * Fixed: Code validator now supports `function_exists` and `class_exists` checks.
205 * Fixed: Code validator now supports anonymous functions.
206 * Fixed: Issue with saving the hidden columns setting.
207 * Fixed: Replaced the outdated tag-it library with [tagger](https://github.com/jcubic/tagger) for powering the snippet tags editor.
208 * Added: Code direction setting for RTL users.
209 * Updated CodeMirror to version 5.59.4.
210 * Added: Additional action hooks and search API thanks to [@Spreeuw](https://github.com/Spreeuw).
211
212 = 2.14.0 (26 Jan 2020) =
213 * Updated CodeMirror to version 5.50.2.
214 * Added: Basic error checking for duplicate functions and classes.
215 * Updated Italian translations to fix display issues – thanks to [Francesco Marino](https://360fun.net).
216 * Fixed: Ordering snippets in the table by name will now be case-insensitive.
217 * Added: Additional API options for retrieving snippets.
218 * Fixed: Code editor will now properly highlight embedded HTML, CSS and JavaScript code.
219 * Changed the indicator color for inactive snippets from red to grey.
220 * Fixed a bug preventing the editor theme from being set to default.
221 * Added: Store the time and date when each snippet was last modified.
222 * Added: Basic error checking when activating snippets.
223 * Fixed: Ensure that imported snippets are always inactive.
224 * Fixed: Check the referer on the import menu to prevent CSRF attacks. Thanks to [Chloe with the Wordfence Threat Intelligence team](https://www.wordfence.com/blog/author/wfchloe/) for reporting.
225 * Fixed: Ensure that individual snippet action links use proper verification.
226
227 = 2.13.3 (13 Mar 2019) =
228 * Added: Hover effect to activation switches.
229 * Added: Additional save buttons above snippet editor.
230 * Added: List save keyboard shortcuts to the help tooltip.
231 * Added: Change "no items found" message when search filters match nothing.
232 * Fixed: Calling deprecated code in database upgrade process.
233 * Fixed: Include snippet priority in export files.
234 * Fixed: Use Unix newlines in code export file.
235 * Updated CodeMirror to version 5.44.0.
236 * Fixed: Correctly register snippet tables with WordPress to prevent database repair errors [[#](https://wordpress.org/support/topic/database-corrupted-4/)]
237 * Fixed: CodeMirror indentation settings being applied incorrectly
238
239 = 2.13.2 (25 Jan 2019) =
240 * Removed potentially problematic cursor position saving feature
241
242 = 2.13.1 (22 Jan 2019) =
243 * Added: Add menu buttons to settings page for compact menu
244 * Updated: French translation updated thanks to momo-fr
245 * Fixed: Split code editor and tag editor scripts into their own files to prevent dependency errors
246 * Fixed: Handling of single-use shared network snippets
247 * Fixed: Minor translation template issues
248 * Added: Help tooltop to snippet editor for keyboard shortcuts, thanks to Michael DeWitt
249 * Improved: Added button for executing single-use snippets to snippets table
250 * Added: Sample snippet for ordering snippets table by name by default
251 * Updated CodeMirror to version 5.43.0
252
253 = 2.13.0 (17 Dec 2018) =
254 * Added: Search/replace functionality to the snippet editor. [See here for a list of keyboard shortcuts.](https://codemirror.net/demo/search.html) [[#](https://wordpress.org/support/topic/feature-request-codemirror-search-and-replace/)]
255 * Updated CodeMirror to version 5.42.0
256 * Added: Option to make admin menu more compact
257 * Fixed: Problem clearing recently active snippet list
258 * Improved: Integration between plugin and the CodeMirror library, to prevent collisions
259 * Improved: Added additional styles to editor settings preview
260 * Added: PHP linter to code editor
261 * Improved: Use external scripts instead of inline scripts
262 * Fixed: Missing functionality for 'Auto Close Brackets' and 'Highlight Selection Matches' settings
263
264 = 2.12.1 (15 Nov 2018) =
265 * Improved: CodeMirror updated to version 5.41.0
266 * Improved: Attempt to create database columns that might be missing after a table upgrade
267 * Improved: Streamlined upgrade process
268 * Fixed: Interface layout on sites using right-to-left languages
269 * Improved: Made search box appear at top of page on mobile [[#](https://wordpress.org/support/topic/small-modification-for-mobile-ux/)]
270 * Updated screenshots
271
272 = 2.12.0 (23 Sep 2018) =
273 * Fixed: Prevented hidden columns setting from reverting to default
274 * Improved: Updated import page to improve usability
275 * Improved: Added Import button next to page title on manage page
276 * Improved: Added coloured banner indicating whether a snippet is active when editing
277 * Update CodeMirror to 5.40.0
278
279 = 2.11.0 (24 Jul 2018) =
280 * Added: Ability to assign a priority to snippets, to determine the order in which they are executed
281 * Improvement: The editor cursor position will be preserved when saving a snippet
282 * Added: Pressing Ctrl/Cmd + S while writing a snippet will save it
283 * Added: Shadow opening PHP tag above the code editor
284 * Improved: Updated the message shown when there are no snippets
285 * Added: Install sample snippets when the plugin is installed
286 * Improved: Show all available tags when selecting the tag field
287 * Added: Filter hook for controlling the default list table view
288 * Added: Action for cloning snippets
289
290 **[The full changelog is available on GitHub](https://github.com/sheabunge/code-snippets/blob/master/CHANGELOG.md)**
291
292 == Upgrade Notice ==
293
294 = 3.1.0 =
295 Comprehensive persistent object caching support.
296
297 = 2.14.2 =
298 New color picker and code validator improvements.
299
300 = 2.14.0 =
301 Security update, last modified dates, and other improvements.
302
303 = 2.13.1 =
304 Fixes for single-use snippets and French translation.
305