PHP Класс WDS_CMB2_Attached_Posts_Field

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$single_instance WDS_CMB2_Attached_Posts_Field

Открытые методы

Метод Описание
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 )

Защищенные методы

Метод Описание
__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

Описание методов

__construct() защищенный Метод

Initialize the plugin by hooking into CMB2
protected __construct ( )

display_attached() защищенный Метод

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

get_instance() публичный статический Метод

Creates or returns an instance of this class.
С версии: 0.1.0
public static get_instance ( ) : WDS_CMB2_Attached_Posts_Field
Результат WDS_CMB2_Attached_Posts_Field A single instance of this class.

render() публичный Метод

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 sanitize ( $sanitized_val, $val )

setup_admin_scripts() защищенный Метод

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

Описание свойств

$single_instance защищенное статическое свойство

protected static WDS_CMB2_Attached_Posts_Field $single_instance
Результат WDS_CMB2_Attached_Posts_Field