PHP Class Cuztom_Meta

Since: 1.5
Author: Gijs Jorissen
Show file Open project: gizburdt/cuztom Class Usage Examples

Public Properties

Property Type Description
$callback
$data
$description
$fields
$id
$title

Public Methods

Method Description
__construct ( string | array $title ) Construct for all meta types, creates title (and description)
build ( array $data, $parent = null ) : array This array builds the complete array with the right key => value pairs
callback ( $object, object $data = [] ) : mixed Main callback for meta
edit_form_tag ( ) : mixed Adds multipart support to form
get_meta_type ( ) : string Check what kind of meta we're dealing with
is_accordion ( array $data ) : boolean Checks if the given array is an accordion
is_bundle ( array $data ) : boolean Checks if the given array is a bundle
is_meta_type ( $meta_type ) : string Check what kind of meta we're dealing with
is_tabs ( array $data ) : boolean Checks if the given array are tabs
save ( $object_id, $values ) Normal save method to save all the fields in a metabox Metabox and User Meta rely on this method

Method Details

__construct() public method

Construct for all meta types, creates title (and description)
Since: 1.6.4
Author: Gijs Jorissen
public __construct ( string | array $title )
$title string | array

build() public method

This array builds the complete array with the right key => value pairs
Since: 1.1
Author: Gijs Jorissen
public build ( array $data, $parent = null ) : array
$data array
return array

callback() public method

Main callback for meta
Since: 0.2
Author: Gijs Jorissen
public callback ( $object, object $data = [] ) : mixed
$data object
return mixed

edit_form_tag() static public method

Adds multipart support to form
Since: 0.2
Author: Gijs Jorissen
static public edit_form_tag ( ) : mixed
return mixed

get_meta_type() public method

Check what kind of meta we're dealing with
Since: 1.5
Author: Gijs Jorissen
public get_meta_type ( ) : string
return string

is_accordion() static public method

Checks if the given array is an accordion
Since: 1.3
Author: Gijs Jorissen
static public is_accordion ( array $data ) : boolean
$data array
return boolean

is_bundle() static public method

Checks if the given array is a bundle
Since: 1.3
Author: Gijs Jorissen
static public is_bundle ( array $data ) : boolean
$data array
return boolean

is_meta_type() public method

Check what kind of meta we're dealing with
Since: 2.3
Author: Gijs Jorissen
public is_meta_type ( $meta_type ) : string
return string

is_tabs() static public method

Checks if the given array are tabs
Since: 1.3
Author: Gijs Jorissen
static public is_tabs ( array $data ) : boolean
$data array
return boolean

save() public method

Normal save method to save all the fields in a metabox Metabox and User Meta rely on this method
Since: 2.6
Author: Gijs Jorissen
public save ( $object_id, $values )

Property Details

$callback public property

public $callback

$data public property

public $data

$description public property

public $description

$fields public property

public $fields

$id public property

public $id

$title public property

public $title