Custom_Fields_Provider
Table of Contents
- flatten_fields() : array<string|int, mixed>
 - Formats the list of registered custom fields to an array compatible with the fields editor.
 - get_field_display_value() : mixed
 - Returns the human readable value of a given option of a field.
 - get_field_value() : mixed
 - Returns the value of a custom field.
 - get_fields() : array<string|int, mixed>
 - Returns a list of all registered custom fields.
 - get_provider_name() : string
 - Returns the name of the provider.
 - get_supported_types() : array<string|int, mixed>
 - Returns a list of supported field types.
 - is_registered() : bool
 - Determine if the provider is registered.
 
Methods
flatten_fields()
Formats the list of registered custom fields to an array compatible with the fields editor.
    public
                flatten_fields(array<string|int, mixed> $fields) : array<string|int, mixed>
    
        Parameters
- $fields : array<string|int, mixed>
 - 
                    
list of fields to flatten and format.
 
Return values
array<string|int, mixed> —get_field_display_value()
Returns the human readable value of a given option of a field.
    public
                get_field_display_value(string $meta_key, string $option) : mixed
    
        Parameters
- $meta_key : string
 - $option : string
 
Return values
mixed —get_field_value()
Returns the value of a custom field.
    public
                get_field_value(string $meta_key, string|int $post_id) : mixed
    
        Parameters
- $meta_key : string
 - $post_id : string|int
 
Return values
mixed —get_fields()
Returns a list of all registered custom fields.
    public
                get_fields([bool $flattened = true ]) : array<string|int, mixed>
    
        Parameters
- $flattened : bool = true
 - 
                    
flattened by default
 
Return values
array<string|int, mixed> —get_provider_name()
Returns the name of the provider.
    public
                get_provider_name() : string
    
    
    
        Return values
string —get_supported_types()
Returns a list of supported field types.
    public
                get_supported_types() : array<string|int, mixed>
    
    
    
        Return values
array<string|int, mixed> —is_registered()
Determine if the provider is registered.
    public
                is_registered() : bool