Description
Load an array of node references
Usage
bw_load_noderef( $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_metadata.phpLines:
1 to 25 of 25
function bw_load_noderef( $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 ( $post_type !== "attachment" ) { $args['post_parent'] = 0; } else { unset( $args['post_parent'] ); } $args['post_type'] = $post_type; $args['exclude'] = -1; bw_trace2( $args, "args", false ); $posts = bw_get_posts( $args ); $options += bw_post_array( $posts ); } return( $options ); }View on GitHub View on Trac
Called by
Invoked by
Calls
1 to 4 of 4
