Last active
November 9, 2021 09:02
-
-
Save azamatx/7614e0e9f02ad5197cd824fa51b859cd to your computer and use it in GitHub Desktop.
VS Code WordPress add_action print_r debug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"add_action_print": { | |
"prefix": "add", | |
"body": [ | |
"add_action('init', function() {", | |
"\tif (isset(\\$_GET['devpre'])) {", | |
"\t\t\\$templates = get_option('wpb_js_templates');", | |
"\t\techo '<pre>';", | |
"\t\tprint_r(\\$templates);", | |
"\t\techo '</pre>';", | |
"\t\texit;", | |
"\t}", | |
"});", | |
], | |
"description": "WP add action with pre" | |
}, | |
"print": { | |
"prefix": "pr", | |
"body": [ | |
"echo '<pre>';", | |
"print_r(\\$templates);", | |
"echo '</pre>';", | |
], | |
"description": "Print R" | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment