PHP Class WDS_CMB2_Attached_Posts_Field

Afficher le fichier Open project: webdevstudios/cmb2-attached-posts Class Usage Examples

Protected Properties

Свойство Type Description
$single_instance WDS_CMB2_Attached_Posts_Field

Méthodes publiques

Méthode Description
get_instance ( ) : WDS_CMB2_Attached_Posts_Field Creates or returns an instance of this class.
render ( $field, $escaped_value, $object_id, $object_type, $field_type ) Add a CMB custom field to allow for the selection of multiple posts attached to a single page
sanitize ( $sanitized_val, $val )

Méthodes protégées

Méthode Description
__construct ( ) Initialize the plugin by hooking into CMB2
display_attached ( $field, $attached ) Helper function to grab and filter our post meta
setup_admin_scripts ( ) Enqueue admin scripts for our attached posts field

Method Details

__construct() protected méthode

Initialize the plugin by hooking into CMB2
protected __construct ( )

display_attached() protected méthode

Helper function to grab and filter our post meta
protected display_attached ( $field, $attached )

get_instance() public static méthode

Creates or returns an instance of this class.
Since: 0.1.0
public static get_instance ( ) : WDS_CMB2_Attached_Posts_Field
Résultat WDS_CMB2_Attached_Posts_Field A single instance of this class.

render() public méthode

Add a CMB custom field to allow for the selection of multiple posts attached to a single page
public render ( $field, $escaped_value, $object_id, $object_type, $field_type )

sanitize() public méthode

public sanitize ( $sanitized_val, $val )

setup_admin_scripts() protected méthode

Enqueue admin scripts for our attached posts field
protected setup_admin_scripts ( )

Property Details

$single_instance protected_oe static_oe property

protected static WDS_CMB2_Attached_Posts_Field $single_instance
Résultat WDS_CMB2_Attached_Posts_Field