-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathhtml.json
91 lines (91 loc) · 1.97 KB
/
html.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
{
"SVG": {
"prefix": "svg",
"body": [
"<?php include get_theme_file_path( '/svg/$0.svg' ); ?>",
],
"description": "Include SVG icon"
},
"Lazyload image": {
"prefix": "lazy",
"body": [
"<?php vanilla_lazyload_tag( $$image['ID'] ); ?>",
],
"description": "Echo HTML"
},
"Title": {
"prefix": "title",
"body": [
"<$1><?php echo esc_html( $2 ); ?></$1>",
],
"description": "Do a title"
},
"CTA button": {
"prefix": "cta",
"body": [
"<a href=\"$1\" class=\"button $2\" ><?php echo esc_html( $3 ); ?></a>",
],
"description": "Do a cta button"
},
"PHP wrap": {
"prefix": "php",
"body": [
"<?php $0 ?>",
],
"description": "Wrap in php tags"
},
"New block": {
"prefix": "block",
"body": [
"<section class=\"block block-$1\">",
" <div class=\"container\">",
"$0",
" </div>",
"</section>",
]
},
"Posts loop": {
"prefix": "posts",
"body": [
"<?php if ( $$1->have_posts() ) : ?>",
" <?php while ( $$1->have_posts() ) : $$1->the_post(); ?>",
" $0",
" <?php endwhile; ?>",
" <?php wp_reset_postdata(); ?>",
"<?php endif; ?>",
]
},
"Posts loop with cols": {
"prefix": "posts_cols",
"body": [
"<?php if ( $$1->have_posts() ) : ?>",
"",
" <div class=\"cols\">",
" <?php while ( $$1->have_posts() ) : $$1->the_post(); ?>",
"",
" <div class=\"col col-$2\">",
" $0",
" </div>",
"",
" <?php endwhile; ?>",
" </div>",
" <?php wp_reset_postdata(); ?>",
"",
"<?php endif; ?>",
]
},
"Cols loop": {
"prefix": "cols",
"body": [
" <$1 class=\"cols\">",
" <?php foreach ( $$3 as $$4 ) : ?>",
"",
" <$2 class=\"col col-$5\">",
" $0",
" </$2>",
"",
" <?php endforeach; ?>",
" </$1>",
]
}
}