Read a snippet
wp_get_php_snippetRead one snippet of Code Snippets or WPCode with its code, by id from wp_list_php_snippets. Returns the fields of the list plus native_location, description, modified, code and declares (the functions and classes the code declares unconditionally); an id the plugin does not have is refused. Raw code access: a snippet may hold API keys or other secrets. Administrators only (manage_options and edit_plugins); not on multisite; blocked by DISALLOW_FILE_EDIT and DISALLOW_FILE_MODS. Forwarded by AlphaBridge Connect to the one site this connection reaches.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Snippet id, as wp_list_php_snippets lists it. | |
| provider | No | Snippet plugin: code-snippets (Code Snippets) or wpcode (WPCode). Needed only when both are active. |