- Timestamp:
- 04/02/2019 10:12:11 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/widgets/class-wp-widget-media-video.php
r43571 r45100 20 20 * Constructor. 21 21 * 22 * @since 22 * @since 4.8.0 23 23 */ 24 24 public function __construct() { … … 56 56 * Get schema for properties of a widget instance (item). 57 57 * 58 * @since 58 * @since 4.8.0 59 59 * 60 60 * @see WP_REST_Controller::get_item_schema() … … 64 64 */ 65 65 public function get_instance_schema() { 66 $schema = array_merge( 67 parent::get_instance_schema(), 68 array( 69 'preload' => array( 70 'type' => 'string', 71 'enum' => array( 'none', 'auto', 'metadata' ), 72 'default' => 'metadata', 73 'description' => __( 'Preload' ), 74 'should_preview_update' => false, 75 ), 76 'loop' => array( 77 'type' => 'boolean', 78 'default' => false, 79 'description' => __( 'Loop' ), 80 'should_preview_update' => false, 81 ), 82 'content' => array( 83 'type' => 'string', 84 'default' => '', 85 'sanitize_callback' => 'wp_kses_post', 86 'description' => __( 'Tracks (subtitles, captions, descriptions, chapters, or metadata)' ), 87 'should_preview_update' => false, 88 ), 89 ) 66 67 $schema = array( 68 'preload' => array( 69 'type' => 'string', 70 'enum' => array( 'none', 'auto', 'metadata' ), 71 'default' => 'metadata', 72 'description' => __( 'Preload' ), 73 'should_preview_update' => false, 74 ), 75 'loop' => array( 76 'type' => 'boolean', 77 'default' => false, 78 'description' => __( 'Loop' ), 79 'should_preview_update' => false, 80 ), 81 'content' => array( 82 'type' => 'string', 83 'default' => '', 84 'sanitize_callback' => 'wp_kses_post', 85 'description' => __( 'Tracks (subtitles, captions, descriptions, chapters, or metadata)' ), 86 'should_preview_update' => false, 87 ), 90 88 ); 91 89 … … 100 98 } 101 99 102 return $schema;100 return array_merge( $schema, parent::get_instance_schema() ); 103 101 } 104 102 … … 106 104 * Render the media on the frontend. 107 105 * 108 * @since 106 * @since 4.8.0 109 107 * 110 108 * @param array $instance Widget instance props.
Note: See TracChangeset
for help on using the changeset viewer.