Using this button you create a new Snippet. Before you save the snippet make sure to select the snippet type. Once the snippet is saved, its type cannot be changed.
This is the place where you can find all the snippets that are available in the WordPress Snippet Repository. You can search for snippets using the search box. You can also filter the snippets by category.
Here you can set your WPCodeBox Cloud API Key. Also, you can edit the editor settings, like layouts, font sizes or line wraps.
Using the search textfield, you can search the local snippets by name, description or code. For example, if you want to find all snippets that access an ACF field, you could search for
This is the list of all the snippets that you have created locally. You can search for snippets using the search box. If a snippet is disabled, its name will be in italics. Only enabled snippets run. You can create folders to organize the snippet list, and you can push/pull local snippets to and from the cloud.
These are the cloud snippets you have available. You can download and enable them locally. When a cloud snippet is downloaded, it will be disabled by default.
The main code editor allows you to edit your Code Snippets. The Editor will automaticallt detect what code snippet you are editing, and will provide completions and suggestions accordingly.
In this section, you have all the snippet details. You can edit the snippet name, description, and other settings.
The snippet title is the name of the snippet. It is used to identify the snippet in the snippet list.
The optional description allows you to describe in more detail what the snippet does.
You have 3 options here.
- Always - this will run the snippet automatically (best for snippets that need to run on every page load).
- Manually - this will add a button to the top bar above the editor that allows you to run the snippet manually.
- Using External Secure URL - This will generate an URL that you can call to run the snippet. Useful for running snippets from external services.
This allows you to customize where the snippet will run. The default option is
plugins_loaded, and it should be the best for most cases.
You can also select to run the snippet in a custom action or a custom shortcode.
By changing the priority, you set the priority for that respective action. The priority is the argument sent to the add_action function (opens in a new tab).
The snippet order determines the order in which the snippets are run. The lower the number, the earlier the snippet will run. The default order is 10. This doesn't affect where the code runs, but only how snippets are rendered in relation to eachother.
This will open the condition builder, where you can conditionally run the snippet. You can add multiple conditions, and you can also nest conditions. Read more about the condition builder here.
From this area you can enable/disable the snippet, save it and upload or download the current snippet from the cloud.