Backslashes are stripped from snippet content when pulling from a GitHub-synced repo.
Concrete example from my own snippet: Before (GitHub source): $routes = ["/wp/v2/users", "/wp/v2/users/(?P [\d]+)"]; After (pulled into SnipVault / deployed): $routes = ["/wp/v2/users", "/wp/v2/users/(?P [d]+)"]; The \d became d — the backslash was silently dropped, breaking the regex. Steps to reproduce: Push a snippet containing a literal backslash (e.g. a regex like \d) to the linked GitHub repo. Pull that snippet into SnipVault. Compare: the GitHub source still has \d, but the pulled/deployed snippet now has d — the backslash is gone. Impact: Any snippet content containing backslash escapes (regex patterns, \n, Windows paths, etc.) is silently corrupted on pull, with no error or warning. In my case this broke a regex-based permission check that was meant to restrict access to a REST API endpoint — it deployed "successfully" but the protection silently didn't work, and there was no indication anything was wrong. Suspected cause: Looks like stripslashes() (or wp_unslash()) is being applied somewhere in the GitHub pull path — its documented behavior is exactly this: \d → d, backslash dropped whenever it precedes a character with no special meaning. Thank you.

pearlknowledge about 21 hours ago
Feature Request
Backslashes are stripped from snippet content when pulling from a GitHub-synced repo.
Concrete example from my own snippet: Before (GitHub source): $routes = ["/wp/v2/users", "/wp/v2/users/(?P [\d]+)"]; After (pulled into SnipVault / deployed): $routes = ["/wp/v2/users", "/wp/v2/users/(?P [d]+)"]; The \d became d — the backslash was silently dropped, breaking the regex. Steps to reproduce: Push a snippet containing a literal backslash (e.g. a regex like \d) to the linked GitHub repo. Pull that snippet into SnipVault. Compare: the GitHub source still has \d, but the pulled/deployed snippet now has d — the backslash is gone. Impact: Any snippet content containing backslash escapes (regex patterns, \n, Windows paths, etc.) is silently corrupted on pull, with no error or warning. In my case this broke a regex-based permission check that was meant to restrict access to a REST API endpoint — it deployed "successfully" but the protection silently didn't work, and there was no indication anything was wrong. Suspected cause: Looks like stripslashes() (or wp_unslash()) is being applied somewhere in the GitHub pull path — its documented behavior is exactly this: \d → d, backslash dropped whenever it precedes a character with no special meaning. Thank you.

pearlknowledge about 21 hours ago
Feature Request
Completed
Bug report: false positive "function already exists" for class methods
Hello team. I’d like to report a potential bug I recently found as below. SnipVault's pre-save validation reports a function-name collision and disables the snippet when a class method happens to share its name with an existing global function. In my case a PHP class containing a get_categories() method is rejected with an error along the lines of function get_categories already exists, because WordPress core defines a global get_categories() in wp-includes/category.php. The snippet does not declare any function at global scope. get_categories appears only as a method inside a class body, so there is no actual conflict — PHP resolves class methods in the class scope, entirely separate from the global function namespace. The validation appears to match function declarations textually rather than by parsing the code, so it cannot distinguish a method declaration from a global function declaration. Environment Please fill in before sending: SnipVault version: 1.3.2 WordPress version: 7.1 PHP version: 8.2 Steps to reproduce Create a new PHP snippet. Paste the following (6 lines, no global functions declared): Save the snippet. Expected: the snippet saves and runs. SnipVault_Repro::get_categories() does not conflict with the global get_categories() and PHP loads it without error. Actual: validation reports that get_categories already exists and the snippet is disabled / blocked from running. Substituting any other method name that matches a core function reproduces the same result — get_option, get_posts, get_terms, get_users, get_comments are all extremely common method names in ordinary WordPress class design. Why this matters beyond my snippet This blocks a whole category of legitimate code rather than one unlucky name. Elementor custom widgets cannot be written at all. Elementor's widget API requires subclasses of \Elementor\Widget_Base to implement get_categories() — it is how a widget declares which panel category it belongs to. Every custom Elementor widget therefore contains a method with that exact name, so every one of them trips this check. Given Elementor's install base, this is likely to affect a meaningful number of users, and the failure mode is confusing: the error names a function the user never wrote at global scope. Ordinary class-based snippets are affected too. A settings class with a get_option() method, a query helper with get_posts(), a taxonomy helper with get_terms() — all are idiomatic PHP and all would be rejected. Suggested fix Replace textual matching with token-based analysis. PHP's built-in token_get_all() is sufficient and needs no dependencies. The rule is: a T_FUNCTION token declares a global function only when it appears at brace depth zero and is not inside a class / interface / trait / enum body. Sketch: function snipvault_find_global_functions( $code ) { $tokens = token_get_all( $code ); $names = []; $depth = 0; // current brace nesting depth $scopes = []; // brace depth at which each class-like body started foreach ( $tokens as $i => $token ) { if ( is_array( $token ) ) { // Entering a class-like body: remember its

pearlknowledge 14 days ago
Feature Request
Completed
Bug report: false positive "function already exists" for class methods
Hello team. I’d like to report a potential bug I recently found as below. SnipVault's pre-save validation reports a function-name collision and disables the snippet when a class method happens to share its name with an existing global function. In my case a PHP class containing a get_categories() method is rejected with an error along the lines of function get_categories already exists, because WordPress core defines a global get_categories() in wp-includes/category.php. The snippet does not declare any function at global scope. get_categories appears only as a method inside a class body, so there is no actual conflict — PHP resolves class methods in the class scope, entirely separate from the global function namespace. The validation appears to match function declarations textually rather than by parsing the code, so it cannot distinguish a method declaration from a global function declaration. Environment Please fill in before sending: SnipVault version: 1.3.2 WordPress version: 7.1 PHP version: 8.2 Steps to reproduce Create a new PHP snippet. Paste the following (6 lines, no global functions declared): Save the snippet. Expected: the snippet saves and runs. SnipVault_Repro::get_categories() does not conflict with the global get_categories() and PHP loads it without error. Actual: validation reports that get_categories already exists and the snippet is disabled / blocked from running. Substituting any other method name that matches a core function reproduces the same result — get_option, get_posts, get_terms, get_users, get_comments are all extremely common method names in ordinary WordPress class design. Why this matters beyond my snippet This blocks a whole category of legitimate code rather than one unlucky name. Elementor custom widgets cannot be written at all. Elementor's widget API requires subclasses of \Elementor\Widget_Base to implement get_categories() — it is how a widget declares which panel category it belongs to. Every custom Elementor widget therefore contains a method with that exact name, so every one of them trips this check. Given Elementor's install base, this is likely to affect a meaningful number of users, and the failure mode is confusing: the error names a function the user never wrote at global scope. Ordinary class-based snippets are affected too. A settings class with a get_option() method, a query helper with get_posts(), a taxonomy helper with get_terms() — all are idiomatic PHP and all would be rejected. Suggested fix Replace textual matching with token-based analysis. PHP's built-in token_get_all() is sufficient and needs no dependencies. The rule is: a T_FUNCTION token declares a global function only when it appears at brace depth zero and is not inside a class / interface / trait / enum body. Sketch: function snipvault_find_global_functions( $code ) { $tokens = token_get_all( $code ); $names = []; $depth = 0; // current brace nesting depth $scopes = []; // brace depth at which each class-like body started foreach ( $tokens as $i => $token ) { if ( is_array( $token ) ) { // Entering a class-like body: remember its

pearlknowledge 14 days ago
Feature Request
In Progress
AI Custom Model
Please add a feature for adding a custom model with a base url and the api key

Rian Irawan about 1 month ago
Feature Request
In Progress
AI Custom Model
Please add a feature for adding a custom model with a base url and the api key

Rian Irawan about 1 month ago
Feature Request
Completed
Live reload script error in console
With Live Reload enabled on my development site I get the following error in the console: Is there anything I can do to resolve this?

Simon Logan 3 months ago
Bug Reports
Completed
Live reload script error in console
With Live Reload enabled on my development site I get the following error in the console: Is there anything I can do to resolve this?

Simon Logan 3 months ago
Bug Reports
Completed
White Screen on WP 7.0
Just updated a site to WP 7.0 and clicking on SnipVault in the Admin Dashboard returns a white blank screen.

manuel-will 4 months ago
Bug Reports
Completed
White Screen on WP 7.0
Just updated a site to WP 7.0 and clicking on SnipVault in the Admin Dashboard returns a white blank screen.

manuel-will 4 months ago
Bug Reports
Completed
Github sync not working
I have an snippet set up to sync with Github. Only one instance of Snipvault syncing with Github. If I make a change to the snippet, rather than changes syncing with the repo, it shows “Conflicts”. The only way to sync is to manually push the changes.

ainom 5 months ago
Bug Reports
Completed
Github sync not working
I have an snippet set up to sync with Github. Only one instance of Snipvault syncing with Github. If I make a change to the snippet, rather than changes syncing with the repo, it shows “Conflicts”. The only way to sync is to manually push the changes.

ainom 5 months ago
Bug Reports
Completed
Warnings generated by PHP snippets prevent the entire snippet from running
I had a snippet that I spent hours trying to determine why it wasn’t running. The “Errors” panel showed a warning (but no errors). It turns out that this warning prevented the snippet from executing. Warnings shouldn’t halt execution. It would be nice if any errors that prevent execution of snippets were shown on the dashboard—clearly indicating which snippets the errors pertain to.

ainom 5 months ago
Bug Reports
Completed
Warnings generated by PHP snippets prevent the entire snippet from running
I had a snippet that I spent hours trying to determine why it wasn’t running. The “Errors” panel showed a warning (but no errors). It turns out that this warning prevented the snippet from executing. Warnings shouldn’t halt execution. It would be nice if any errors that prevent execution of snippets were shown on the dashboard—clearly indicating which snippets the errors pertain to.

ainom 5 months ago
Bug Reports
Completed
Dead in the water
I deactivated Snipvault briefly, then re-activated but now none of my active snippets are running. Safe mode is OFF. Basically, the plugin is dead.

ainom 5 months ago
Bug Reports
Completed
Dead in the water
I deactivated Snipvault briefly, then re-activated but now none of my active snippets are running. Safe mode is OFF. Basically, the plugin is dead.

ainom 5 months ago
Bug Reports
Visible indicator of SAFE MODE
When setting safe mode on, there should be an clearly visible indicator of this on all screens (not just the features/functionality tab of the Settings screen), preventing the confusion of why no snippets are executing.

ainom 5 months ago
Feature Request
Visible indicator of SAFE MODE
When setting safe mode on, there should be an clearly visible indicator of this on all screens (not just the features/functionality tab of the Settings screen), preventing the confusion of why no snippets are executing.

ainom 5 months ago
Feature Request
Unhelpful dashboard message
I see this message in the dashboard, but it provides no indication of which snippet has a runtime error no any way to obtain this information.

ainom 5 months ago
Feedback
Unhelpful dashboard message
I see this message in the dashboard, but it provides no indication of which snippet has a runtime error no any way to obtain this information.

ainom 5 months ago
Feedback
Sorting doesn't work for folders
It should either use the same sorting set for snippets, or allow manual sorting via drag-and-drop.

ainom 5 months ago
Bug Reports
Sorting doesn't work for folders
It should either use the same sorting set for snippets, or allow manual sorting via drag-and-drop.

ainom 5 months ago
Bug Reports
What's the difference between "Favourite" and "Pin"?
Both options function exactly the same as far as I can tell. Why have both?

ainom 5 months ago
Feedback
What's the difference between "Favourite" and "Pin"?
Both options function exactly the same as far as I can tell. Why have both?

ainom 5 months ago
Feedback
UX glitches when dragging snippets into folders
It regularly takes about 30 seconds to move a snippet file into a folder. Here’s an example: https://www.dropbox.com/scl/fi/069fe2mh40s7xp5af2tpm/CleanShot-2026-03-30-at-10.10.27.mp4?rlkey=1ej778wysjphdrbav376eghcw&dl=0

ainom 5 months ago
Bug Reports
UX glitches when dragging snippets into folders
It regularly takes about 30 seconds to move a snippet file into a folder. Here’s an example: https://www.dropbox.com/scl/fi/069fe2mh40s7xp5af2tpm/CleanShot-2026-03-30-at-10.10.27.mp4?rlkey=1ej778wysjphdrbav376eghcw&dl=0

ainom 5 months ago
Bug Reports
Completed
Change single-click folder rename to double-click
When opening a folder, it’s natural to click the folder name, but currently that puts the name in edit mode to rename it. It also becomes difficult to open a folder if the folder name is long. Instead, it would be great if a single click functions the same as just clicking anywhere else on the folder, and a double-click is required to rename.

ainom 5 months ago
Feature Request
Completed
Change single-click folder rename to double-click
When opening a folder, it’s natural to click the folder name, but currently that puts the name in edit mode to rename it. It also becomes difficult to open a folder if the folder name is long. Instead, it would be great if a single click functions the same as just clicking anywhere else on the folder, and a double-click is required to rename.

ainom 5 months ago
Feature Request
Completed
UI tweaks to PHP "Load on hook"
These would make selecting the appropriate hook SOO much easier: 1. Allow autocomplete when typing in the field. For example, typing “pl” would auto-suggest “plugins_loaded”. 2. Automatically move focus to the search field, when clicking the search icon. Saves a click.

ainom 5 months ago
Feature Request
Completed
UI tweaks to PHP "Load on hook"
These would make selecting the appropriate hook SOO much easier: 1. Allow autocomplete when typing in the field. For example, typing “pl” would auto-suggest “plugins_loaded”. 2. Automatically move focus to the search field, when clicking the search icon. Saves a click.

ainom 5 months ago
Feature Request
How to add custom conditions?
There’s a “Custom Function” condition, and a “PHP expression” condition, but neither are very intuitive. I need a snippet to run only if the following condition is TRUE: !bricks_is_builder_main(); How would I implement this condition?

ainom 5 months ago
Feedback
How to add custom conditions?
There’s a “Custom Function” condition, and a “PHP expression” condition, but neither are very intuitive. I need a snippet to run only if the following condition is TRUE: !bricks_is_builder_main(); How would I implement this condition?

ainom 5 months ago
Feedback
How do I make a snippet a "template"?
I can create a new snippet from a template, and show only templates in the list, but how does one make a snippet be a template?

ainom 5 months ago
Feedback
How do I make a snippet a "template"?
I can create a new snippet from a template, and show only templates in the list, but how does one make a snippet be a template?

ainom 5 months ago
Feedback
Completed
Ability to edit tag name
In order to rename a tag currently, one must create a new tag then edit every snippet that uses the old tag by adding the new tag and removing the old one. Please add the ability to just rename existing tags.

ainom 5 months ago
Feature Request
Completed
Ability to edit tag name
In order to rename a tag currently, one must create a new tag then edit every snippet that uses the old tag by adding the new tag and removing the old one. Please add the ability to just rename existing tags.

ainom 5 months ago
Feature Request
Completed
Code revision datestamps don't use server or Wordpress timezone
My current timezone is set to ‘America/Vancouver’ At exactly 1:19pm local time I made a change to a file. However, the code revision is timestamped at 8:19pm (7 hours different).

ainom 5 months ago
Bug Reports
Completed
Code revision datestamps don't use server or Wordpress timezone
My current timezone is set to ‘America/Vancouver’ At exactly 1:19pm local time I made a change to a file. However, the code revision is timestamped at 8:19pm (7 hours different).

ainom 5 months ago
Bug Reports
Completed
Remove 300px constraint on width of PHP error list
Why limit the list to 300px in the first place? It would be much more usable if it could utilize the entire available width.

ainom 5 months ago
Feature Request
Completed
Remove 300px constraint on width of PHP error list
Why limit the list to 300px in the first place? It would be much more usable if it could utilize the entire available width.

ainom 5 months ago
Feature Request