PHP Класс VideoPress_Video, jetpack

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

Открытые свойства

Свойство Тип Описание
$age_rating integer Recommended minimum age of the viewer.
$blog_id integer WordPress.com blog identifier
$calculated_height integer Video height calculated based on original video dimensions and the requested maxwidth
$calculated_width integer Video width calculated based on original video dimensions and the requested maxwidth
$captions array Closed captions if available for the given video. Associative array of ISO 639-2 language code and a WebVTT URI
$description string Video description
$duration integer Video duration in whole seconds
$expires integer Expiration of the video expressed in Unix time
$guid string VideoPress unique identifier
$language string Text and audio language as ISO 639-2 language code
$maxwidth integer Maximum desired width.
$players stdClass Video player information
$post_id integer Remote blog attachment identifier
$poster_frame_uri string Poster frame image URI for the given video guid and calculated dimensions.
$restricted_embed boolean Video author has restricted video embedding or sharing
$skin array Video player skinning preferences including background color and watermark
$text_direction string Directionality of title text. ltr or rtl
$title string Video title
$version
$videos stdClass Video files associated with the given guid for the calculated dimensions.

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

Метод Описание
__construct ( $guid, $maxwidth = 640 ) Setup the object.
calculate_expiration ( $expires_header ) : integer | boolean Convert an Expires HTTP header value into Unix time for use in WP Cache
hostname ( string $url ) : boolean | string Extract the site's host domain for statistics and comparison against an allowed site list in the case of restricted embeds.

Приватные методы

Метод Описание
get_data ( ) : stdClass | WP_Error Request data from WordPress.com for the given guid, maxwidth, and calculated blog hostname.

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

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

Request video information from VideoPress servers and process the response.
С версии: 1.3
public __construct ( $guid, $maxwidth = 640 )

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

Convert an Expires HTTP header value into Unix time for use in WP Cache
С версии: 1.3
public static calculate_expiration ( $expires_header ) : integer | boolean
Результат integer | boolean Unix time or false

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

Extract the site's host domain for statistics and comparison against an allowed site list in the case of restricted embeds.
С версии: 1.2
public static hostname ( string $url ) : boolean | string
$url string absolute URL
Результат boolean | string host component of the URL, or false if none found

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

$age_rating публичное свойство

Recommended minimum age of the viewer.
С версии: 1.3
public int $age_rating
Результат integer

$blog_id публичное свойство

WordPress.com blog identifier
С версии: 1.5
public int $blog_id
Результат integer

$calculated_height публичное свойство

Video height calculated based on original video dimensions and the requested maxwidth
С версии: 1.3
public int $calculated_height
Результат integer

$calculated_width публичное свойство

Video width calculated based on original video dimensions and the requested maxwidth
С версии: 1.3
public int $calculated_width
Результат integer

$captions публичное свойство

Closed captions if available for the given video. Associative array of ISO 639-2 language code and a WebVTT URI
С версии: 1.5
public array $captions
Результат array

$description публичное свойство

Video description
С версии: 4.4
public string $description
Результат string

$duration публичное свойство

Video duration in whole seconds
С версии: 1.3
public int $duration
Результат integer

$expires публичное свойство

Expiration of the video expressed in Unix time
С версии: 1.3
public int $expires
Результат integer

$guid публичное свойство

VideoPress unique identifier
С версии: 1.3
public string $guid
Результат string

$language публичное свойство

Text and audio language as ISO 639-2 language code
С версии: 1.3
public string $language
Результат string

$maxwidth публичное свойство

Maximum desired width.
С версии: 1.3
public int $maxwidth
Результат integer

$players публичное свойство

Video player information
С версии: 1.3
public stdClass $players
Результат stdClass

$post_id публичное свойство

Remote blog attachment identifier
С версии: 1.5
public int $post_id
Результат integer

$poster_frame_uri публичное свойство

Poster frame image URI for the given video guid and calculated dimensions.
С версии: 1.3
public string $poster_frame_uri
Результат string

$restricted_embed публичное свойство

Video author has restricted video embedding or sharing
С версии: 1.3
public bool $restricted_embed
Результат boolean

$skin публичное свойство

Video player skinning preferences including background color and watermark
С версии: 1.5
public array $skin
Результат array

$text_direction публичное свойство

Directionality of title text. ltr or rtl
С версии: 1.3
public string $text_direction
Результат string

$title публичное свойство

Video title
С версии: 1.3
public string $title
Результат string

$version публичное свойство

public $version

$videos публичное свойство

Video files associated with the given guid for the calculated dimensions.
С версии: 1.3
public stdClass $videos
Результат stdClass