Skip to content

Commit 4bc780e

Browse files
author
Doğa Gürdal
committed
feat(snippets/json): add custom post type config snippet
1 parent 5d5a5dd commit 4bc780e

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

snippets/json.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,5 +428,35 @@
428428
"\t\"endpoint\": ${5:false}",
429429
"}"
430430
]
431+
},
432+
"Custom Post Type Config": {
433+
"prefix": "flyntCustomPostTypeConfig",
434+
"body": [
435+
"{",
436+
"\t\"label\": \"${1:${TM_DIRECTORY/.*\\/(.+)$/${1:/capitalize}s/}}\",",
437+
"\t\"singular_label\": \"${2:${TM_DIRECTORY/.*\\/(.+)$/${1:/capitalize}/}}\",",
438+
"\t\"description\": \"$3\",",
439+
"\t\"public\": ${4|true,false|},",
440+
"\t\"has_archive\": ${5|true,false|},",
441+
"\t\"supports\": [",
442+
"\t\t\"title\",",
443+
"\t\t\"revisions\"",
444+
"\t],",
445+
"\t\"labels\": {",
446+
"\t\t\"menu_name\": \"$1\",",
447+
"\t\t\"all_items\": \"All $1\",",
448+
"\t\t\"add_new\": \"New $2\",",
449+
"\t\t\"add_new_item\": \"Add New $2\",",
450+
"\t\t\"edit\": \"Edit $2\",",
451+
"\t\t\"edit_item\": \"Edit $2\",",
452+
"\t\t\"new_item\": \"New $2\",",
453+
"\t\t\"view_item\": \"Show $2\",",
454+
"\t\t\"search_items\": \"Search $1\",",
455+
"\t\t\"not_found\": \"No $2 Found\",",
456+
"\t\t\"not_found_in_trash\": \"No $1 Found In Trash\"",
457+
"\t},",
458+
"\t\"menu_icon\": \"dashicons-${6:admin-generic}\"",
459+
"}"
460+
]
431461
}
432462
}

0 commit comments

Comments
 (0)