-
Notifications
You must be signed in to change notification settings - Fork 0
/
php.json
42 lines (41 loc) · 1.46 KB
/
php.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{
// Place your snippets for php here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// \\$1, \\$2 for tab stops, \\$0 for the final cursor position, and \\${1:label}, \\${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
// "console.log('\\$1');",
// "\\$2"
// ],
// "description": "Log output to console"
// }
"WordpressShortcode": {
"prefix": "shortcode",
"body": [
"function \\${1:function_name}(\\$attributes, \\$content = null) {",
"\t\\$a = shortcod_atts([",
"\t\t\t\t'title' \t=> 'My Title'",
"\t\t\t\t'class' \t=> 'MyClass'",
"\t\t], \\$attributes);",
"\t\t\\$return_string = '';",
"\t\t",
"$0",
"\treturn \\$return_string;",
"}",
"add_shortcode('${1:shortcode_name},${2:function_name}');"
],
"description": "Add a new add shortcode function to php functions"
},
"Add Region": {
"prefix": "region",
"body": [
"#region ${1:regionname} ",
"$0",
"#endregion"
],
"description": "Add a new region to the SCSS file"
},
}