diff --git a/CHANGELOG.md b/CHANGELOG.md index 78b6fd46..72cd866f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## [3.8.1] (2025-10-28) + +### Fixed +* Improved file-based snippet handling for multisite installations. + ## [3.8.0] (2025-10-24) ### Added diff --git a/package-lock.json b/package-lock.json index 0e993b17..20faf68c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "code-snippets", - "version": "3.8.0", + "version": "3.8.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "code-snippets", - "version": "3.8.0", + "version": "3.8.1", "license": "GPL-2.0-or-later", "dependencies": { "@codemirror/fold": "^0.19.4", diff --git a/package.json b/package.json index f29669ba..fa95c3ed 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": "3.8.0", + "version": "3.8.1", "main": "src/dist/edit.js", "directories": { "test": "tests" diff --git a/src/code-snippets.php b/src/code-snippets.php index b1ebb98d..ece61d91 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: 3.8.0 + * Version: 3.8.1 * Requires PHP: 7.4 * Requires at least: 5.0 * - * @version 3.8.0 + * @version 3.8.1 * @package Code_Snippets * @author Shea Bunge * @copyright 2012-2024 Code Snippets Pro @@ -37,7 +37,7 @@ * * @const string */ - define( 'CODE_SNIPPETS_VERSION', '3.8.0' ); + define( 'CODE_SNIPPETS_VERSION', '3.8.1' ); /** * The full path to the main file of this plugin. diff --git a/src/php/flat-files/classes/class-snippet-files.php b/src/php/flat-files/classes/class-snippet-files.php index a1743666..0f28f711 100644 --- a/src/php/flat-files/classes/class-snippet-files.php +++ b/src/php/flat-files/classes/class-snippet-files.php @@ -443,11 +443,10 @@ private function create_snippet_flat_files(): void { $db->set_table_vars(); $site_data = $db->fetch_active_snippets( $scopes ); - foreach ( $site_data as $table_name => $active_snippets ) { - foreach ( $active_snippets as $snippet ) { - $snippet_obj = get_snippet( $snippet['id'], false ); - $this->handle_snippet( $snippet_obj, $table_name ); - } + foreach ( $site_data as $snippet ) { + $table_name = $snippet['table']; + $snippet_obj = get_snippet( $snippet['id'], false ); + $this->handle_snippet( $snippet_obj, $table_name ); } restore_current_blog(); diff --git a/src/readme.txt b/src/readme.txt index 6d75f233..a5643a9d 100644 --- a/src/readme.txt +++ b/src/readme.txt @@ -4,7 +4,7 @@ Donate link: https://codesnippets.pro Tags: code, snippets, multisite, php, css License: GPL-2.0-or-later License URI: license.txt -Stable tag: 3.8.0 +Stable tag: 3.8.1 Tested up to: 6.8.2 An easy, clean and simple way to enhance your site with code snippets. @@ -105,7 +105,11 @@ You can report security bugs found in the source code of this plugin through the == Changelog == += 3.8.1 (2025-10-28) = +__Fixed__ + +* Improved file-based snippet handling for multisite installations. = 3.8.0 (2025-10-24) =