Advertisement
mozzarellathicc

Untitled

Mar 23rd, 2022
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. <?php
  2. add_action( 'mb_relationships_init', 'ec_block1' );
  3.  
  4. function ec_block1() {
  5. MB_Relationships_API::register( [
  6. 'id' => 'event-to-course-relationship',
  7. 'from' => [
  8. 'object_type' => 'post',
  9. 'post_type' => 'events',
  10. 'empty_message' => 'Choose an event',
  11. 'field' => [
  12. 'name' => 'From Events to Courses',
  13. 'query_args' => [
  14. '0p3oe36ob0b' => [
  15. 'id' => '0p3oe36ob0b',
  16. 'key' => 'taxonomy',
  17. 'value' => 'post_tag',
  18. ],
  19. '8yfo25qwixm' => [
  20. 'id' => '8yfo25qwixm',
  21. 'key' => 'terms',
  22. 'value' => '2022',
  23. ],
  24. 'yze1cekjc0r' => [
  25. 'id' => 'yze1cekjc0r',
  26. 'key' => 'taxonomy',
  27. 'value' => 'event-category',
  28. ],
  29. 'hesfz0dkrnt' => [
  30. 'id' => 'hesfz0dkrnt',
  31. 'key' => 'terms',
  32. 'value' => 'qualitative-research-summer-intensive',
  33. ],
  34. ],
  35. ],
  36. ],
  37. 'to' => [
  38. 'object_type' => 'post',
  39. 'post_type' => 'course',
  40. 'empty_message' => 'Choose a course',
  41. 'field' => [
  42. 'name' => 'To Course from Events',
  43. ],
  44. ],
  45. ] );
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement