@@ 415-434 (lines=20) @@ | ||
412 | ||
413 | $ignore = array( 'attachment', 'revision', 'nav_menu_item' ); |
|
414 | ||
415 | foreach ( $post_types as $post_type => $label ) { |
|
416 | if ( in_array( $post_type, $ignore ) || empty( $post_type ) ) { |
|
417 | unset( $post_types[ $post_type ] ); |
|
418 | ||
419 | continue; |
|
420 | } |
|
421 | elseif ( 0 === strpos( $post_type, '_pods_' ) && apply_filters( 'pods_pick_ignore_internal', true ) ) { |
|
422 | unset( $post_types[ $post_type ] ); |
|
423 | ||
424 | continue; |
|
425 | } |
|
426 | ||
427 | $post_type = get_post_type_object( $post_type ); |
|
428 | ||
429 | self::$related_objects[ 'post_type-' . $post_type->name ] = array( |
|
430 | 'label' => $post_type->label . ' (' . $post_type->name . ')', |
|
431 | 'group' => __( 'Post Types', 'pods' ), |
|
432 | 'bidirectional' => true |
|
433 | ); |
|
434 | } |
|
435 | ||
436 | // Taxonomies |
|
437 | $taxonomies = get_taxonomies(); |
|
@@ 442-469 (lines=28) @@ | ||
439 | ||
440 | $ignore = array( 'nav_menu', 'post_format' ); |
|
441 | ||
442 | foreach ( $taxonomies as $taxonomy => $label ) { |
|
443 | if ( in_array( $taxonomy, $ignore ) || empty( $taxonomy ) ) { |
|
444 | unset( $taxonomies[ $taxonomy ] ); |
|
445 | ||
446 | continue; |
|
447 | } |
|
448 | ||
449 | /** |
|
450 | * Prevent ability to extend core Pods content types. |
|
451 | * |
|
452 | * @param bool. Default is true, when set to false Pods internal content types can not be extended. |
|
453 | * |
|
454 | * @since 2.3.19 |
|
455 | */ |
|
456 | elseif ( 0 === strpos( $taxonomy, '_pods_' ) && apply_filters( 'pods_pick_ignore_internal', true ) ) { |
|
457 | unset( $taxonomies[ $taxonomy ] ); |
|
458 | ||
459 | continue; |
|
460 | } |
|
461 | ||
462 | $taxonomy = get_taxonomy( $taxonomy ); |
|
463 | ||
464 | self::$related_objects[ 'taxonomy-' . $taxonomy->name ] = array( |
|
465 | 'label' => $taxonomy->label . ' (' . $taxonomy->name . ')', |
|
466 | 'group' => __( 'Taxonomies', 'pods' ), |
|
467 | 'bidirectional' => true |
|
468 | ); |
|
469 | } |
|
470 | ||
471 | // Other WP Objects |
|
472 | self::$related_objects[ 'user' ] = array( |