WordPress at a glance
function is not described

WP_Widget_Media_Gallery::render_media() public WP 4.9.0

Render the media on the frontend.

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

No Hooks.

Return

null. Nothing.

Usage

$WP_Widget_Media_Gallery = new WP_Widget_Media_Gallery();
$WP_Widget_Media_Gallery->render_media( $instance );
$instance(array) (required)
Widget instance props.

Changelog

Since 4.9.0 Introduced.

Code of WP_Widget_Media_Gallery::render_media() WP 5.7.2

<?php
public function render_media( $instance ) {
	$instance = array_merge( wp_list_pluck( $this->get_instance_schema(), 'default' ), $instance );

	$shortcode_atts = array_merge(
		$instance,
		array(
			'link' => $instance['link_type'],
		)
	);

	// @codeCoverageIgnoreStart
	if ( $instance['orderby_random'] ) {
		$shortcode_atts['orderby'] = 'rand';
	}

	// @codeCoverageIgnoreEnd
	echo gallery_shortcode( $shortcode_atts );
}