You appear to be a bot. Output may be restricted
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 23 of 23
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; $posts = bw_get_posts( $args ); $options += bw_post_array( $posts ); } return( $options ); }View on GitHub View on Trac