WordPress at a glance
function is not described

WP_Widget_Media::get_instance_schema() public WP 4.8.0

Get schema for properties of a widget instance (item).

{} It's a method of the class: WP_Widget_Media{}

Hooks from the method
Return

Array. Schema for properties.

Usage

$WP_Widget_Media = new WP_Widget_Media();
$WP_Widget_Media->get_instance_schema();

Notes

Changelog

Since 4.8.0 Introduced.

Code of WP_Widget_Media::get_instance_schema() WP 5.7.2

<?php
public function get_instance_schema() {
	$schema = array(
		'attachment_id' => array(
			'type'        => 'integer',
			'default'     => 0,
			'minimum'     => 0,
			'description' => __( 'Attachment post ID' ),
			'media_prop'  => 'id',
		),
		'url'           => array(
			'type'        => 'string',
			'default'     => '',
			'format'      => 'uri',
			'description' => __( 'URL to the media file' ),
		),
		'title'         => array(
			'type'                  => 'string',
			'default'               => '',
			'sanitize_callback'     => 'sanitize_text_field',
			'description'           => __( 'Title for the widget' ),
			'should_preview_update' => false,
		),
	);

	/**
	 * Filters the media widget instance schema to add additional properties.
	 *
	 * @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;
}