Class CMB2_Base
CMB2 Base - Base object functionality.
Direct known subclasses
Indirect known subclasses
Package: CMB2
Category: WordPress_Plugin
License: GPL-2.0+
Author: CMB2 team
Link: https://cmb2.io
Located at includes/CMB2_Base.php
Methods summary
public
|
|
public
integer
|
|
public
string
|
|
public
string
|
|
public
mixed
|
|
public
mixed
|
|
protected
array
|
#
get_default_args( array $field_args,
Get default field arguments specific to this CMB2 object. |
protected
|
#
get_new_field( array $field_args,
Get a new field object specific to this CMB2 object. |
public
boolean
|
|
public
|
|
public
mixed
|
#
get_param_callback_result( string $param )
Store results of the param callbacks for continual access |
public
|
|
protected
mixed
|
#
do_callback( callable $cb, mixed $additional_params = null )
Handles the parameter callbacks, and passes this object as parameter. |
public
mixed
|
|
public
null|boolean
|
#
maybe_hook_parameter( string $hook_name, boolean $val = null, string $hook_function = 'add_filter' )
Checks if this object has parameter corresponding to the given filter which is callable. If so, it registers the callback, and if not, converts the maybe-modified $val to a boolean for return. |
public static
null|boolean
|
#
maybe_hook( boolean $val, string $hook_name, string $hook_function )
Checks if given value is callable, and registers the callback. If is non-callable, converts the $val to a boolean for return. |
protected
|
#
deprecated_param( string $function, string $version, string $message = null )
Mark a param as deprecated and inform when it has been used. |
public
mixed
|
|
public
mixed
|
Constants summary
integer |
DEPRECATED_PARAM
The deprecated_param method deprecated param message signature. |
#
1
|
integer |
DEPRECATED_CB_PARAM
The deprecated_param method deprecated callback param message signature. |
#
2
|
Properties summary
protected
string
|
$cmb_id
Current CMB2 instance ID |
#
''
|
protected
string
|
$properties_name
The object properties name. |
#
'meta_box'
|
protected
mixed
|
$object_id
Object ID |
#
0
|
protected
string
|
$object_type
Type of object being handled. (e.g., post, user, comment, or term) |
#
''
|
public
array
|
$data_to_save
Array of key => value data for saving. Likely $_POST data. |
#
array()
|
protected
array
|
$callback_results
Array of field param callback results |
#
array()
|
Magic properties
public read-only
|
$args
The objects array of properties/arguments. |
public read-only
|
$meta_box
The objects array of properties/arguments. |
public read-only
|
$properties
The objects array of properties/arguments. |
public read-only
|
$cmb_id
Current CMB2 instance ID |
public read-only
|
$object_id
Object ID |
public read-only
|
$object_type
Type of object being handled. (e.g., post, user, comment, or term) |