You appear to be a bot. Output may be restricted
Description
Check if the post_type is mentioned in post_types
Usage
$bool = bw_check_noderef_types( $post_types, $post_type );
Parameters
- $post_types
- ( array/string ) required – an array of post types or a single post type
- $post_type
- ( string ) required – a single post type name
Returns
bool true if the post type is mentionedSource
File name: oik-fields/shortcodes/oik-related.phpLines:
1 to 10 of 10
function bw_check_noderef_types( $post_types, $post_type ) { //bw_trace2(); if ( is_array( $post_types ) ) { $found = bw_array_get( $post_types, $post_type, false ); } else { $found = ( $post_types == $post_type ); } bw_trace2( $found, "post type found?" ); return( $found ); }View on GitHub