Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
a04ae51
feat: add Admin Bar integration for Code Snippets with quick links an…
imantsk Jan 6, 2026
d224342
feat: add Admin Bar integration to the Plugin class
imantsk Jan 6, 2026
e3da8f4
feat: update snippet type labels
imantsk Jan 8, 2026
8f98136
feat: add admin bar snippet limit setting
imantsk Jan 8, 2026
bc77764
feat: enhance admin bar with pagination and snippet limit features
imantsk Jan 8, 2026
ce40ffa
feat: add filtering and sorting options to snippets REST API endpoint
imantsk Jan 8, 2026
1a6bfc0
feat: add admin bar pagination functionality with snippet fetching
imantsk Jan 8, 2026
ce45668
feat: add styles for admin bar code snippets pagination and safe mode
imantsk Jan 8, 2026
d16bc87
feat: refactor admin bar icon styles
imantsk Jan 8, 2026
fd419f4
feat: update admin bar icon handling and remove SVG function
imantsk Jan 8, 2026
4caef68
fix: update snippet response item type handling
imantsk Jan 8, 2026
1cf61b7
feat: enhance admin bar settings with enable option and snippet limit
imantsk Jan 8, 2026
cd2167d
feat: add 'Conditions' tab
imantsk Jan 8, 2026
4e74851
feat: enable admin bar by default in settings
imantsk Jan 9, 2026
11a3fb1
chore(release): update changelog for v3.9.4
code-snippets-bot Jan 14, 2026
04837a6
chore(release): update readme for v3.9.4
code-snippets-bot Jan 14, 2026
83da39b
chore(release): bump version to v3.9.4
code-snippets-bot Jan 14, 2026
3ab6ce4
fixed changelog formatting
lightbulbman Jan 14, 2026
6d8d3e5
fixed changelog formatting
lightbulbman Jan 14, 2026
10e052d
fix: better handle null tags in snippet data
imantsk Jan 14, 2026
abf1d10
Merge pull request #327 from codesnippetspro/fix/import-issue
imantsk Jan 14, 2026
9aeab08
Update help.codesnippets.pro links to instead point to codesnippets.p…
sheabunge Jan 16, 2026
d0e216c
fix: changelog entries
code-snippets-bot Jan 16, 2026
8ee0c5c
Merge pull request #326 from codesnippetspro/tag/v3.9.4
lightbulbman Jan 16, 2026
680d682
Merge branch 'core/core' into feat/snippets-quicknav
imantsk Jan 17, 2026
f6929f1
fix: eslint @stylistic/quote-props
imantsk Jan 17, 2026
b7e5a74
fix: codestyle clean up and delint
imantsk Jan 17, 2026
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
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
blank_issues_enabled: true
contact_links:
- name: ❓ Support Question
url: https://help.codesnippets.pro/
url: https://codesnippets.pro/support/
about: For Code Snippets users who need assistant and have general usage questions.
- name: 💎 Premium Support - For customers only
url: https://help.codesnippets.pro/
url: https://codesnippets.pro/support/
about: If you have an active license you are entitled to premium support.
- name: 🗨️ Code Snippets Facebook Community
url: https://www.facebook.com/groups/codesnippetsplugin
about: The main Facebook group where all kinds of users come together to help each other.
- name: 📚 Code Snippets Documentation
url: https://help.codesnippets.pro/
url: https://codesnippets.pro/docs/
about: Anything you need to know about Code Snippets and what to do if you may have an issue.
16 changes: 15 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## [3.9.4] (2026-01-14)

### Added
* New import functionality to migrate snippets from file uploads with drag-and-drop interface
* Support for importing snippets from other popular plugins (Header Footer Code Manager, Insert Headers and Footers, Insert PHP Code Snippet)
* Enhanced file based execution support with improved multisite mode compatibility

### Changed
* Updated links to more recent documentation pages

### Fixed
* Fixed multisite capability checks in Plugin class
* Fixed snippet execution logic for multisite support by centralizing trashed snippet handling
* Fixed multisite snippet handling to ensure local snippets use correct table and filter out trashed snippets

## [3.9.3] (2025-12-03)

Expand Down Expand Up @@ -378,7 +392,7 @@

### Added
* Added additional editor shortcuts to list in tooltip.
* Filter for changing Snippets admin menu position. [See this help article for more information.](https://help.codesnippets.pro/article/61-how-can-i-change-the-location-of-the-snippets-admin-menu)
* Filter for changing Snippets admin menu position. [See this help article for more information.](https://codesnippets.pro/doc/snippets-menu-location/)
* Ability to filter shortcode output. Thanks to contributions from [Jack Szwergold](https://github.com/JackSzwergold).

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ WordPress plugin for managing executable code snippets through a graphical inter

- [Read more on WordPress.org](https://wordpress.org/plugins/code-snippets)
- [Download the latest stable version](https://downloads.wordpress.org/plugin/code-snippets.latest-stable.zip)
- [Read the help documentation](https://help.codesnippets.pro)
- [Read the help documentation](https://codesnippets.pro/docs/)
- [Leave a review](https://wordpress.org/support/plugin/code-snippets/reviews/#new-post)
- [Translate into your language](https://translate.wordpress.org/projects/wp-plugins/code-snippets/)
15 changes: 8 additions & 7 deletions config/webpack-js.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@ const babelConfig = {

export const jsWebpackConfig: Configuration = {
entry: {
edit: { import: `${SOURCE_DIR}/edit.tsx`, dependOn: 'editor' },
editor: `${SOURCE_DIR}/editor.ts`,
import: `${SOURCE_DIR}/import.tsx`,
manage: `${SOURCE_DIR}/manage.ts`,
mce: `${SOURCE_DIR}/mce.ts`,
prism: `${SOURCE_DIR}/prism.ts`,
settings: { import: `${SOURCE_DIR}/settings.ts`, dependOn: 'editor' }
'admin-bar': `${SOURCE_DIR}/admin-bar.ts`,
'edit': { import: `${SOURCE_DIR}/edit.tsx`, dependOn: 'editor' },
'editor': `${SOURCE_DIR}/editor.ts`,
'import': `${SOURCE_DIR}/import.tsx`,
'manage': `${SOURCE_DIR}/manage.ts`,
'mce': `${SOURCE_DIR}/mce.ts`,
'prism': `${SOURCE_DIR}/prism.ts`,
'settings': { import: `${SOURCE_DIR}/settings.ts`, dependOn: 'editor' }
},
output: {
path: join(resolve(__dirname), '..', DEST_DIR),
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": "3.9.3",
"version": "3.9.4",
"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: 3.9.3
* Version: 3.9.4
* Requires PHP: 7.4
* Requires at least: 5.0
*
* @version 3.9.3
* @version 3.9.4
* @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.9.3' );
define( 'CODE_SNIPPETS_VERSION', '3.9.4' );

/**
* The full path to the main file of this plugin.
Expand Down
119 changes: 119 additions & 0 deletions src/css/admin-bar.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
#wpadminbar {
#wp-admin-bar-code-snippets > .ab-item {
.code-snippets-admin-bar-icon {
width: 16px;
height: 16px;
top: 5px;

&::before {
content: '';
display: block;
width: 16px;
height: 16px;
mask-image: url('../assets/menu-icon.svg');
mask-repeat: no-repeat;
mask-position: center;
mask-size: contain;
background-color: rgba(240, 245, 250, 0.6);
}
}
}

.code-snippets-safe-mode-active {
> .ab-item,
&.ab-item {
background: #b32d2e;
color: #fff;
}

&:hover > .ab-item,
&.hover > .ab-item {
background: #d63638;
color: #fff;
}
}

.code-snippets-safe-mode.code-snippets-safe-mode-active > .ab-item,
.code-snippets-safe-mode.code-snippets-safe-mode-active.ab-item {
font-weight: 600;
}

.code-snippets-safe-mode .code-snippets-external-icon {
font-family: dashicons;
display: inline-block;
position: relative;
line-height: 1;
opacity: .8;
top: 6px;
}

.code-snippets-safe-mode:hover .code-snippets-external-icon,
.code-snippets-safe-mode.hover .code-snippets-external-icon {
opacity: 1;
}

#wp-admin-bar-code-snippets-active-snippets > .ab-sub-wrapper > .ab-submenu,
#wp-admin-bar-code-snippets-inactive-snippets > .ab-sub-wrapper > .ab-submenu {
padding-top: 0;
}

.code-snippets-disabled > .ab-item {
opacity: 0.6;
}

.code-snippets-disabled:hover > .ab-item,
.code-snippets-disabled.hover > .ab-item {
opacity: 1;
}

.code-snippets-pagination-node > .ab-item {
padding: 0;
margin-bottom: 6px;
}

.code-snippets-pagination-controls {
display: flex;
align-items: stretch;
width: 100%;
white-space: nowrap;

.code-snippets-pagination-button {
display: inline-flex;
align-items: center;
justify-content: center;
flex: 1 1 0;
min-height: 32px;
padding: 0 10px;
background: rgba(240, 245, 250, 0.08);
color: inherit;
text-decoration: none;
line-height: 1.2;
box-sizing: border-box;

& + .code-snippets-pagination-button {
border-left: 1px solid rgba(240, 245, 250, 0.15);
}

&[aria-disabled='true'] {
opacity: 0.4;
pointer-events: none;
}
}

a.code-snippets-pagination-button:hover {
background: rgba(240, 245, 250, 0.16);
}

a[data-action='first'],
a[data-action='last'] {
flex: 0 0 36px;
padding: 0;
}

.code-snippets-pagination-page {
flex: 0 0 auto;
cursor: default;
opacity: 0.85;
}
}
}
Loading