media_upload_gallery() WordPress Function

The media_upload_gallery() function allows you to create a gallery of images from the media library. You can select the images you want to include in the gallery, and then specify the order in which they should appear. You can also choose to display the gallery as a slideshow.

media_upload_gallery() #

Retrieves the legacy media uploader form in an iframe.


Return

(string|null)


Top ↑

Source

File: wp-admin/includes/media.php

function media_upload_gallery() {
	$errors = array();

	if ( ! empty( $_POST ) ) {
		$return = media_upload_form_handler();

		if ( is_string( $return ) ) {
			return $return;
		}

		if ( is_array( $return ) ) {
			$errors = $return;
		}
	}

	wp_enqueue_script( 'admin-gallery' );
	return wp_iframe( 'media_upload_gallery_form', $errors );
}


Top ↑

Changelog

Changelog
VersionDescription
2.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More