Last active
September 19, 2022 10:06
-
-
Save hyperframed/e83bbaec981b65f48101f919bbd916cc to your computer and use it in GitHub Desktop.
VS Code Snippets for PHP
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
{ | |
"PHP Tag": { | |
"prefix": "pp", | |
"body": [ | |
"<?php $code ?>", | |
], | |
}, | |
"AOS Tag": { | |
"prefix": "aos", | |
"body": [ | |
"data-aos=\"$animation\"", | |
], | |
}, | |
"AOS DelayTag": { | |
"prefix": "aosd", | |
"body": [ | |
"data-aos-delay=\"$delay\"", | |
], | |
}, | |
"WP Theme Image Tag": { | |
"prefix": "tim", | |
"body": [ | |
"<img class=\"$class\" alt=\"$alt\" width=\"$width\" loading=\"lazy\" src=\"<?php echo get_template_directory_uri() . '/inc/img/$image' ?>\">", | |
], | |
}, | |
"Structural Comment": { | |
"prefix": "kk", | |
"body": [ | |
"<!-- Begin $element -->", | |
], | |
}, | |
"Structural Comment End": { | |
"prefix": "ke", | |
"body": [ | |
"<!-- End $element -->", | |
], | |
}, | |
"WP Theme Source Image Tag": { | |
"prefix": "sim", | |
"body": [ | |
"<?php echo get_template_directory_uri() . '/inc/img/$image' ?>", | |
], | |
}, | |
"ACF Get Field": { | |
"prefix": "tf", | |
"body": [ | |
"the_field( '$field_name' );", | |
], | |
}, | |
"ACF Get Field with PHP Tags": { | |
"prefix": "tfp", | |
"body": [ | |
"<?php the_field( '$field_name' ); ?>", | |
], | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment