You appear to be a bot. Output may be restricted
Description
Return a noderef ID from a postTemporary fix: if the $value is an object then we've got it wrong creating it. Try to extract the ID. If this fails to get the ID then don't worry. Something else might go wrong later.
Usage
$ID = bw_get_noderef_id( $value );
Parameters
- $value
- ( mixed ) required –
Returns
ID we hope we can return the ID of the objectSource
File name: oik/includes/bw_metadata.phpLines:
1 to 8 of 8
function bw_get_noderef_id( $value ) { if ( is_object( $value ) ) { if ( property_exists( $value, "ID" ) ) { $value = $value->ID; } } return( $value ); }View on GitHub View on Trac