Update WordPress to 5.2
This commit is contained in:
parent
489b5a5914
commit
e00f87f2f5
599 changed files with 119573 additions and 55990 deletions
|
@ -19,7 +19,7 @@ class WP_Widget_Media_Video extends WP_Widget_Media {
|
|||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @since 4.8.0
|
||||
* @since 4.8.0
|
||||
*/
|
||||
public function __construct() {
|
||||
parent::__construct(
|
||||
|
@ -55,7 +55,7 @@ class WP_Widget_Media_Video extends WP_Widget_Media {
|
|||
/**
|
||||
* Get schema for properties of a widget instance (item).
|
||||
*
|
||||
* @since 4.8.0
|
||||
* @since 4.8.0
|
||||
*
|
||||
* @see WP_REST_Controller::get_item_schema()
|
||||
* @see WP_REST_Controller::get_additional_fields()
|
||||
|
@ -63,30 +63,28 @@ class WP_Widget_Media_Video extends WP_Widget_Media {
|
|||
* @return array Schema for properties.
|
||||
*/
|
||||
public function get_instance_schema() {
|
||||
$schema = array_merge(
|
||||
parent::get_instance_schema(),
|
||||
array(
|
||||
'preload' => array(
|
||||
'type' => 'string',
|
||||
'enum' => array( 'none', 'auto', 'metadata' ),
|
||||
'default' => 'metadata',
|
||||
'description' => __( 'Preload' ),
|
||||
'should_preview_update' => false,
|
||||
),
|
||||
'loop' => array(
|
||||
'type' => 'boolean',
|
||||
'default' => false,
|
||||
'description' => __( 'Loop' ),
|
||||
'should_preview_update' => false,
|
||||
),
|
||||
'content' => array(
|
||||
'type' => 'string',
|
||||
'default' => '',
|
||||
'sanitize_callback' => 'wp_kses_post',
|
||||
'description' => __( 'Tracks (subtitles, captions, descriptions, chapters, or metadata)' ),
|
||||
'should_preview_update' => false,
|
||||
),
|
||||
)
|
||||
|
||||
$schema = array(
|
||||
'preload' => array(
|
||||
'type' => 'string',
|
||||
'enum' => array( 'none', 'auto', 'metadata' ),
|
||||
'default' => 'metadata',
|
||||
'description' => __( 'Preload' ),
|
||||
'should_preview_update' => false,
|
||||
),
|
||||
'loop' => array(
|
||||
'type' => 'boolean',
|
||||
'default' => false,
|
||||
'description' => __( 'Loop' ),
|
||||
'should_preview_update' => false,
|
||||
),
|
||||
'content' => array(
|
||||
'type' => 'string',
|
||||
'default' => '',
|
||||
'sanitize_callback' => 'wp_kses_post',
|
||||
'description' => __( 'Tracks (subtitles, captions, descriptions, chapters, or metadata)' ),
|
||||
'should_preview_update' => false,
|
||||
),
|
||||
);
|
||||
|
||||
foreach ( wp_get_video_extensions() as $video_extension ) {
|
||||
|
@ -99,13 +97,13 @@ class WP_Widget_Media_Video extends WP_Widget_Media {
|
|||
);
|
||||
}
|
||||
|
||||
return $schema;
|
||||
return array_merge( $schema, parent::get_instance_schema() );
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the media on the frontend.
|
||||
*
|
||||
* @since 4.8.0
|
||||
* @since 4.8.0
|
||||
*
|
||||
* @param array $instance Widget instance props.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue