Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## [4.1.0] (UPCOMING)
## [4.1.0] (2026-11-05)

### Added
* Universal search in the plugin header, for finding snippets and their code, settings, stats, the welcome screen,
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "code-snippets",
"description": "Manage code snippets running on a WordPress-powered site through a graphical interface.",
"homepage": "https://codesnippets.pro",
"version": "4.1.0-beta.2",
"version": "4.1.0",
"main": "src/dist/edit.js",
"directories": {
"test": "tests"
Expand Down
6 changes: 3 additions & 3 deletions src/code-snippets.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
* License: GPL-2.0-or-later
* License URI: license.txt
* Text Domain: code-snippets
* Version: 4.1.0-beta.2
* Version: 4.1.0
* Requires PHP: 7.4
* Requires at least: 5.5
*
* @version 4.1.0-beta.2
* @version 4.1.0
* @package Code_Snippets
* @author Shea Bunge <shea@codesnippets.pro>
* @copyright 2012-2026 Code Snippets Pro
Expand All @@ -37,7 +37,7 @@
*
* @const string
*/
define( 'CODE_SNIPPETS_VERSION', '4.1.0-beta.2' );
define( 'CODE_SNIPPETS_VERSION', '4.1.0' );

/**
* The full path to the main file of this plugin.
Expand Down
31 changes: 20 additions & 11 deletions src/css/common/_wp-admin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,20 @@ body.wp-admin {
.button:not(.button-primary, .button-link),
.button-secondary,
.page-title-action {
min-block-size: var(--cs-control-height);
padding-block: 0;
padding-inline: 12px;
border-radius: var(--cs-control-radius);
line-height: 2.5715;
font-size: 14px;
font-weight: 400;
background: var(--cs-color-surface-subtle);
border-color: var(--cs-color-accent);
color: var(--cs-color-accent);

&:not(.button-small) {
font-size: 14px;
min-block-size: var(--cs-control-height);
padding-block: 0;
padding-inline: 12px;
line-height: 2.5715;
}

&:hover:not(:disabled) {
background: var(--cs-color-surface-muted);
border-color: var(--cs-color-accent-hover);
Expand All @@ -127,17 +130,20 @@ body.wp-admin {
// matches the secondary rule's specificity so a `.button-small.button-primary`
// keeps the token height instead of collapsing to the 26px small size.
.button-primary:not(.button-link) {
min-block-size: var(--cs-control-height);
padding-block: 0;
padding-inline: 12px;
border-radius: var(--cs-control-radius);
line-height: 2.5715;
font-size: 14px;
font-weight: 700;
background: var(--cs-color-accent);
border-color: var(--cs-color-accent);
color: #fff;

&:not(.button-small) {
min-block-size: var(--cs-control-height);
padding-block: 0;
padding-inline: 12px;
line-height: 2.5715;
font-size: 14px;
}

&:hover:not(:disabled) {
background: var(--cs-color-accent-hover);
border-color: var(--cs-color-accent-hover);
Expand All @@ -153,7 +159,10 @@ body.wp-admin {
}

// Small buttons stay compact rather than inheriting the 40px control height.
.button-small {
.button-small,
.button.button-small,
.button-primary.button-small,
.button-secondary.button-small {
min-block-size: 26px;
line-height: 2.1818;
font-size: 11px;
Expand Down
2 changes: 1 addition & 1 deletion src/js/components/common/Toolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ interface SubpageItemProps {

const SubpageItem: React.FC<SubpageItemProps> = ({ subpage, label, Icon }) => {
const { demo, isPro } = SUBPAGE_ENTRIES[subpage]
const isNew = 'announce' === demo && !hasSeenDemo(subpage)
const isNew = 'announce' === demo && shouldShowUpsell() && !hasSeenDemo(subpage)

return (
<li>
Expand Down
42 changes: 40 additions & 2 deletions src/readme.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
=== Code Snippets ===
Contributors: bungeshea, ver3, lightbulbman, 0aksmith, johnpixle, carolinaop, tallblokeuk
Contributors: bungeshea, ver3, lightbulbman, 0aksmith, johnpixle, ramiy, carolinaop, andreamorgadova, tallblokeuk
Donate link: https://codesnippets.pro
Tags: code, snippets, php, functions, multisite
License: GPL-2.0-or-later
License URI: license.txt
Stable tag: 4.0.0
Stable tag: 4.1.0
Requires at least: 5.5
Tested up to: 7.1
Requires PHP: 7.4
Expand Down Expand Up @@ -182,11 +182,49 @@ Users with permission to update plugins can open **Snippets > Settings > Advance

== Upgrade Notice ==

= 4.1.0 =
Adds universal search; fixes snippet list caching, search method menu,

= 4.0.0 =
Adds the Stats overview and fixes saving feedback, description display, Elementor compatibility and translation notices. Back up your site before updating.

== Changelog ==

= 4.1.0 (2026-11-05) =

__Added__

* Universal search in the plugin header, for finding snippets and their code, settings, stats, the welcome screen,
documentation and Community Cloud snippets from one field, with keyboard navigation and a full results page.
* Labels in the version switcher marking the current, latest, beta and release candidate builds, and the WordPress
version each was tested up to.

__Changed__

* The version switch warning now notes that beta and release candidate builds are not recommended for production sites.
* Resetting caches now fetches the list of available plugin versions again, and reports how many were found or why none
could be listed.

__Fixed__

* Fixed the snippets list showing an out-of-date state on sites with a page cache, as the plugin's REST API responses
were being cached.
* Fixed the Search with AI option missing from the Community Cloud search method menu. (PRO)
* Fixed the share with subsites setting not being applied when a network snippet was saved on multisite.
* Fixed a PHP deprecation notice and a missing browser tab title on the Edit Snippet screen.
* Fixed a long unbroken line of code widening the snippet editor page and pushing the sidebar out of view.
* Fixed admin screens waiting on remote requests for as long as the site's default timeout allows when the Code
Snippets service or WordPress.org is slow or unreachable: these requests now give up after 5 seconds, or 3 seconds
for the welcome content.
* Fixed version switch messages being hidden by the admin notice filter, and showing markup from the response as HTML.
* Fixed the version list refresh reporting success when the versions could not be fetched.
* Fixed safe mode failing on sites running a plugin that builds URLs while WordPress is identifying the current user,
and breaking REST API URLs. Safe mode is now carried on admin links only.
* Fixed the snippet import routes allowing a subsite administrator on multisite to import network snippets without the
network capability. Thanks to Artus KG for responsibly disclosing this issue.
* Fixed the snippet source shortcodes revealing snippet code in posts written by users who cannot manage snippets.
Thanks to Het Kalariya for responsibly disclosing this issue.

= 4.0.0 (2026-10-12) =

__Added__
Expand Down
Loading