Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- add_action( 'mb_relationships_init', 'ec_block1' );
- function ec_block1() {
- MB_Relationships_API::register( [
- 'id' => 'event-to-course-relationship',
- 'from' => [
- 'object_type' => 'post',
- 'post_type' => 'events',
- 'empty_message' => 'Choose an event',
- 'field' => [
- 'name' => 'From Events to Courses',
- 'query_args' => [
- '0p3oe36ob0b' => [
- 'id' => '0p3oe36ob0b',
- 'key' => 'taxonomy',
- 'value' => 'post_tag',
- ],
- '8yfo25qwixm' => [
- 'id' => '8yfo25qwixm',
- 'key' => 'terms',
- 'value' => '2022',
- ],
- 'yze1cekjc0r' => [
- 'id' => 'yze1cekjc0r',
- 'key' => 'taxonomy',
- 'value' => 'event-category',
- ],
- 'hesfz0dkrnt' => [
- 'id' => 'hesfz0dkrnt',
- 'key' => 'terms',
- 'value' => 'qualitative-research-summer-intensive',
- ],
- ],
- ],
- ],
- 'to' => [
- 'object_type' => 'post',
- 'post_type' => 'course',
- 'empty_message' => 'Choose a course',
- 'field' => [
- 'name' => 'To Course from Events',
- ],
- ],
- ] );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement