/**
* Render the media on the frontend.
*
* @since 4.8.0
*
* @param array $instance Widget instance props.
*/
public function render_media( $instance ) { $instance =
array_merge( wp_list_pluck( $this->
get_instance_schema(), 'default'
),
$instance );
$attachment = null;
if ( $this->
is_attachment_with_mime_type( $instance['attachment_id'
],
$this->widget_options
['mime_type'
] ) ) { $attachment =
get_post( $instance['attachment_id'
] );
} $src =
$instance['url'
];
if ( $attachment ) { $src =
wp_get_attachment_url( $attachment->ID
);
} if ( empty( $src ) ) { return;
}