Skip to main content

Have something to say?

Tell us how we could make the product more useful to you.

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.

pearlknowledge1 month ago
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

pearlknowledge2 months ago
In Progress

AI Custom Model

Please add a feature for adding a custom model with a base url and the api key

Rian Irawan3 months ago
1

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.

ainom6 months ago
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.

ainom6 months ago
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.

ainom6 months ago
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.

ainom6 months ago
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.

ainom6 months ago

Ability to make Snippets the default view

I don’t find much value in the Dashboard view…I mean it’s nice to glance at on occasion, but with Snipvault what I mainly want to do is add and manage my snippets. The dashboard as a default view creates a barrier to this by forcing me to click a second time after waiting 4-5 seconds for the dashboard to load. Please Add a setting that allows Snippets to be the default view.

ainom6 months ago

Ability to control where CSS/SCSS files are loaded

Just realized this gap…please add the ability to control whether a stylesheet is loaded in the or at the bottom of the. Ideally allow selection of common wp actions (wp_head, wp_footer, wp_body_open, admin_head, admin_footer, login_head, login_footer)

ainom7 months ago

Can i upgrade my plan?

I currently have only a starter license. Can I upgrade to an Ultimate plan (i.e pay the difference in price)?

ainom7 months ago

Restore position when returning to a snippet

When returning to a snippet after switching to a different one, currently it shows the very top of the snippet. if you were last working lower down the snippet, this forced you to scroll back down to where you were working. It would be VERY helpful to save the position of the snippet viewport and restore it when returning to it.

ainom7 months ago
Completed

; shortcut

When pressing ENTER at the end of a line in a CSS snippet, automatically add ; if it doesn’t already exist.

ainom7 months ago
Completed

! shortcut

When typing ! in a CSS snippet, automatically transform it to !important;

ainom7 months ago
Completed

Colour picker

When editing a CSS file, allow changing any color by clicking on the colour square and using a colour picker to change hex, RBGA, HSL, etc.

ainom7 months ago
Completed

Auto-Minification

Add option to automatically minify CSS and JS files (set for each file)

ainom7 months ago
Completed

"Unsaved changes" indicator

Please add a (very visible) indicator whenever a file has unsaved changes.

ainom7 months ago
Completed

Add option to replace Library with Github repo

I have no use for any of the snippets in the Library, but I want to access my own snippets from my own Github repo. Rather than always clicking the Github icon after going to the library, it would be helpful if my Github files could appear where the Library files currently do. Also, don’t paginate the list-—show them all on one page.

ainom7 months ago
Completed

Allow custom CSS for Snipvault UI

Please allow custom CSS so Snipvault can work with all admin themes and UI preferences. I can’t use SV because the WP sidebar menu covers the SV UI, and I absolutely need the sidebar and the top menu bar to be present when using SV. Because it runs in an iFrame we can’t use a theme file or external plugin to override the SV styling, so the only I am able to make it work is to modify the plugin to add custom styles to the styles.css file and re-install the plugin.

ainom7 months ago
2
Completed

Plugin dead?!

I wanted to ask if development for this plugin is still ongoing?! The same developer for uipress.co, and unfortunately, nothing's happening there either! What's going on? Can we just forgett both projects, or is something else happening?

Youssef1 year ago
2