Description
Load an array of node references – for hierarchical post types
Usage
bw_load_noderef2( $args );Parameters
- $args
- ( string/array ) required – array of args containing the #type of the node to load Note: #type may also be an array of post_types
Returns
voidSource
File name: oik/includes/bw_noderef2.phpLines:
1 to 20 of 20
function bw_load_noderef2( $args ) { oik_require( "includes/bw_posts.php" ); $post_types = array(); $post_type = bw_array_get( $args, '#type', $args ); if ( is_array( $post_type ) ) { $post_types = $post_type; } else { $post_types[] = $post_type; } $options = array(); foreach ( $post_types as $post_type ) { if ( is_post_type_hierarchical( $post_type ) ) { $options += bw_load_noderef2_hier( $post_type, $args ); } else { $options += bw_load_noderef2_flat( $post_type, $args ); } } return( $options ); }View on GitHub View on Trac
Invoked by
Calls
1 to 4 of 4
