Description
Adds a custom field definition.
Usage
<?php tcp_add_custom_field_def( $post_type, $id, $label, $type, $values, $desc ); ?>
Parameters
- $post_type
- (string) Post type to add this custom field definition
- $id
- (string) A unique identifier. This value will be used to get/set the value using the WordPress API update_postmeta/delete_postmeta functions
- $label
- (string) The label of the custom field
- $type
- (string) Possible values: string/numeric/list
- $values
- (string) For fields of type ‘list’ it’s a string separated by comma.
- $desc
- (string) A description. This value is used in the post editor to describe the custom field.
Examples
Since/
1.1.0
Related
Related
tcp_get_custom_fields_def | tcp_get_custom_fields | tcp_delete_custom_field_def | tcp_exists_custom_field_def | tcp_display_custom_fields