-
-
Notifications
You must be signed in to change notification settings - Fork 1
Custom Tweaks via Constants
The intended usage of this plugin is for Administrator users only. Therefore the default capability to see the new Admin Bar node is set to activate_plugins
. You can change this via the constant SNQN_VIEW_CAPABILITY
– define that via wp-config.php
or via Code Snippet plugin:
define( 'SNQN_VIEW_CAPABILITY', 'activate_plugins' );
You can define an array of user IDs (can also be only one ID) and that way restrict showing the Snippets Admin Bar item only for those users. Define that via wp-config.php
or via Code Snippet plugin:
define( 'SNQN_ENABLED_USERS', [ 1, 500, 867 ] );
This would enable only for the users with the IDs 1, 500 and 867. Note the square brackets, and no single quotes, just the ID numbers.
For example you are one of many admin users (role administrator
) but only you want to show it for yourself. Given you have user ID 1:
define( 'SNQN_ENABLED_USERS', [ 1 ] );
That way only you can see it, the other admins can't!
The default is just "Snippets" – catchy and short. However, if you don't enjoy "Snippets" you can tweak that also via the constant SNQN_NAME_IN_ADMINBAR
– define that also via wp-config.php
or via Code Snippet plugin:
define( 'SNQN_NAME_IN_ADMINBAR', 'Codes' );
define( 'SNQN_COUNTER', 'yes' );
The "snip" icon – aka the scissor logo icon – is awesome and really historic. However, you can use two other alternatives: 1) The Code Snippets company logo (a bit red-ish / blue-ish) or 2) a more neutral "code" logo from Remix Icon (free and open source licensed!). You can also tweak that via a constant in
wp-config.php
or via Code Snippets plugin:
define( 'SNQN_ICON', 'red_blue' ); // Code Snippets company logo
define( 'SNQN_ICON', 'remix' ); // code icon by Remix Icon
Removes the "Find Snippets" section
define( 'SNQN_DISABLE_LIBRARY', 'yes' );
Removes the "Links" & "About" sections
define( 'SNQN_DISABLE_FOOTER', 'yes' );
Nothing really fancy, just some additional links for coders:
- Site Health Info (WP Core)
- Plugin: DevKit Pro by DPlugins
- Plugin: System Dashboard by Bowo
- Plugin: Variable Inspector by Bowo
- Plugin: Debug Log Manager by Bowo
define( 'SNQN_EXPERT_MODE', TRUE );
Note: Support for some additional stuff in that mode may come in future.
If you want the Pro promotions go away, use the following snippet ... or just purchase the Pro version to support the developers. Thank you in advance! (And thanks to the Code Snippets team for making this awesome tool for us site builders and developers!)
define( 'SNQN_FREE_CS_FREE', 'yes' );
- This removes the pro content types in the free version
- Removes the upgrade button, and upgrade submenu (in left-hand Admin menu)
- Removes Banner / survey on Code Snippet admin pages
Home | Wiki | Discussions
Snippets QuickNav Plugin by deckerweb / Copyright: © 2025, David Decker – DECKERWEB