WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WP_Widget_Media::__construct() public WP 4.8.0

Constructor.

Это метод класса: WP_Widget_Media{}

Хуков нет.

Возвращает

Null. Ничего.

Использование

$WP_Widget_Media = new WP_Widget_Media();
$WP_Widget_Media->__construct( $id_base, $name, $widget_options, $control_options );
$id_base(строка) (обязательный)
Base ID for the widget, lowercase and unique.
$name(строка) (обязательный)
Name for the widget displayed on the configuration page.
$widget_options(массив)
Widget options. See wp_register_sidebar_widget() for information on accepted arguments.
По умолчанию: empty array
$control_options(массив)
Widget control options. See wp_register_widget_control() for information on accepted arguments.
По умолчанию: empty array

Список изменений

С версии 4.8.0 Введена.

Код WP_Widget_Media::__construct() WP 5.5.1

wp-includes/widgets/class-wp-widget-media.php
<?php
public function __construct( $id_base, $name, $widget_options = array(), $control_options = array() ) {
	$widget_opts = wp_parse_args(
		$widget_options,
		array(
			'description'                 => __( 'A media item.' ),
			'customize_selective_refresh' => true,
			'mime_type'                   => '',
		)
	);

	$control_opts = wp_parse_args( $control_options, array() );

	$l10n_defaults = array(
		'no_media_selected'          => __( 'No media selected' ),
		'add_media'                  => _x( 'Add Media', 'label for button in the media widget' ),
		'replace_media'              => _x( 'Replace Media', 'label for button in the media widget; should preferably not be longer than ~13 characters long' ),
		'edit_media'                 => _x( 'Edit Media', 'label for button in the media widget; should preferably not be longer than ~13 characters long' ),
		'add_to_widget'              => __( 'Add to Widget' ),
		'missing_attachment'         => sprintf(
			/* translators: %s: URL to media library. */
			__( 'We can&#8217;t find that file. Check your <a href="%s">media library</a> and make sure it wasn&#8217;t deleted.' ),
			esc_url( admin_url( 'upload.php' ) )
		),
		/* translators: %d: Widget count. */
		'media_library_state_multi'  => _n_noop( 'Media Widget (%d)', 'Media Widget (%d)' ),
		'media_library_state_single' => __( 'Media Widget' ),
		'unsupported_file_type'      => __( 'Looks like this isn&#8217;t the correct kind of file. Please link to an appropriate file instead.' ),
	);
	$this->l10n    = array_merge( $l10n_defaults, array_filter( $this->l10n ) );

	parent::__construct(
		$id_base,
		$name,
		$widget_opts,
		$control_opts
	);
}