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
| <?php
| // /taxonomies/target.php
|
| use JVBase\registrar\Registrar;
| if (!defined('ABSPATH')) {
| exit;
| }
|
|
| add_action('jvbDefineRegistrar', 'altr_person');
| add_action('jvbDefineRegistrarFields', 'altr_person_fields');
|
| add_action('plugins_loaded', 'altr_person',1);
| //Add fields later so we can verify taxonomies/post types exist
| add_action('plugins_loaded', 'altr_person_fields', 2);
|
| function altr_person(){
| if (!class_exists('JVBase\registrar\Registrar')) {
| return;
| }
| $person = Registrar::forTerm('person', 'Person', 'People')
| ->setIcon('user')
| ->make([
| 'public' => false,
| 'show_ui' => true,
| 'for' => [
| 'progress',
| ],
| 'show_admin_column' => true
| ]);
|
| //$directory = $person->getConfig('directory');
|
| }
|
| function altr_person_fields():void
| {
| if (!class_exists('JVBase\registrar\Registrar')) {
| return;
| }
| $person = Registrar::getInstance('person');
|
| $fields = $person->fields();
| }
|
| //
| //function altr_person():array
| //{
| // return [
| // 'singular' => 'Person',
| // 'plural' => 'People',
| // 'icon' => 'user',
| // 'show_feed' => false,
| // 'public' => false,
| // 'show_ui' => true,
| // 'hierarchical' => false,
| // 'for_content' => [
| // 'progress',
| // ],
| // 'fields' => [
| // 'term_name' => [
| // 'label' => 'Name',
| // 'type' => 'text',
| // 'quickEdit' => true,
| // ]
| // ]
| // ];
| //}
|
|