Aggiunge il modulo della galleria all'iframe di caricamento

Parametri

$errori

(array)(Richiesto)

Fonte

File: wp-admin/includes/media.php

function media_upload_gallery_form( $errors ) {
	global $redir_tab, $type;

	$redir_tab = 'gallery';
	media_upload_header();

	$post_id         = (int) $_REQUEST['post_id'];
	$form_action_url = admin_url( "media-upload.php?type=$type&tab=gallery&post_id=$post_id" );
	/** This filter is documented in wp-admin/includes/media.php */
	$form_action_url = apply_filters( 'media_upload_form_url', $form_action_url, $type );
	$form_class      = 'media-upload-form validate';

	if ( get_user_setting( 'uploader' ) ) {
		$form_class .= ' html-uploader';
	}

	?>
	<scripttype="text/javascript">jQuery(function($){var preloaded =$(".media-item.preloaded");if( preloadedlength >0){
			preloadedeach(function(){prepareMediaItem({id:thisidreplace(/[^0-9]/g,'')},'');});updateMediaForm();}});script><divid="sort-buttons"class="hide-if-no-js"><span>_e('All Tabs:');?><ahref="#"id="showall">_e('Show');?>a><ahref="#"id="hideall"style="display:none;">_e('Hide');?>a>span>_e('Sort Order:');?><ahref="#"id="asc">_e('Ascending');?>a> |
	<ahref="#"id="desc">_e('Descending');?>a> |
	<ahref="#"id="clear">_ex('Clear','verb');?>a>div><formenctype="multipart/form-data"method="post"action="echoesc_url($form_action_url);?>"class="echo$form_class;?>"id="gallery-form">wp_nonce_field('media-form');?>// media_upload_form( $errors ); ?><tableclass="widefat"><thead><tr><th>_e('Media');?>th><thclass="order-head">_e('Order');?>th><thclass="actions-head">_e('Actions');?>th>tr>thead>table><divid="media-items">add_filter('attachment_fields_to_edit','media_post_single_attachment_fields_to_edit',10,2);?>echoget_media_items($post_id,$errors);?>div><pclass="ml-submit">submit_button(__('Save all changes'),'savebutton','save',false,array('id'=>'save-all','style'=>'display: none;',));?><inputtype="hidden"name="post_id"id="post_id"value="echo(int)$post_id;?>"/><inputtype="hidden"name="type"value="echoesc_attr($GLOBALS['type']);?>"/><inputtype="hidden"name="tab"value="echoesc_attr($GLOBALS['tab']);?>"/>p><divid="gallery-settings"style="display:none;"><divclass="title">_e('Gallery Settings');?>div><tableid="basic"class="describe"><tbody><tr><thscope="row"class="label"><label><spanclass="alignleft">_e('Link thumbnails to:');?>span>label>th><tdclass="field"><inputtype="radio"name="linkto"id="linkto-file"value="file"/><labelfor="linkto-file"class="radio">_e('Image File');?>label><inputtype="radio"checked="checked"name="linkto"id="linkto-post"value="post"/><labelfor="linkto-post"class="radio">_e('Attachment Page');?>label>td>tr><tr><thscope="row"class="label"><label><spanclass="alignleft">_e('Order images by:');?>span>label>th><tdclass="field"><selectid="orderby"name="orderby"><optionvalue="menu_order"selected="selected">_e('Menu order');?>option><optionvalue="title">_e('Title');?>option><optionvalue="post_date">_e('Date/Time');?>option><optionvalue="rand">_e('Random');?>option>select>td>tr><tr><thscope="row"class="label"><label><spanclass="alignleft">_e('Order:');?>span>label>th><tdclass="field"><inputtype="radio"checked="checked"name="order"id="order-asc"value="asc"/><labelfor="order-asc"class="radio">_e('Ascending');?>label><inputtype="radio"name="order"id="order-desc"value="desc"/><labelfor="order-desc"class="radio">_e('Descending');?>label>td>tr><tr><thscope="row"class="label"><label><spanclass="alignleft">_e('Gallery columns:');?>span>label>th><tdclass="field"><selectid="columns"name="columns"><optionvalue="1">1option><optionvalue="2">2option><optionvalue="3"selected="selected">3option><optionvalue="4">4option><optionvalue="5">5option><optionvalue="6">6option><optionvalue="7">7option><optionvalue="8">8option><optionvalue="9">9option>select>td>tr>tbody>table><pclass="ml-submit"><inputtype="button"class="button"style="display:none;"onMouseDown="wpgalleryupdate();"name="insert-gallery"id="insert-gallery"value="esc_attr_e('Insert gallery');?>"/><inputtype="button"class="button"style="display:none;"onMouseDown="wpgalleryupdate();"name="update-gallery"id="update-gallery"value="esc_attr_e('Update gallery settings');?>"/>p>div>form>}

Correlato

Utilizzi

Usi Descrizione
wp-admin/includes/template.php: submit_button()

Emette un pulsante di invio, con il testo fornito e le classi appropriate.

wp-admin/includes/media.php: media_upload_form_url

Filtra l'URL del modulo di caricamento dei media.

wp-admin/includes/media.php: media_upload_header()

Emette l'intestazione del caricamento dei media legacy.

wp-admin/includes/media.php: get_media_items()

Recupera l'HTML degli elementi multimediali della galleria del post.

wp-includes/l10n.php: _e()

Mostra il testo tradotto.

wp-includes/l10n.php: _ex()

Visualizza la stringa tradotta con il contesto gettext.

wp-includes/l10n.php: __()

Recupera la traduzione di $testo.

wp-includes/l10n.php: esc_attr_e()

Mostra il testo tradotto che è stato evaso per un uso sicuro in un attributo.

wp-includes/formatting.php: esc_url()

Controlla e pulisce un URL.

wp-includes/formatting.php: esc_attr()

Escaping per gli attributi HTML.

wp-includes/functions.php: wp_nonce_field()

Recupera o visualizza il campo nascosto nonce per i moduli.

wp-includes/link-template.php: admin_url()

Recupera l'URL dell'area di amministrazione del sito corrente.

wp-includes/plugin.php: applica_filtri()

Richiama le funzioni di callback che sono state aggiunte a un gancio per filtri.

wp-includes/plugin.php: add_filter()

Aggancia una funzione o un metodo a un'azione di filtro specifica.

wp-includes/option.php: get_user_setting()

Recupera il valore dell'impostazione dell'interfaccia utente in base al nome dell'impostazione.

Changelog

Versione Descrizione
2.5.0 Introdotto.