PHP Класс CMB2_Post_Search_field

Custom field for CMB2 which adds a post-search dialog for searching/attaching other post IDs
С версии: 0.2.4
Автор: WebDevstudios ([email protected])
Показать файл Открыть проект Примеры использования класса

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

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

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

Метод Описание
add_find_posts_div ( ) Add the find posts div via a hook so we can relocate it manually
ajax_find_posts ( ) Check to see if we have a post type set and, if so, add the pre_get_posts action to set the queried post type
get_instance ( ) : CMB2_Post_Search_field Creates or returns an instance of this class.
has_post_search_text_field ( $fields )
render_field ( $field, $escaped_value, $object_id, $object_type, $field_type )
render_js ( $cmb_id, $object_id, $object_type, $cmb )
set_post_type ( array $query ) Set the post type via pre_get_posts

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

Метод Описание
__construct ( )

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

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

protected __construct ( )

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

Add the find posts div via a hook so we can relocate it manually
public add_find_posts_div ( )

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

Check to see if we have a post type set and, if so, add the pre_get_posts action to set the queried post type
public ajax_find_posts ( )

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

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

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

public has_post_search_text_field ( $fields )

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

public render_field ( $field, $escaped_value, $object_id, $object_type, $field_type )

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

public render_js ( $cmb_id, $object_id, $object_type, $cmb )

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

Set the post type via pre_get_posts
public set_post_type ( array $query )
$query array The query instance

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

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

protected static $single_instance