Description
Return the value of the GLOBAL post's excerpt field setting it to the new valueUse this function in pairs to save and then reset the global value.
Usage
$string = bw_global_excerpt( $excerpt );Parameters
- $excerpt
- ( string ) optional – the new value that we want to set
Returns
string the previously stored valueSource
File name: oik/includes/bw_posts.phpLines:
1 to 9 of 9
function bw_global_excerpt( $excerpt=null ) { if ( isset( $GLOBALS['post'] )) { $excerpt_to_return = $GLOBALS['post']->post_excerpt; $GLOBALS['post']->post_excerpt = $excerpt; } else { $excerpt_to_return = null; } return( $excerpt_to_return ); }View on GitHub View on Trac
