| | |
| | | <?php |
| | | // /content/support.php |
| | | function ajv_support(): array |
| | | { |
| | | return [ |
| | | 'singular' => 'Support', |
| | | 'plural' => 'Support', |
| | | 'hide_single' => false, |
| | | 'show_feed' => false, |
| | | 'icon' => 'question', |
| | | 'rewrite' => [ |
| | | 'slug' => 'support', |
| | | 'with_front' => false, |
| | | ], |
| | | 'fields' => [ |
| | | 'post_title' => [ |
| | | 'type' => 'text', |
| | | 'label' => 'Title', |
| | | |
| | | use JVBase\registrar\Registrar; |
| | | |
| | | if (!defined('ABSPATH')) { |
| | | exit; |
| | | } |
| | | |
| | | |
| | | add_action('plugins_loaded', 'ajv_support',1); |
| | | |
| | | //add_filter('ajv_SupportSchemaDefault', 'ajv_support_schema'); |
| | | //add_filter('ajv_SupportMetaDefault', 'ajv_support_meta'); |
| | | //add_filter('ajv_SupportArchiveDefault', 'ajv_support_archive'); |
| | | |
| | | function ajv_support(){ |
| | | if (!class_exists('JVBase\registrar\Registrar')) { |
| | | return; |
| | | } |
| | | $support = Registrar::forPost('support', 'Support', 'Supports') |
| | | ->setIcon('question') |
| | | ->make([ |
| | | 'rewrite' => [ |
| | | 'slug' => 'support', |
| | | 'with_front' => false, |
| | | ], |
| | | 'post_content' => [ |
| | | 'type' => 'textarea', |
| | | 'quill' => true, |
| | | 'label' => 'Content' |
| | | ] |
| | | ], |
| | | ]; |
| | | } |
| | | 'public' => false, |
| | | 'taxonomies' => [] |
| | | ]); |
| | | } |
| | | //function ajv_support(): array |
| | | //{ |
| | | // return [ |
| | | // 'singular' => 'Support', |
| | | // 'plural' => 'Support', |
| | | // 'hide_single' => false, |
| | | // 'show_feed' => false, |
| | | // 'icon' => 'question', |
| | | // 'public' => false, |
| | | // 'rewrite' => [ |
| | | // 'slug' => 'support', |
| | | // 'with_front' => false, |
| | | // ], |
| | | // 'fields' => [ |
| | | // 'post_title' => [ |
| | | // 'type' => 'text', |
| | | // 'label' => 'Title', |
| | | // ], |
| | | // 'post_content' => [ |
| | | // 'type' => 'textarea', |
| | | // 'quill' => true, |
| | | // 'label' => 'Content' |
| | | // ] |
| | | // ], |
| | | // ]; |
| | | //} |