@@ 596-611 (lines=16) @@ | ||
593 | * @return array Simple object names |
|
594 | * @since 2.3 |
|
595 | */ |
|
596 | public function simple_objects () { |
|
597 | if ( $this->setup_related_objects() || null === self::$names_simple ) { |
|
598 | $simple_objects = array(); |
|
599 | ||
600 | foreach ( self::$related_objects as $object => $related_object ) { |
|
601 | if ( !isset( $related_object[ 'simple' ] ) || !$related_object[ 'simple' ] ) |
|
602 | continue; |
|
603 | ||
604 | $simple_objects[] = $object; |
|
605 | } |
|
606 | ||
607 | self::$names_simple = (array) apply_filters( 'pods_form_ui_field_pick_simple_objects', $simple_objects ); |
|
608 | } |
|
609 | ||
610 | return self::$names_simple; |
|
611 | } |
|
612 | ||
613 | /** |
|
614 | * Return available bidirectional object names |
|
@@ 619-634 (lines=16) @@ | ||
616 | * @return array Bidirectional object names |
|
617 | * @since 2.3.4 |
|
618 | */ |
|
619 | public function bidirectional_objects () { |
|
620 | if ( $this->setup_related_objects() || null === self::$names_bidirectional ) { |
|
621 | $bidirectional_objects = array(); |
|
622 | ||
623 | foreach ( self::$related_objects as $object => $related_object ) { |
|
624 | if ( !isset( $related_object[ 'bidirectional' ] ) || !$related_object[ 'bidirectional' ] ) |
|
625 | continue; |
|
626 | ||
627 | $bidirectional_objects[] = $object; |
|
628 | } |
|
629 | ||
630 | self::$names_bidirectional = (array) apply_filters( 'pods_form_ui_field_pick_bidirectional_objects', $bidirectional_objects ); |
|
631 | } |
|
632 | ||
633 | return self::$names_bidirectional; |
|
634 | } |
|
635 | ||
636 | /** |
|
637 | * Define the current field's schema for DB table storage |