Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
67d6d1f
wip: trash feature
louiswol94 Oct 15, 2025
a61cdb8
wip: different bulk actions for trashed items
louiswol94 Oct 15, 2025
2477a42
wip: improve result messages
louiswol94 Oct 15, 2025
cbf1d8f
wip: snippet title should not be a link to edit on trashed page
louiswol94 Oct 15, 2025
1ddd6fc
wip: hide activation switch on trashed page
louiswol94 Oct 15, 2025
1020778
wip: remove background color on trashed pages
louiswol94 Oct 15, 2025
afd294e
wip
louiswol94 Oct 15, 2025
fe2577d
Merge remote-tracking branch 'origin/core/core-beta' into soft-delete
imantsk Oct 16, 2025
156d62b
CR
louiswol94 Oct 21, 2025
ea55759
Merge branch 'soft-delete' of https://github.com/codesnippetspro/code…
louiswol94 Oct 21, 2025
93e66de
wip: snippet files to handle trash action
louiswol94 Oct 21, 2025
cef726a
wip: snippet files to handle trash action
louiswol94 Oct 21, 2025
53ac5ee
wip: add trash undo options
louiswol94 Oct 21, 2025
a104e07
update delete label in bulk actions
louiswol94 Oct 21, 2025
28a1778
wip: update trash label
louiswol94 Oct 21, 2025
b095be4
fix: improve flat files handling on multisite
louiswol94 Oct 27, 2025
0a6b1a7
Merge pull request #261 from codesnippetspro/soft-delete
imantsk Oct 31, 2025
1f5a230
fix: raise ecma version from 2018 to 2022
ramiy Nov 3, 2025
8259481
fix: use logical properties
ramiy Nov 3, 2025
6f0fd9e
chore(release): update changelog for v3.9.0-beta.1
code-snippets-bot Nov 3, 2025
2d1c1df
chore(release): update readme for v3.9.0-beta.1
code-snippets-bot Nov 3, 2025
5bc254c
chore(release): bump version to v3.9.0-beta.1
code-snippets-bot Nov 3, 2025
5b8d4af
Merge pull request #282 from codesnippetspro/fix/ecma-version
code-snippets-bot Nov 3, 2025
065a445
Merge pull request #283 from codesnippetspro/fix/logical-properties
code-snippets-bot Nov 3, 2025
0029afa
Merge branch 'core/core-beta' into core/tag/v3.9.0-beta.1
imantsk Nov 3, 2025
cbbc9f7
fix: use logical properties
ramiy Nov 3, 2025
65ce92f
Merge pull request #285 from codesnippetspro/fix/logical-properties-fix
ramiy Nov 3, 2025
888c2d2
fix: changelog
imantsk Nov 3, 2025
d0de15f
fix: verison nr
imantsk Nov 3, 2025
c566ced
Merge pull request #284 from codesnippetspro/tag/v3.9.0-beta.1
code-snippets-bot Nov 3, 2025
e21fc92
fix: use consistent media queries
ramiy Nov 3, 2025
bb5a5b2
Update Browsers Support
ramiy Nov 4, 2025
278af8a
fix: tooltip usage and styling
imantsk Nov 4, 2025
cb5ca1f
Organize lint scripts
ramiy Nov 4, 2025
9fd8531
fix: update checkbox checked state logic in MultisiteSharingSettings
imantsk Nov 4, 2025
95d81b2
fix: include shared_network in mapToSchema for snippet API
imantsk Nov 4, 2025
675bd45
fix: merge shared network snippets in get_items method
imantsk Nov 4, 2025
807e3bd
fix: update shared network snippet handling and styling in List_Table…
imantsk Nov 4, 2025
d0effba
fix: Update _badges.scss
imantsk Nov 5, 2025
7908f8b
fix: cache issues on settings page
louiswol94 Nov 5, 2025
e30a6fd
Update settings.php
louiswol94 Nov 5, 2025
9a0f70c
Apply suggestion from @louiswol94
ramiy Nov 5, 2025
78b15c9
naming convention
ramiy Nov 6, 2025
f033f1d
fix: revert line-height in badge styles
imantsk Nov 6, 2025
0f5aac5
fix: file based snippets do not handle fatal errors
louiswol94 Nov 6, 2025
1f9416c
Merge pull request #291 from codesnippetspro/louiswol94-patch-2
louiswol94 Nov 6, 2025
60a68db
fix: correct network condition check and streamline snippet fetching
imantsk Nov 6, 2025
75b89fe
fix: indentation
imantsk Nov 6, 2025
e405b7a
chore: composer upgrade
imantsk Nov 6, 2025
7bc08c5
fix: add support for shared network snippets and improve status labels
imantsk Nov 6, 2025
435c455
feat: update badge styles for network snippets and adjust color in ro…
imantsk Nov 6, 2025
2e4a11a
feat: add network snippets management capabilities and subsite menu c…
imantsk Nov 6, 2025
ef94d56
feat: add "Snippets" row action to the Network Sites table
imantsk Nov 7, 2025
6da6687
fix: improve snippet name visibility for network users
imantsk Nov 7, 2025
3e0feeb
fix: enhance badge styles for row actions and improve pro badge hover…
imantsk Nov 7, 2025
305b858
fix: update selector for active snippet name styling
imantsk Nov 7, 2025
2d3dac6
Merge pull request #286 from codesnippetspro/fix/media-queries
ramiy Nov 9, 2025
93fff7d
Merge pull request #288 from codesnippetspro/lint
ramiy Nov 9, 2025
042ddd1
Update Browsers Support
ramiy Nov 9, 2025
6020f8f
Merge pull request #290 from codesnippetspro/louiswol94-patch-1
imantsk Nov 10, 2025
88cf042
Merge branch 'core/core-beta' into fix/share-with-subsites
imantsk Nov 10, 2025
1a89a7f
Merge pull request #289 from codesnippetspro/fix/share-with-subsites
imantsk Nov 10, 2025
6c1ba6a
chore(release): update changelog for v3.9.0-beta.2
code-snippets-bot Nov 10, 2025
eac464f
chore(release): update readme for v3.9.0-beta.2
code-snippets-bot Nov 10, 2025
6489830
chore(release): bump version to v3.9.0-beta.2
code-snippets-bot Nov 10, 2025
272a061
fix: changelog
code-snippets-bot Nov 10, 2025
3edd120
fix: changelog
code-snippets-bot Nov 10, 2025
087881c
fix: changelog
code-snippets-bot Nov 10, 2025
7c8a083
Merge pull request #293 from codesnippetspro/tag/v3.9.0-beta.2
code-snippets-bot Nov 10, 2025
6ca0be0
fix: pagination in rest api
louiswol94 Nov 11, 2025
1554996
Merge pull request #295 from codesnippetspro/louiswol94-patch-1
louiswol94 Nov 11, 2025
b3e6ebb
fix: pagination in rest api
louiswol94 Nov 11, 2025
fb8c0e3
Merge pull request #296 from codesnippetspro/louiswol94-patch-3
louiswol94 Nov 12, 2025
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
10 changes: 10 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
last 2 versions
not dead
Chrome >= 111
Edge >= 111
Firefox >= 112
Safari >= 16.4
Android >= 111
ChromeAndroid >= 111
FirefoxAndroid >= 112
iOS >= 16.4
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@ script:
- find . -maxdepth 1 \( -name '*.php' \) -exec php -lf {} \;
- find src/php/ \( -name '*.php' \) -exec php -lf {} \;

# Run tests
- npm run test
# Run linters
- npm run lint
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
# Changelog

## [3.9.0-beta.2] (2025-11-10)

### Added
* Added 'Snippets' row action to the Network Sites table
* Improved snippet name visibility for network users

### Changed
* Refined badge styling and hover effects for row actions and badges
* Impoved icon style and color usage for network snippets for clearer differentiation

### Fixed
* Improved network snippets management with better subsite menu permission checks
* Fixed status labels for shared network snippets
* Corrected network condition checks and improved snippet fetching logic
* Handled fatal errors in file-based snippets to prevent crashes

## [3.9.0-beta.1] (2025-11-03)

### Added
* Soft delete (Trash) functionality for snippets with ability to undo, restore or permanently delete.
* Bulk actions for trashing, restoring, and permanently deleting multiple snippets.
* Separate filtered view to manage trashed snippets.

## [3.8.2] (2025-10-31)

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ export default eslintTs.config(
},
{
languageOptions: {
ecmaVersion: 2018,
ecmaVersion: 2022,
globals: { ...globals.browser },
parserOptions: {
ecmaVersion: 2018,
ecmaVersion: 2022,
ecmaFeatures: { jsx: true },
tsconfigRootDir: import.meta.dirname,
projectService: { allowDefaultProject: ['eslint.config.mjs'] }
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.

13 changes: 8 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
"name": "code-snippets",
"description": "Manage code snippets running on a WordPress-powered site through a graphical interface.",
"homepage": "https://codesnippets.pro",
"version": "3.8.2",
"version": "3.9.0-beta.2",
"main": "src/dist/edit.js",
"directories": {
"test": "tests"
},
"scripts": {
"test": "npm run stylelint && eslint && npm run phpcs",
"test:playwright": "playwright test -c tests/playwright/playwright.config.ts",
"test:playwright:debug": "npm run test:playwright -- --debug",
"test:playwright:ui": "npm run test:playwright -- --ui",
Expand All @@ -20,9 +19,13 @@
"build": "webpack",
"watch": "webpack --watch",
"bundle": "ts-node scripts/bundle.ts",
"phpcs": "src/vendor/bin/phpcs -s --colors ./src/phpcs.xml",
"phpcbf": "src/vendor/bin/phpcbf ./src/phpcs.xml",
"stylelint": "stylelint --fix 'src/css/**/*.scss'",
"lint": "npm run lint:styles && npm run lint:js && npm run lint:php",
"lint:styles": "stylelint 'src/css/**/*.scss'",
"lint:styles:fix": "stylelint --fix 'src/css/**/*.scss'",
"lint:js": "eslint",
"lint:js:fix": "eslint --fix",
"lint:php": "src/vendor/bin/phpcs -s --colors ./src/phpcs.xml",
"lint:php:fix": "src/vendor/bin/phpcbf ./src/phpcs.xml",
"version": "ts-node scripts/version.ts",
"version-dev": "npm version --git-tag-version=false --preid=dev",
"version-alpha": "npm version --git-tag-version=false --preid=alpha",
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: 3.8.2
* Version: 3.9.0-beta.2
* Requires PHP: 7.4
* Requires at least: 5.0
*
* @version 3.8.2
* @version 3.9.0-beta.2
* @package Code_Snippets
* @author Shea Bunge <shea@codesnippets.pro>
* @copyright 2012-2024 Code Snippets Pro
Expand All @@ -37,7 +37,7 @@
*
* @const string
*/
define( 'CODE_SNIPPETS_VERSION', '3.8.2' );
define( 'CODE_SNIPPETS_VERSION', '3.9.0-beta.2' );

/**
* The full path to the main file of this plugin.
Expand Down
65 changes: 32 additions & 33 deletions src/composer.lock

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

41 changes: 41 additions & 0 deletions src/css/common/_badges.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,27 @@
gap: 5px;
line-height: 1;

@at-root .row-actions & {
color: #8c8c8c;
padding-inline: 0px;
text-transform: capitalize;
font-weight: 500;
}

.dashicons {
font-size: 18px;
inline-size: 18px;
block-size: 18px;
}
}

.network-shared {
color: #2271b1;
font-size: 22px;
width: 100%;
cursor: help;
}

.small-badge {
block-size: auto;
inline-size: auto;
Expand Down Expand Up @@ -73,6 +87,33 @@
.inverted-badges .badge {
color: #fff;
background-color: #a7aaad;
border-color: #fff !important;

.dashicons {
color: #fff;
}
}

.nav-tab-inactive {
$colors: map.get(theme.$badges, 'pro');
$text-color: list.nth($colors, 2);
$background-color: list.nth($colors, 1);

.badge.pro-badge {
color: $text-color;
background-color: $background-color;
}

&:hover {
&.button, .dashicons-external {
color: #3c434a;
}

.badge.pro-badge {
color: $background-color;
background-color: $text-color;
}
}
}

.nav-tab-inactive {
Expand Down
2 changes: 1 addition & 1 deletion src/css/common/_switch.scss
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ a.snippet-condition-count {

&:hover {
border-inline-start-color: theme.$accent;
transition: border-left-color 0.6s;
transition: border-inline-start-color 0.6s;

&::before {
border-color: theme.$accent;
Expand Down
2 changes: 1 addition & 1 deletion src/css/edit/_editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
padding-inline-end: 0.5em;
}

@media screen and (width >= 512px) {
@media (width >= 512px) {
white-space: nowrap;
}
}
Expand Down
Loading
Loading