Description
Create fields in the meta box to accept data for the fieldsThis should not display 'taxonomy' fields as they appear in their own metaboxes.
Usage
bw_effort_box( $post, $args );Parameters
- $post
- ( post ) required – the post object
- $args
- ( array ) required – contains 'args' – array of fields to display
Returns
voidTO DO
Similarly 'virtual' fields should not have their values loaded using get_post_meta()TO DO
Worry about Fields metaboxes which don't have any fields simply because they're all (custom) taxonomiesSource
File name: oik/includes/bw_metadata.phpLines:
1 to 20 of 20
function bw_effort_box( $post, $args ) { global $bw_fields; $fields = $args['args']; //bw_trace2( $fields ); //sdiv( "panel-wrap" ); stag( 'table', "form-table" ); foreach ( $fields as $field ) { $data = bw_array_get( $bw_fields, $field, null); //bw_trace2( $field ); $metabox_field =( null === $data ) ? null : bw_check_metabox_field( $data ); if ( $metabox_field ) { $multiple = bw_array_get( $data['#args'], "#multiple", false ); $value = get_post_meta( $post->ID, $field, !$multiple ); bw_form_field( $field, $data['#field_type'], $data['#title'], $value, $data['#args'] ); } } etag( "table" ); //ediv(); echo( bw_ret()); }View on GitHub View on Trac
Called by
1 to 2 of 2
Invoked by
Calls
1 to 6 of 6
- bw_array_get() – Return the array[index] or array->index (for an object) or a default value if not set
- bw_check_metabox_field() – Check if the field should be displayed in the metabox
- bw_form_field() – Display a field in a form for the user to enter/choose a value
- bw_ret() – Use bw_ret() to return the contents of $bwecho, leaving the global value as NULL
- etag() – Output an end tag
- stag() – Output an HTML opening tag
