function jksnippets_create_snippet_post_type() { $postType = new PostType(); $postType->name = 'jksnippet'; $postType->urlSlug = 'snippet'; $postType->labelPlural = 'Snippets'; $postType->labelSingular = 'Snippet'; $postType->iconCSSContent = '\\f475'; $postType->supports = array('title', 'page-attributes'); $postType->addCustomField(['label' => 'Snippet', 'name' => 'snippet', 'type' => 'textarea', 'sanitize' => 'none']); $postType->create(); }