Last active
October 10, 2018 20:01
-
-
Save coreymcollins/d30dda8a40695098e35292ac5b5885f9 to your computer and use it in GitHub Desktop.
VS Code Snippets
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
"wp_die": { | |
"prefix": "die", | |
"body": [ | |
"wp_die( '<pre>'. htmlentities( print_r( ${1:foo}, true ) ) .'</pre>' );", | |
], | |
"description": "invoke wp_die()" | |
}, |
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
"wp_debug": { | |
"prefix": "debug", | |
"body": [ | |
"define('WP_DEBUG', true);", | |
"if (WP_DEBUG) {", | |
" define('SCRIPT_DEBUG', true);", | |
" define('JETPACK_DEV_DEBUG', true);", | |
" define('WP_DEBUG_LOG', false);", | |
" define('WP_DEBUG_DISPLAY', true);", | |
"}", | |
], | |
"description": "add WP_DEBUG constant" | |
}, |
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
"XMP an array or object": { | |
"prefix": "xmp", | |
"body": [ | |
"echo '<xmp>$1: '. print_r( $2, true ) .'</xmp>';", | |
], | |
"description": "Display an array or object in an XMP wrapper" | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment