You appear to be a bot. Output may be restricted
Description
Register a field named $field_name for object type $object_type
Usage
bw_register_field_for_object_type( $field_name, $object_type, $rest );
Parameters
- $field_name
- ( string ) required – meta_key of the field – precede with an underscore so it's not in custom fields
- $object_type
- ( string ) required – object type
- $rest
- ( bool ) optional – true for fields to be available to the REST api
Returns
voidTO DO
determine if this works for "taxonomy" field types as wellSource
File name: oik/includes/bw_register.phpLines:
1 to 8 of 8
function bw_register_field_for_object_type( $field_name, $object_type, $rest=false ) { global $bw_mapping; $bw_mapping['field'][$object_type][$field_name] = $field_name; $bw_mapping['type'][$field_name][$object_type] = $object_type; if ( $rest ) { bw_maybe_register_post_meta( $field_name, $object_type ); } }View on GitHub View on Trac