Description
Themes an object's property.If the field type is not defined then it's probably a post object's property.
Usage
bw_theme_object_property( $post_id, $value, $atts );Parameters
- $post_id
- ( mixed ) required –
- $value
- ( mixed ) required –
- $atts
- ( mixed ) optional –
Returns
voidTO DO
Decide if it's OK to display the post_password field.Source
File name: oik/libs/bw_fields.phpLines:
1 to 14 of 14
function bw_theme_object_property( $post_id, $value, $atts=null ) { $post = get_post( $post_id ); if ( $post ) { //bw_trace2( $post, "post"); if ( property_exists( $post, $value ) ) { $field_value = $post->$value ; bw_theme_field( $value, $field_value, $atts ); } elseif ( property_exists( $post, "post_$value" ) ) { $field_name = "post_" . $value; $field_value = $post->$field_name; bw_theme_field( $field_name, $field_value, $atts ); } } }View on GitHub View on Trac
