PHP Class RWMB_Helper

Mostra file Open project: rilwis/meta-box Class Usage Examples

Public Methods

Method Description
find_field ( string $field_id, integer $post_id = null ) : array | false Find field by field ID.
hash_fields ( string $post_type ) Hash all fields into an indexed array for search
meta ( string $key, array $args = [], integer | null $post_id = null ) : mixed Get post meta

Method Details

find_field() public static method

This function finds field in meta boxes registered by 'rwmb_meta_boxes' filter.
public static find_field ( string $field_id, integer $post_id = null ) : array | false
$field_id string Field ID
$post_id integer
return array | false Field params (array) if success. False otherwise.

hash_fields() public static method

Hash all fields into an indexed array for search
public static hash_fields ( string $post_type )
$post_type string Post type

meta() public static method

Get post meta
public static meta ( string $key, array $args = [], integer | null $post_id = null ) : mixed
$key string Meta key. Required.
$args array Array of arguments. Optional.
$post_id integer | null Post ID. null for current post. Optional
return mixed