Changeset 45100
- Timestamp:
- 04/02/2019 10:12:11 PM (6 years ago)
- Location:
- trunk/src/wp-includes/widgets
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/widgets/class-wp-widget-media-audio.php
r43571 r45100 20 20 * Constructor. 21 21 * 22 * @since 22 * @since 4.8.0 23 23 */ 24 24 public function __construct() { … … 55 55 * Get schema for properties of a widget instance (item). 56 56 * 57 * @since 57 * @since 4.8.0 58 58 * 59 59 * @see WP_REST_Controller::get_item_schema() … … 63 63 */ 64 64 public function get_instance_schema() { 65 $schema = array_merge( 66 parent::get_instance_schema(), 67 array( 68 'preload' => array( 69 'type' => 'string', 70 'enum' => array( 'none', 'auto', 'metadata' ), 71 'default' => 'none', 72 'description' => __( 'Preload' ), 73 ), 74 'loop' => array( 75 'type' => 'boolean', 76 'default' => false, 77 'description' => __( 'Loop' ), 78 ), 79 ) 65 $schema = array( 66 'preload' => array( 67 'type' => 'string', 68 'enum' => array( 'none', 'auto', 'metadata' ), 69 'default' => 'none', 70 'description' => __( 'Preload' ), 71 ), 72 'loop' => array( 73 'type' => 'boolean', 74 'default' => false, 75 'description' => __( 'Loop' ), 76 ), 80 77 ); 81 78 … … 90 87 } 91 88 92 return $schema;89 return array_merge( $schema, parent::get_instance_schema() ); 93 90 } 94 91 … … 96 93 * Render the media on the frontend. 97 94 * 98 * @since 95 * @since 4.8.0 99 96 * 100 97 * @param array $instance Widget instance props. -
trunk/src/wp-includes/widgets/class-wp-widget-media-image.php
r44767 r45100 20 20 * Constructor. 21 21 * 22 * @since 22 * @since 4.8.0 23 23 */ 24 24 public function __construct() { … … 54 54 * Get schema for properties of a widget instance (item). 55 55 * 56 * @since 56 * @since 4.8.0 57 57 * 58 58 * @see WP_REST_Controller::get_item_schema() … … 63 63 public function get_instance_schema() { 64 64 return array_merge( 65 parent::get_instance_schema(),66 65 array( 67 66 'size' => array( … … 162 161 * - width (redundant when size is not custom) 163 162 */ 164 ) 163 ), 164 parent::get_instance_schema() 165 165 ); 166 166 } … … 169 169 * Render the media on the frontend. 170 170 * 171 * @since 171 * @since 4.8.0 172 172 * 173 173 * @param array $instance Widget instance props. -
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. -
trunk/src/wp-includes/widgets/class-wp-widget-media.php
r44796 r45100 123 123 * Get schema for properties of a widget instance (item). 124 124 * 125 * @since 125 * @since 4.8.0 126 126 * 127 127 * @see WP_REST_Controller::get_item_schema()
Note: See TracChangeset
for help on using the changeset viewer.