Bläddra i källkod

:sparkles: added p2p relationships for events posts exhibitions

tags/0.9.0
j 5 år sedan
förälder
incheckning
a87bfce0fd
1 ändrade filer med 37 tillägg och 0 borttagningar
  1. 37
    0
      plugins/cia-post-types/includes/p2p-mappings.php

+ 37
- 0
plugins/cia-post-types/includes/p2p-mappings.php Visa fil

35
         'reciprocal' => true,
35
         'reciprocal' => true,
36
         'admin_box' => $admin_box
36
         'admin_box' => $admin_box
37
     ]);
37
     ]);
38
+    p2p_register_connection_type([
39
+        'name' => 'artists_to_posts',
40
+        'to' => 'artist',
41
+        'from' => 'post',
42
+        'reciprocal' => true,
43
+        'admin_box' => $admin_box
44
+    ]);
38
 
45
 
39
     p2p_register_connection_type([
46
     p2p_register_connection_type([
40
         'name' => 'episodes_to_exhibitions',
47
         'name' => 'episodes_to_exhibitions',
50
         'reciprocal' => true,
57
         'reciprocal' => true,
51
         'admin_box' => $admin_box
58
         'admin_box' => $admin_box
52
     ]);
59
     ]);
60
+    p2p_register_connection_type([
61
+        'name' => 'episodes_to_posts',
62
+        'to' => 'episode',
63
+        'from' => 'post',
64
+        'reciprocal' => true,
65
+        'admin_box' => $admin_box
66
+    ]);
67
+
68
+    p2p_register_connection_type([
69
+        'name' => 'events_to_exhibitions',
70
+        'to' => 'event',
71
+        'from' => 'exhibition',
72
+        'reciprocal' => true,
73
+        'admin_box' => $admin_box
74
+    ]);
75
+    p2p_register_connection_type([
76
+        'name' => 'events_to_posts',
77
+        'to' => 'event',
78
+        'from' => 'post',
79
+        'reciprocal' => true,
80
+        'admin_box' => $admin_box
81
+    ]);
82
+    
83
+    p2p_register_connection_type([
84
+        'name' => 'exhibitions_to_posts',
85
+        'to' => 'exhibition',
86
+        'from' => 'post',
87
+        'reciprocal' => true,
88
+        'admin_box' => $admin_box
89
+    ]);
53
 }
90
 }
54
 add_action( 'p2p_init', 'all_connection_types' );
91
 add_action( 'p2p_init', 'all_connection_types' );
55
 
92
 

Laddar…
Avbryt
Spara