Plugin Directory

Changeset 3750673


Ignore:
Timestamp:
10/16/2026 03:23:52 PM (3 weeks ago)
Author:
codesnippetspro
Message:

Update Code Snippets listing and screenshots

Location:
code-snippets
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • code-snippets/tags/4.0.0/readme.txt

    r3741857 r3750673  
    22Contributors: bungeshea, ver3, lightbulbman, 0aksmith, johnpixle, carolinaop, tallblokeuk
    33Donate link: https://codesnippets.pro
    4 Tags: code, snippets, multisite, php, css
     4Tags: code, snippets, php, functions, multisite
    55License: GPL-2.0-or-later
    66License URI: license.txt
    … …  
    1010Requires PHP: 7.4
    1111
    12 An easy, clean, and simple way to enhance your site with code snippets.
     12Manage custom WordPress code in one dashboard. Create PHP and HTML snippets, preview code, track snippet totals and reuse code across sites.
    1313
    1414== Description ==
    1515
    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).
     16**Code Snippets** gives you a dedicated WordPress dashboard for creating, organising and managing custom code. Add PHP functionality and reusable HTML content, choose where PHP snippets run, and activate or deactivate snippets individually.
     17
     18Find snippets with search, tags and filters, switch between table and card views, and preview code without opening the editor. Lock important snippets to help prevent accidental changes, and use the Stats overview to see snippet totals and breakdowns.
     19
     20**Want AI-assisted code creation and advanced controls?** [Code Snippets Pro](https://codesnippets.pro/pricing/) adds the AI Agent, snippet revisions, visual display conditions, CSS and JavaScript snippets, and connected Cloud workflows.
     21
     22Your snippets stay separate from your theme files. Browse Community Cloud for shared snippets, and use import and export to reuse your code across sites.
     23
     24Code Snippets has been available on WordPress.org since 2012 and is active on 1 million+ WordPress installations.
     25
     26= Included in the free plugin =
     27
     28* **PHP snippets without editing theme files.** Add custom functions and WordPress hooks from your dashboard.
     29* **Reusable HTML content.** Create content snippets and insert them into posts and pages with shortcodes.
     30* **Control where PHP runs.** Choose everywhere, administration only or front end only. Run-once snippets are available for manually confirmed one-time tasks.
     31* **A built-in code editor.** Work with syntax highlighting, code checking and adjustable editor preferences.
     32* **Organised snippet management.** Use names, descriptions, tags, search, filters, sorting and bulk actions. Browse in table or card view, preview code without opening the editor, and lock important snippets to help prevent accidental edits or deletion.
     33* **Stats overview.** View snippet totals, active and inactive counts, and breakdowns by type, run location and tags.
     34* **Import and export.** Move snippets between sites using export files, or export PHP snippets as a PHP file for use without the plugin.
     35* **Community Cloud browsing.** Search community-shared snippets from inside WordPress and download supported snippet types.
     36* **Optional file-based execution.** Execute supported snippets from generated files instead of evaluating their code from the database.
     37* **Multisite support.** Manage network-wide snippets and separate snippets for individual sites.
     38* **Safe Mode and feedback tools.** Use Safe Mode to troubleshoot snippet-related failures. An optional feedback reporter can be enabled in settings.
     39
     40PHP snippets execute code on your site. Only use code you trust, review it before activation and keep a current backup. Safe Mode helps with recovery; it does not make every snippet safe or guarantee that every error can be prevented.
     41
     42= Watch the Code Snippets 4.0 walkthrough =
     43
     44See the plugin in use, including features from both the free and Pro editions. The Pro features listed below require the relevant Pro access.
     45
     46https://www.youtube.com/watch?v=q-QT9PXw2eQ
     47
     48= Community-powered Code Snippets Cloud =
     49
     50Browse the community-powered [Code Snippets Cloud](https://codesnippets.cloud/) library from inside WordPress. Search user-shared snippets, preview their code and download snippet types supported by your edition.
     51
     52A Cloud account is not required to create and run local PHP and HTML snippets. Personal Cloud library, synchronisation and deployment workflows require a connected account and the relevant Pro access.
     53
     54= Code Snippets Pro =
     55
     56[Code Snippets Pro](https://codesnippets.pro/pricing/) extends the free plugin with additional code types, editing tools and connected workflows:
     57
     58* **CSS and JavaScript snippets**, with dedicated integration for Gutenberg and Elementor.
     59* **AI Agent.** Describe the functionality you need, review and refine a proposed plan, then approve code generation. Review the generated snippets before activating them.
     60* **Snippet revisions.** Compare a previous version with the current code and restore an earlier revision.
     61* **Display conditions.** Define where and when snippets run through a visual condition editor.
     62* **Form-based Blueprints.** Generate PHP code for common tasks such as custom post types, taxonomies, shortcodes, settings pages and extra user profile fields.
     63* **Role-based permissions.** Control access to viewing, creating, editing and deleting snippets.
     64* **Ran on this page.** See which snippets executed or produced output on the current request through the admin bar.
     65* **Performance and security insights.** Optional PHP execution-time tracking and advisory checks for potentially risky code patterns. These checks are not a security audit or a guarantee that code is safe.
     66* **Connected Cloud workflows.** Manage your personal Cloud library, synchronise snippets and deploy snippets to connected sites, with drift reporting when site and Cloud copies differ.
     67
     68Cloud-connected Pro features require the appropriate licence and a connected Code Snippets Cloud account. Local PHP and HTML snippets do not require a Cloud account. The free plugin includes interactive demos of selected Pro workflows; using the full tools requires Pro access.
     69
     70[Compare Free and Pro](https://codesnippets.pro/pricing/)
     71
     72= Documentation and community =
     73
     74* [Documentation](https://codesnippets.pro/docs/)
     75* [WordPress.org support forum](https://wordpress.org/support/plugin/code-snippets/)
     76* [Facebook community](https://www.facebook.com/groups/codesnippetsplugin/)
     77* [Discord community](https://snipco.de/discord)
     78* [Source code and feature requests](https://github.com/codesnippetspro/code-snippets)
     79
     80= Share your experience =
     81
     82Find Code Snippets useful? [Leave a review on WordPress.org](https://wordpress.org/support/plugin/code-snippets/reviews/) to share your experience and help others decide whether the plugin suits their needs.
     83
     84= Translation Credits =
     85
     86Thank you to everyone who helps make Code Snippets available in different languages. See the [translation contributors](https://github.com/codesnippetspro/code-snippets/blob/core/CREDITS.md#translators) or [contribute a translation](https://translate.wordpress.org/projects/wp-plugins/code-snippets/).
    4287
    4388== Installation ==
    … …  
    4590= Automatic Installation =
    4691
    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
     921. Open **Plugins > Add New** and search for **Code Snippets**.
     932. Click **Install Now**, then **Activate**.
     943. Open the **Snippets** menu to add or manage your code.
    5695
    5796= Manual Installation =
    5897
    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.
     981. Download and unzip the plugin.
     992. Upload the `code-snippets` directory to `wp-content/plugins/`.
     1003. Activate **Code Snippets** from the **Plugins** screen.
     101
     102= Multisite Installation =
     103
     104Network activate the plugin to manage network-wide snippets from Network Admin. Individual sites can also have their own snippets. Network snippets must be activated or shared with the appropriate settings; simply creating a network snippet does not make it run everywhere.
    65105
    66106== Frequently Asked Questions ==
    67107
    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.
     108= How can I recover my site if a snippet causes an error? =
     109
     110Use Code Snippets Safe Mode to prevent snippet execution while you investigate the problem. Follow the [Safe Mode instructions](https://codesnippets.pro/doc/safe-mode/) for the appropriate recovery method, then fix or deactivate the affected snippet.
     111
     112= Will I lose my snippets if I change theme or update WordPress? =
     113
     114Snippets are stored separately from your theme in the WordPress database, so changing theme or updating WordPress does not remove them. Code that depends on a particular theme or plugin may still need updating when that dependency changes.
    75115
    76116= 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.
     117
     118Enable **Complete Uninstall** under **Snippets > Settings > Advanced** before deleting the plugin through WordPress's Plugins screen if you want stored snippets and plugin settings removed. Export snippets you want to keep first. Leave Complete Uninstall disabled if you want to retain your snippet data when deleting the plugin.
     119
     120= Can I copy snippets to another site? =
     121
     122Yes. Export a single snippet or select several snippets and use the export bulk action. Import the resulting file through the Snippets import screen on the other site.
     123
     124= Can I export snippets to PHP for a site without Code Snippets? =
     125
     126Yes. Select the PHP snippets, choose **Export to PHP** from the bulk actions and apply it. The generated file contains the exported code, with snippet names and descriptions in comments. Review the file before including it in a theme or plugin.
     127
     128= Can I run snippets across a multisite network? =
     129
     130Yes. Network activation provides a network-level Snippets screen. Activate a network snippet to run it across the network, subject to its execution scope. Individual sites can also have separate snippets, and shared network snippets can be enabled per site where configured.
     131
     132= Where are snippets stored in the database? =
     133
     134Local snippets use the site's table prefix followed by `snippets`, for example `wp_snippets` on a single site or `wp_2_snippets` on a subsite. Network snippets use the network's base prefix followed by `ms_snippets`, for example `wp_ms_snippets`. Your actual prefix may differ.
     135
     136When optional file-based execution is enabled, the plugin also creates files used to execute snippets. Continue managing those snippets through the plugin.
     137
     138= Where can I get help or request a feature? =
     139
     140Use the [documentation](https://codesnippets.pro/docs/) or [WordPress.org support forum](https://wordpress.org/support/plugin/code-snippets/) for help. Report bugs and suggest improvements on [GitHub](https://github.com/codesnippetspro/code-snippets/issues), or discuss ideas in the [Facebook](https://www.facebook.com/groups/codesnippetsplugin/) and [Discord](https://snipco.de/discord) communities.
     141
     142= How can I contribute? =
     143
     144Code Snippets is developed on [GitHub](https://github.com/codesnippetspro/code-snippets). Bug reports, pull requests and [translations](https://translate.wordpress.org/projects/wp-plugins/code-snippets/) are welcome.
     145
     146= How do I report a security issue? =
     147
     148Report suspected security vulnerabilities privately through the [Patchstack Vulnerability Disclosure Program](https://patchstack.com/database/vdp/code-snippets). Do not disclose vulnerability details in a public GitHub issue or support topic.
     149
     150= What is new in Code Snippets 4.0? =
     151
     152The free 4.0 release adds the Stats overview and fixes issues with snippet saving feedback, description truncation, Elementor compatibility and translation loading.
     153
     154The free plugin also includes table and card views, code preview, HTML content snippets and optional file-based execution.
     155
     156Pro 4.0 adds the AI Agent and snippet revisions, alongside its additional code types, conditions, permissions, Blueprints and connected Cloud tools. See the Pro section above for the current feature split.
     157
     158= Can I add HTML, CSS and JavaScript snippets? =
     159
     160The free plugin supports PHP snippets and HTML content snippets. Dedicated CSS and JavaScript snippet types, plus the additional Gutenberg and Elementor integrations, are available in Pro.
     161
     162= Do I need a Cloud account? =
     163
     164No account is required to create and run local PHP and HTML snippets. Community Cloud provides access to shared snippets from within the plugin. Personal Cloud library, synchronisation and connected Pro workflows require an account and the relevant Pro access.
     165
     166= Will I need to recreate my existing snippets after updating? =
     167
     168No. Updating the plugin does not require you to recreate your stored snippets. Back up your site and test your custom code when updating WordPress, your theme or other plugins. Compatibility still depends on the code you use and its dependencies.
     169
     170= Can I switch to an earlier plugin version? =
     171
     172Users with permission to update plugins can open **Snippets > Settings > Advanced** and use **Switch Version** to choose an available version. Use **Refresh Versions** if the list needs updating. Back up your site and export important snippets before switching versions.
    99173
    100174== Screenshots ==
    101175
    102 1. Managing existing snippets
    103 2. Adding a new snippet
    104 3. Editing a snippet
    105 4. Importing snippets from an export file
     1761. Managing local snippets in table view.
     1772. Creating a PHP snippet in the code editor.
     1783. Browsing local snippets in card view.
     1794. Stats overview with snippet totals and breakdowns.
     1805. Browsing Community Cloud snippets, with Pro-only items clearly marked.
     1816. Importing snippet export files with duplicate-handling options.
     182
     183== Upgrade Notice ==
     184
     185= 4.0.0 =
     186Adds the Stats overview and fixes saving feedback, description display, Elementor compatibility and translation notices. Back up your site before updating.
    106187
    107188== Changelog ==
    … …  
    111192__Added__
    112193
    113 * Stats page for viewing snippet totals and various snippet breakdowns.
    114 * AI Agent for building snippets from a description: it proposes a plan you can refine or approve before any code is
    115   written, and can revise the snippets it created. (PRO)
    116 * Snippet revisions, with a history of past versions, a side-by-side diff against the current code, and one-click
    117   restore. (PRO)
    118 * Display conditions for controlling where and when a snippet runs, without writing the checks by hand. (PRO)
    119 * Per-role snippet permissions, so you can decide which roles may view, edit, activate, or delete snippets. (PRO)
    120 * Blueprints for setting up a site from a saved collection of snippets and settings. (PRO)
    121 * Flat file storage, for keeping snippets as files so they can be version-controlled alongside the rest of a site. (PRO)
    122 * "Ran on this page" tracking, showing which snippets actually executed on the page you are viewing. (PRO)
    123 * Natural-language search in Community Cloud, so you can describe what you need instead of guessing keywords. (PRO)
    124 * Snippet deployment from Code Snippets Cloud to connected sites, including deploying several snippets under one shared
    125   display condition. (PRO)
    126 * Installing a cloud bundle onto a connected site as a standalone plugin. (PRO)
    127 * Updating Code Snippets Pro on a connected site from the cloud dashboard. (PRO)
    128 * Drift detection, which reports when a snippet on the site no longer matches the copy stored in the cloud. (PRO)
    129 * New admin interface for managing snippets, with a cleaner layout, faster interactions, and a more consistent
    130   experience across plugin screens. (PRO)
    131 * Card view for browsing snippets, with a view switcher on the snippets table and Community Cloud. (PRO)
    132 * Snippet preview modal for viewing snippet code from the snippets table without opening the editor. (PRO)
    133 * Automatic hiding of unrelated admin notices from other plugins on Code Snippets screens. (PRO)
    134 * Admin bar snippet drawer, based on the Deckerweb Snippets workflow, for quick access to snippets and Safe Mode from
    135   the WordPress admin bar. (PRO)
    136 * Snippet locking to help prevent accidental edits or deletion of important snippets. Props
    137   to https://github.com/mgiannopoulos24. (PRO)
    138 * Improved screen options on the main snippets table, including controls for visible columns and truncating long snippet
    139   names or descriptions. (PRO)
    140 * Bulk actions and bulk code download support in the redesigned snippets table. (PRO)
    141 * Featured snippets and improved browsing in Community Cloud. (PRO)
    142 * WordPress modern theme admin styling compatibility. (PRO)
    143 * Clearer accessibility labels, headings, tab markup, table checkboxes, sort buttons, copy buttons, and drag-and-drop
    144   upload controls. (PRO)
    145 * Feedback reporter for sending bug reports, feature requests and general feedback from the plugin screens, with an
    146   optional summary of the site environment so the team can reproduce the problem. (PRO)
    147 
    148 __Changed__
    149 
    150 * Redesigned the main snippets table with improved search, filtering, sorting, pagination, row actions, and bulk
    151   selection. (PRO)
    152 * Improved the snippet import and migration experience, including clearer file upload handling and third-party plugin
    153   migration flows. (PRO)
    154 * Improved snippet error handling so activation failures, validation errors, and stack traces are easier to understand.
    155   (PRO)
    156 * Improved Community Cloud search and filtering, including server-side filters, better result loading, and clearer empty
    157   states. (PRO)
    158 * Updated the welcome screen, toolbar, import screen, and cloud screens to match the new admin experience. (PRO)
    159 * Updated internal plugin architecture to a cleaner PSR-4 structure for better long-term maintainability. (PRO)
    160 * Improved accessibility across the snippets table, import screen, migration flow, Community Cloud, welcome screen,
    161   toolbar, dialogs, tooltips, and code editor. (PRO)
    162 * Improved colour contrast and reduced-motion support across admin screens. (PRO)
    163 * Faster loading of large code vaults, which are now fetched a page at a time instead of all at once. (PRO)
    164 
    165 __Fixed__
    166 
    167 * Fixed AI conversations from one connected site being visible from another. (PRO)
    168 * Fixed a snippet list stored in Code Snippets Cloud being emptied when the site was temporarily unable to read its own
    169   snippets. (PRO)
    170 * Fixed REST API server error responses on missing snippets. (PRO)
    171 * Fixed redundant frontend logic, improving overall performance. (PRO)
    172 * Fixed Community Cloud search results and pagination to respect WordPress screen options. (PRO)
    173 * Fixed snippet saving and activation feedback to improve validation and runtime error display. (PRO)
    174 * Fixed downloaded Community Cloud snippets appearing as not downloaded after a page reload. (PRO)
    175 * Fixed network snippet lookups using the wrong database table on multisite. (PRO)
    176 * Fixed the inactive snippets count including trashed snippets. (PRO)
    177 * Fixed featured Community Cloud snippets failing to load with some cloud API responses. (PRO)
    178 * Fixed bulk actions in Community Cloud running against an empty selection, so selected snippets were never downloaded.
    179   (PRO)
     194* Stats page for viewing snippet totals and breakdowns by type, run location and tags.
     195* Optional feedback reporter for sending bug reports, feature requests and general feedback from plugin screens.
     196* Interactive demos of the AI Agent, Blueprints and Cloud Library in the free plugin. The full tools require Pro access.
     197* AI Agent for building snippets from a description, with a plan to review and refine before code generation. (PRO)
     198* Snippet revisions, with a history of past versions, a side-by-side comparison and restoration of an earlier revision. (PRO)
     199* Role-based permissions for viewing, creating, editing and deleting snippets. (PRO)
     200* "Ran on this page" tracking for snippets that executed or produced output on the current request. (PRO)
     201* Optional PHP execution-time tracking and advisory checks for potentially risky code patterns. These checks do not certify code as safe. (PRO)
     202* Support for deploying snippets from Code Snippets Cloud to connected sites, including linking multiple snippets to one shared display condition. Requires a connected Cloud account and the appropriate Pro access. (PRO)
     203* Support for Cloud drift detection through site snippet inventory and code hashes. Requires a connected Cloud account and the appropriate Pro access. (PRO)
     204
     205__Fixed__
     206
    180207* Fixed a fatal error in the Elementor editor on Elementor versions older than 3.19.
    181208* Fixed snippet descriptions staying truncated after the "Truncate long snippet names and descriptions" screen option
  • code-snippets/trunk/readme.txt

    r3741856 r3750673  
    22Contributors: bungeshea, ver3, lightbulbman, 0aksmith, johnpixle, carolinaop, tallblokeuk
    33Donate link: https://codesnippets.pro
    4 Tags: code, snippets, multisite, php, css
     4Tags: code, snippets, php, functions, multisite
    55License: GPL-2.0-or-later
    66License URI: license.txt
    … …  
    1010Requires PHP: 7.4
    1111
    12 An easy, clean, and simple way to enhance your site with code snippets.
     12Manage custom WordPress code in one dashboard. Create PHP and HTML snippets, preview code, track snippet totals and reuse code across sites.
    1313
    1414== Description ==
    1515
    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).
     16**Code Snippets** gives you a dedicated WordPress dashboard for creating, organising and managing custom code. Add PHP functionality and reusable HTML content, choose where PHP snippets run, and activate or deactivate snippets individually.
     17
     18Find snippets with search, tags and filters, switch between table and card views, and preview code without opening the editor. Lock important snippets to help prevent accidental changes, and use the Stats overview to see snippet totals and breakdowns.
     19
     20**Want AI-assisted code creation and advanced controls?** [Code Snippets Pro](https://codesnippets.pro/pricing/) adds the AI Agent, snippet revisions, visual display conditions, CSS and JavaScript snippets, and connected Cloud workflows.
     21
     22Your snippets stay separate from your theme files. Browse Community Cloud for shared snippets, and use import and export to reuse your code across sites.
     23
     24Code Snippets has been available on WordPress.org since 2012 and is active on 1 million+ WordPress installations.
     25
     26= Included in the free plugin =
     27
     28* **PHP snippets without editing theme files.** Add custom functions and WordPress hooks from your dashboard.
     29* **Reusable HTML content.** Create content snippets and insert them into posts and pages with shortcodes.
     30* **Control where PHP runs.** Choose everywhere, administration only or front end only. Run-once snippets are available for manually confirmed one-time tasks.
     31* **A built-in code editor.** Work with syntax highlighting, code checking and adjustable editor preferences.
     32* **Organised snippet management.** Use names, descriptions, tags, search, filters, sorting and bulk actions. Browse in table or card view, preview code without opening the editor, and lock important snippets to help prevent accidental edits or deletion.
     33* **Stats overview.** View snippet totals, active and inactive counts, and breakdowns by type, run location and tags.
     34* **Import and export.** Move snippets between sites using export files, or export PHP snippets as a PHP file for use without the plugin.
     35* **Community Cloud browsing.** Search community-shared snippets from inside WordPress and download supported snippet types.
     36* **Optional file-based execution.** Execute supported snippets from generated files instead of evaluating their code from the database.
     37* **Multisite support.** Manage network-wide snippets and separate snippets for individual sites.
     38* **Safe Mode and feedback tools.** Use Safe Mode to troubleshoot snippet-related failures. An optional feedback reporter can be enabled in settings.
     39
     40PHP snippets execute code on your site. Only use code you trust, review it before activation and keep a current backup. Safe Mode helps with recovery; it does not make every snippet safe or guarantee that every error can be prevented.
     41
     42= Watch the Code Snippets 4.0 walkthrough =
     43
     44See the plugin in use, including features from both the free and Pro editions. The Pro features listed below require the relevant Pro access.
     45
     46https://www.youtube.com/watch?v=q-QT9PXw2eQ
     47
     48= Community-powered Code Snippets Cloud =
     49
     50Browse the community-powered [Code Snippets Cloud](https://codesnippets.cloud/) library from inside WordPress. Search user-shared snippets, preview their code and download snippet types supported by your edition.
     51
     52A Cloud account is not required to create and run local PHP and HTML snippets. Personal Cloud library, synchronisation and deployment workflows require a connected account and the relevant Pro access.
     53
     54= Code Snippets Pro =
     55
     56[Code Snippets Pro](https://codesnippets.pro/pricing/) extends the free plugin with additional code types, editing tools and connected workflows:
     57
     58* **CSS and JavaScript snippets**, with dedicated integration for Gutenberg and Elementor.
     59* **AI Agent.** Describe the functionality you need, review and refine a proposed plan, then approve code generation. Review the generated snippets before activating them.
     60* **Snippet revisions.** Compare a previous version with the current code and restore an earlier revision.
     61* **Display conditions.** Define where and when snippets run through a visual condition editor.
     62* **Form-based Blueprints.** Generate PHP code for common tasks such as custom post types, taxonomies, shortcodes, settings pages and extra user profile fields.
     63* **Role-based permissions.** Control access to viewing, creating, editing and deleting snippets.
     64* **Ran on this page.** See which snippets executed or produced output on the current request through the admin bar.
     65* **Performance and security insights.** Optional PHP execution-time tracking and advisory checks for potentially risky code patterns. These checks are not a security audit or a guarantee that code is safe.
     66* **Connected Cloud workflows.** Manage your personal Cloud library, synchronise snippets and deploy snippets to connected sites, with drift reporting when site and Cloud copies differ.
     67
     68Cloud-connected Pro features require the appropriate licence and a connected Code Snippets Cloud account. Local PHP and HTML snippets do not require a Cloud account. The free plugin includes interactive demos of selected Pro workflows; using the full tools requires Pro access.
     69
     70[Compare Free and Pro](https://codesnippets.pro/pricing/)
     71
     72= Documentation and community =
     73
     74* [Documentation](https://codesnippets.pro/docs/)
     75* [WordPress.org support forum](https://wordpress.org/support/plugin/code-snippets/)
     76* [Facebook community](https://www.facebook.com/groups/codesnippetsplugin/)
     77* [Discord community](https://snipco.de/discord)
     78* [Source code and feature requests](https://github.com/codesnippetspro/code-snippets)
     79
     80= Share your experience =
     81
     82Find Code Snippets useful? [Leave a review on WordPress.org](https://wordpress.org/support/plugin/code-snippets/reviews/) to share your experience and help others decide whether the plugin suits their needs.
     83
     84= Translation Credits =
     85
     86Thank you to everyone who helps make Code Snippets available in different languages. See the [translation contributors](https://github.com/codesnippetspro/code-snippets/blob/core/CREDITS.md#translators) or [contribute a translation](https://translate.wordpress.org/projects/wp-plugins/code-snippets/).
    4287
    4388== Installation ==
    … …  
    4590= Automatic Installation =
    4691
    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
     921. Open **Plugins > Add New** and search for **Code Snippets**.
     932. Click **Install Now**, then **Activate**.
     943. Open the **Snippets** menu to add or manage your code.
    5695
    5796= Manual Installation =
    5897
    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.
     981. Download and unzip the plugin.
     992. Upload the `code-snippets` directory to `wp-content/plugins/`.
     1003. Activate **Code Snippets** from the **Plugins** screen.
     101
     102= Multisite Installation =
     103
     104Network activate the plugin to manage network-wide snippets from Network Admin. Individual sites can also have their own snippets. Network snippets must be activated or shared with the appropriate settings; simply creating a network snippet does not make it run everywhere.
    65105
    66106== Frequently Asked Questions ==
    67107
    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.
     108= How can I recover my site if a snippet causes an error? =
     109
     110Use Code Snippets Safe Mode to prevent snippet execution while you investigate the problem. Follow the [Safe Mode instructions](https://codesnippets.pro/doc/safe-mode/) for the appropriate recovery method, then fix or deactivate the affected snippet.
     111
     112= Will I lose my snippets if I change theme or update WordPress? =
     113
     114Snippets are stored separately from your theme in the WordPress database, so changing theme or updating WordPress does not remove them. Code that depends on a particular theme or plugin may still need updating when that dependency changes.
    75115
    76116= 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.
     117
     118Enable **Complete Uninstall** under **Snippets > Settings > Advanced** before deleting the plugin through WordPress's Plugins screen if you want stored snippets and plugin settings removed. Export snippets you want to keep first. Leave Complete Uninstall disabled if you want to retain your snippet data when deleting the plugin.
     119
     120= Can I copy snippets to another site? =
     121
     122Yes. Export a single snippet or select several snippets and use the export bulk action. Import the resulting file through the Snippets import screen on the other site.
     123
     124= Can I export snippets to PHP for a site without Code Snippets? =
     125
     126Yes. Select the PHP snippets, choose **Export to PHP** from the bulk actions and apply it. The generated file contains the exported code, with snippet names and descriptions in comments. Review the file before including it in a theme or plugin.
     127
     128= Can I run snippets across a multisite network? =
     129
     130Yes. Network activation provides a network-level Snippets screen. Activate a network snippet to run it across the network, subject to its execution scope. Individual sites can also have separate snippets, and shared network snippets can be enabled per site where configured.
     131
     132= Where are snippets stored in the database? =
     133
     134Local snippets use the site's table prefix followed by `snippets`, for example `wp_snippets` on a single site or `wp_2_snippets` on a subsite. Network snippets use the network's base prefix followed by `ms_snippets`, for example `wp_ms_snippets`. Your actual prefix may differ.
     135
     136When optional file-based execution is enabled, the plugin also creates files used to execute snippets. Continue managing those snippets through the plugin.
     137
     138= Where can I get help or request a feature? =
     139
     140Use the [documentation](https://codesnippets.pro/docs/) or [WordPress.org support forum](https://wordpress.org/support/plugin/code-snippets/) for help. Report bugs and suggest improvements on [GitHub](https://github.com/codesnippetspro/code-snippets/issues), or discuss ideas in the [Facebook](https://www.facebook.com/groups/codesnippetsplugin/) and [Discord](https://snipco.de/discord) communities.
     141
     142= How can I contribute? =
     143
     144Code Snippets is developed on [GitHub](https://github.com/codesnippetspro/code-snippets). Bug reports, pull requests and [translations](https://translate.wordpress.org/projects/wp-plugins/code-snippets/) are welcome.
     145
     146= How do I report a security issue? =
     147
     148Report suspected security vulnerabilities privately through the [Patchstack Vulnerability Disclosure Program](https://patchstack.com/database/vdp/code-snippets). Do not disclose vulnerability details in a public GitHub issue or support topic.
     149
     150= What is new in Code Snippets 4.0? =
     151
     152The free 4.0 release adds the Stats overview and fixes issues with snippet saving feedback, description truncation, Elementor compatibility and translation loading.
     153
     154The free plugin also includes table and card views, code preview, HTML content snippets and optional file-based execution.
     155
     156Pro 4.0 adds the AI Agent and snippet revisions, alongside its additional code types, conditions, permissions, Blueprints and connected Cloud tools. See the Pro section above for the current feature split.
     157
     158= Can I add HTML, CSS and JavaScript snippets? =
     159
     160The free plugin supports PHP snippets and HTML content snippets. Dedicated CSS and JavaScript snippet types, plus the additional Gutenberg and Elementor integrations, are available in Pro.
     161
     162= Do I need a Cloud account? =
     163
     164No account is required to create and run local PHP and HTML snippets. Community Cloud provides access to shared snippets from within the plugin. Personal Cloud library, synchronisation and connected Pro workflows require an account and the relevant Pro access.
     165
     166= Will I need to recreate my existing snippets after updating? =
     167
     168No. Updating the plugin does not require you to recreate your stored snippets. Back up your site and test your custom code when updating WordPress, your theme or other plugins. Compatibility still depends on the code you use and its dependencies.
     169
     170= Can I switch to an earlier plugin version? =
     171
     172Users with permission to update plugins can open **Snippets > Settings > Advanced** and use **Switch Version** to choose an available version. Use **Refresh Versions** if the list needs updating. Back up your site and export important snippets before switching versions.
    99173
    100174== Screenshots ==
    101175
    102 1. Managing existing snippets
    103 2. Adding a new snippet
    104 3. Editing a snippet
    105 4. Importing snippets from an export file
     1761. Managing local snippets in table view.
     1772. Creating a PHP snippet in the code editor.
     1783. Browsing local snippets in card view.
     1794. Stats overview with snippet totals and breakdowns.
     1805. Browsing Community Cloud snippets, with Pro-only items clearly marked.
     1816. Importing snippet export files with duplicate-handling options.
     182
     183== Upgrade Notice ==
     184
     185= 4.0.0 =
     186Adds the Stats overview and fixes saving feedback, description display, Elementor compatibility and translation notices. Back up your site before updating.
    106187
    107188== Changelog ==
    … …  
    111192__Added__
    112193
    113 * Stats page for viewing snippet totals and various snippet breakdowns.
    114 * AI Agent for building snippets from a description: it proposes a plan you can refine or approve before any code is
    115   written, and can revise the snippets it created. (PRO)
    116 * Snippet revisions, with a history of past versions, a side-by-side diff against the current code, and one-click
    117   restore. (PRO)
    118 * Display conditions for controlling where and when a snippet runs, without writing the checks by hand. (PRO)
    119 * Per-role snippet permissions, so you can decide which roles may view, edit, activate, or delete snippets. (PRO)
    120 * Blueprints for setting up a site from a saved collection of snippets and settings. (PRO)
    121 * Flat file storage, for keeping snippets as files so they can be version-controlled alongside the rest of a site. (PRO)
    122 * "Ran on this page" tracking, showing which snippets actually executed on the page you are viewing. (PRO)
    123 * Natural-language search in Community Cloud, so you can describe what you need instead of guessing keywords. (PRO)
    124 * Snippet deployment from Code Snippets Cloud to connected sites, including deploying several snippets under one shared
    125   display condition. (PRO)
    126 * Installing a cloud bundle onto a connected site as a standalone plugin. (PRO)
    127 * Updating Code Snippets Pro on a connected site from the cloud dashboard. (PRO)
    128 * Drift detection, which reports when a snippet on the site no longer matches the copy stored in the cloud. (PRO)
    129 * New admin interface for managing snippets, with a cleaner layout, faster interactions, and a more consistent
    130   experience across plugin screens. (PRO)
    131 * Card view for browsing snippets, with a view switcher on the snippets table and Community Cloud. (PRO)
    132 * Snippet preview modal for viewing snippet code from the snippets table without opening the editor. (PRO)
    133 * Automatic hiding of unrelated admin notices from other plugins on Code Snippets screens. (PRO)
    134 * Admin bar snippet drawer, based on the Deckerweb Snippets workflow, for quick access to snippets and Safe Mode from
    135   the WordPress admin bar. (PRO)
    136 * Snippet locking to help prevent accidental edits or deletion of important snippets. Props
    137   to https://github.com/mgiannopoulos24. (PRO)
    138 * Improved screen options on the main snippets table, including controls for visible columns and truncating long snippet
    139   names or descriptions. (PRO)
    140 * Bulk actions and bulk code download support in the redesigned snippets table. (PRO)
    141 * Featured snippets and improved browsing in Community Cloud. (PRO)
    142 * WordPress modern theme admin styling compatibility. (PRO)
    143 * Clearer accessibility labels, headings, tab markup, table checkboxes, sort buttons, copy buttons, and drag-and-drop
    144   upload controls. (PRO)
    145 * Feedback reporter for sending bug reports, feature requests and general feedback from the plugin screens, with an
    146   optional summary of the site environment so the team can reproduce the problem. (PRO)
    147 
    148 __Changed__
    149 
    150 * Redesigned the main snippets table with improved search, filtering, sorting, pagination, row actions, and bulk
    151   selection. (PRO)
    152 * Improved the snippet import and migration experience, including clearer file upload handling and third-party plugin
    153   migration flows. (PRO)
    154 * Improved snippet error handling so activation failures, validation errors, and stack traces are easier to understand.
    155   (PRO)
    156 * Improved Community Cloud search and filtering, including server-side filters, better result loading, and clearer empty
    157   states. (PRO)
    158 * Updated the welcome screen, toolbar, import screen, and cloud screens to match the new admin experience. (PRO)
    159 * Updated internal plugin architecture to a cleaner PSR-4 structure for better long-term maintainability. (PRO)
    160 * Improved accessibility across the snippets table, import screen, migration flow, Community Cloud, welcome screen,
    161   toolbar, dialogs, tooltips, and code editor. (PRO)
    162 * Improved colour contrast and reduced-motion support across admin screens. (PRO)
    163 * Faster loading of large code vaults, which are now fetched a page at a time instead of all at once. (PRO)
    164 
    165 __Fixed__
    166 
    167 * Fixed AI conversations from one connected site being visible from another. (PRO)
    168 * Fixed a snippet list stored in Code Snippets Cloud being emptied when the site was temporarily unable to read its own
    169   snippets. (PRO)
    170 * Fixed REST API server error responses on missing snippets. (PRO)
    171 * Fixed redundant frontend logic, improving overall performance. (PRO)
    172 * Fixed Community Cloud search results and pagination to respect WordPress screen options. (PRO)
    173 * Fixed snippet saving and activation feedback to improve validation and runtime error display. (PRO)
    174 * Fixed downloaded Community Cloud snippets appearing as not downloaded after a page reload. (PRO)
    175 * Fixed network snippet lookups using the wrong database table on multisite. (PRO)
    176 * Fixed the inactive snippets count including trashed snippets. (PRO)
    177 * Fixed featured Community Cloud snippets failing to load with some cloud API responses. (PRO)
    178 * Fixed bulk actions in Community Cloud running against an empty selection, so selected snippets were never downloaded.
    179   (PRO)
     194* Stats page for viewing snippet totals and breakdowns by type, run location and tags.
     195* Optional feedback reporter for sending bug reports, feature requests and general feedback from plugin screens.
     196* Interactive demos of the AI Agent, Blueprints and Cloud Library in the free plugin. The full tools require Pro access.
     197* AI Agent for building snippets from a description, with a plan to review and refine before code generation. (PRO)
     198* Snippet revisions, with a history of past versions, a side-by-side comparison and restoration of an earlier revision. (PRO)
     199* Role-based permissions for viewing, creating, editing and deleting snippets. (PRO)
     200* "Ran on this page" tracking for snippets that executed or produced output on the current request. (PRO)
     201* Optional PHP execution-time tracking and advisory checks for potentially risky code patterns. These checks do not certify code as safe. (PRO)
     202* Support for deploying snippets from Code Snippets Cloud to connected sites, including linking multiple snippets to one shared display condition. Requires a connected Cloud account and the appropriate Pro access. (PRO)
     203* Support for Cloud drift detection through site snippet inventory and code hashes. Requires a connected Cloud account and the appropriate Pro access. (PRO)
     204
     205__Fixed__
     206
    180207* Fixed a fatal error in the Elementor editor on Elementor versions older than 3.19.
    181208* Fixed snippet descriptions staying truncated after the "Truncate long snippet names and descriptions" screen option
Note: See TracChangeset for help on using the changeset viewer.