diff --git a/CHANGELOG.md b/CHANGELOG.md index 0808a94a7..00fc826f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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, diff --git a/package-lock.json b/package-lock.json index f657e1b91..374dac049 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "code-snippets", - "version": "4.1.0-beta.2", + "version": "4.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "code-snippets", - "version": "4.1.0-beta.2", + "version": "4.1.0", "license": "GPL-2.0-or-later", "dependencies": { "@codemirror/fold": "^0.19.4", diff --git a/package.json b/package.json index 3d765db5b..ca6423d73 100644 --- a/package.json +++ b/package.json @@ -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" diff --git a/src/code-snippets.php b/src/code-snippets.php index fe39b6476..bff602991 100644 --- a/src/code-snippets.php +++ b/src/code-snippets.php @@ -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 * @copyright 2012-2026 Code Snippets Pro @@ -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. diff --git a/src/css/common/_wp-admin.scss b/src/css/common/_wp-admin.scss index 6e1408f82..374753697 100644 --- a/src/css/common/_wp-admin.scss +++ b/src/css/common/_wp-admin.scss @@ -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); @@ -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); @@ -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; diff --git a/src/js/components/common/Toolbar.tsx b/src/js/components/common/Toolbar.tsx index 3fb3b4dbc..7b08ed788 100644 --- a/src/js/components/common/Toolbar.tsx +++ b/src/js/components/common/Toolbar.tsx @@ -155,7 +155,7 @@ interface SubpageItemProps { const SubpageItem: React.FC = ({ subpage, label, Icon }) => { const { demo, isPro } = SUBPAGE_ENTRIES[subpage] - const isNew = 'announce' === demo && !hasSeenDemo(subpage) + const isNew = 'announce' === demo && shouldShowUpsell() && !hasSeenDemo(subpage) return (
  • diff --git a/src/readme.txt b/src/readme.txt index 1ad02401e..b0ccf5358 100644 --- a/src/readme.txt +++ b/src/readme.txt @@ -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 @@ -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__