Description
Return true if the current post is of the selected $post_type
Usage
$bool = oikth_check_post_type( $test_post_type );Parameters
- $test_post_type
- ( string ) optional default: oik_themiumversion – post type to check for
Returns
bool true if the current post IS of this type, false in all other casesSource
File name: oik-themes/oik-themes.phpLines:
1 to 11 of 11
function oikth_check_post_type( $test_post_type="oik_themiumversion" ) { //bw_trace2( $pagenow, "pagenow" ); $post_id = bw_array_get( $_REQUEST, "post_id", null ); if ( $post_id ) { $post_type = get_post_type( $post_id ); $result = $post_type == $test_post_type ; } else { $result = false; } return( $result ); }View on GitHub
Invoked by
Calls
Call hooks
API Letters:
