PHP Класс VideoPress_Edit_Attachment, jetpack

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

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

Метод Описание
__construct ( ) VideoPress_Edit_Attachment constructor.
configure_meta_boxes ( string $post_type = 'unknown', object $post = NULL )
fields_to_edit ( array $fields, stdClass $post ) : array Creates an array of video fields to edit based on transcoded videos.
init ( ) : VideoPress_Edit_Attachment Singleton method to initialize the object only once.
make_video_api_path ( string $guid ) : string Get the upload api path.
save_fields ( array $post, array | null $attachment = null ) : array
videopress_information_box ( stdClass $post )

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

Метод Описание
display_embed_choice ( object $info ) : string Build HTML to display a form checkbox for embedcode display preference
display_rating ( object $info ) : string Build HTML to display a form input radio button for video ratings

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

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

Adds in appropriate actions for attachment fields editor, meta boxes and saving.
public __construct ( )

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

public configure_meta_boxes ( string $post_type = 'unknown', object $post = NULL )
$post_type string
$post object

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

Build HTML to display a form checkbox for embedcode display preference
protected display_embed_choice ( object $info ) : string
$info object database row from the videos table
Результат string input element of type checkbox set to checked state based on stored embed preference

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

Build HTML to display a form input radio button for video ratings
protected display_rating ( object $info ) : string
$info object database row from the videos table
Результат string input elements of type radio with existing stored value selected

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

Creates an array of video fields to edit based on transcoded videos.
public fields_to_edit ( array $fields, stdClass $post ) : array
$fields array video fields of interest
$post stdClass post object
Результат array modified version of video fields for administrative interface display

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

Singleton method to initialize the object only once.
public static init ( ) : VideoPress_Edit_Attachment
Результат VideoPress_Edit_Attachment

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

Get the upload api path.
public make_video_api_path ( string $guid ) : string
$guid string
Результат string

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

public save_fields ( array $post, array | null $attachment = null ) : array
$post array
$attachment array | null
Результат array

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

public videopress_information_box ( stdClass $post )
$post stdClass