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
| <?php
| // /content/support.php
|
| 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,
| ],
| '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'
| // ]
| // ],
| // ];
| //}
|
|