You appear to be a bot. Output may be restricted
Description
Sets/returns the current post ID.When processing nested posts we need to determine the current post_id rather than the global post id So we provide a routine to set/query the current post id
Usage
$ID = bw_current_post_id( $id );
Parameters
- $id
- ( ID/null ) optional – ID to set for the current post ID, if this is reset to 0 then we revert to using the bw_global_post_id()
Returns
ID the value of the current post, if set.Source
File name: oik/libs/bobbfunc.phpLines:
1 to 11 of 11
function bw_current_post_id( $id=null ) { static $current_post_id = null; if ( $id !== null ) { $current_post_id = $id; } if ( !$current_post_id ) { return( bw_global_post_id() ); } //bw_trace2( $current_post_id, "current_post_id", true ); return( $current_post_id ); }View on GitHub View on Trac