widget_{$this->id_base}_instance_schema
Filter HookDescription
Get schema for properties of a widget instance (item).Hook Information
File Location |
wp-includes/widgets/class-wp-widget-media-gallery.php
View on GitHub
|
Hook Type | Filter |
Line Number | 101 |
Hook Parameters
This hook doesn't accept any parameters.
Usage Examples
Basic Usage
<?php
// Hook into widget_{$this->id_base}_instance_schema
add_filter('widget_{$this->id_base}_instance_schema', 'my_custom_filter');
function my_custom_filter() {
// Your custom filtering logic here
return 'modified_value';
}
Source Code Context
wp-includes/widgets/class-wp-widget-media-gallery.php:101
- How this hook is used in WordPress core
<?php
96 'should_preview_update' => false,
97 ),
98 );
99
100 /** This filter is documented in wp-includes/widgets/class-wp-widget-media.php */
101 $schema = apply_filters( "widget_{$this->id_base}_instance_schema", $schema, $this );
102
103 return $schema;
104 }
105
106 /**
PHP Documentation
<?php
/**
* Get schema for properties of a widget instance (item).
*
* @since 4.9.0
*
* @see WP_REST_Controller::get_item_schema()
* @see WP_REST_Controller::get_additional_fields()
* @link https://core.trac.wordpress.org/ticket/35574
*
* @return array Schema for properties.
*/
Quick Info
- Hook Type: Filter
- Parameters: 0
- File: wp-includes/widgets/class-wp-widget-media-gallery.php
Related Hooks
Related hooks will be displayed here in future updates.