apply_filters( "widget_{$this->id_base}_instance_schema", array $schema, WP_Widget_Media $widget )
- Since
- 4.9.0
Filters the media widget instance schema to add additional properties.
Compatibility
- WordPress
- since 4.9.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$schemaarray- Instance schema.
$widgetWP_Widget_Media- Widget object.
Where this hook fires · 2
wp-includes/widgets/class-wp-widget-media-gallery.php:101WP_Widget_Media_Gallery::get_instance_schema()wp-includes/widgets/class-wp-widget-media.php:172WP_Widget_Media::get_instance_schema()
Source code
* * @since 4.9.0 * * @param array $schema Instance schema. * @param WP_Widget_Media $widget Widget object. */ $schema = apply_filters( "widget_{$this->id_base}_instance_schema", $schema, $this ); return $schema; } /** * Determine if the supplied attachment is for a valid attachment post with the specified MIME type.Changelog
Introduced in 4.9.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.