我在这里解释了解决方案:http://unsalkorkmaz.com/wp3-5-media-gallery-edit-modal-change-captions-to-title/
如果您想要公正的解决方案:
add_action( \'admin_footer-post-new.php\', \'firmasite_replace_script_tmpl_attachment\' );
add_action( \'admin_footer-post.php\', \'firmasite_replace_script_tmpl_attachment\' );
function firmasite_replace_script_tmpl_attachment()
{ ?>
<script type="text/javascript">
jQuery(document).ready(function($){
jQuery("script#tmpl-attachment:first").remove();
});
</script>
<script type="text/html" id="tmpl-attachment">
<div class="attachment-preview type-{{ data.type }} subtype-{{ data.subtype }} {{ data.orientation }}">
<# if ( data.uploading ) { #>
<div class="media-progress-bar"><div></div></div>
<# } else if ( \'image\' === data.type ) { #>
<div class="thumbnail">
<div class="centered">
<img src="{{ data.size.url }}" draggable="false" />
</div>
</div>
<# } else { #>
<img src="{{ data.icon }}" class="icon" draggable="false" />
<div class="filename">
<div>{{ data.filename }}</div>
</div>
<# } #>
<# if ( data.buttons.close ) { #>
<a class="close media-modal-icon" href="#" title="<?php _e(\'Remove\'); ?>"></a>
<# } #>
<# if ( data.buttons.check ) { #>
<a class="check" href="#" title="<?php _e(\'Deselect\'); ?>"><div class="media-modal-icon"></div></a>
<# } #>
</div>
<#
var maybeReadOnly = data.can.save || data.allowLocalEdits ? \'\' : \'readonly\';
if ( data.describe ) { #>
<# if ( \'image\' === data.type ) { #>
<input type="text" value="{{ data.title }}" class="describe" data-setting="title"
placeholder="<?php esc_attr_e(\'Caption this image…\'); ?>" {{ maybeReadOnly }} />
<# } else { #>
<input type="text" value="{{ data.title }}" class="describe" data-setting="title"
<# if ( \'video\' === data.type ) { #>
placeholder="<?php esc_attr_e(\'Describe this video…\'); ?>"
<# } else if ( \'audio\' === data.type ) { #>
placeholder="<?php esc_attr_e(\'Describe this audio file…\'); ?>"
<# } else { #>
placeholder="<?php esc_attr_e(\'Describe this media file…\'); ?>"
<# } #> {{ maybeReadOnly }} />
<# } #>
<# } #>
</script>