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