Wp3.5 Media Gallery Edit modal: change captions to title

How can i change those editing inputs to title from caption?
wp3.5 gallery edit

Some sources i found about new upload system:

  • Using the WordPress 3.5 Media Uploader within plugins
  • How to Add the WordPress 3.5 Media Manager Interface

Basically looking for a proper solution like this:

// http://wordpress.org/support/topic/wp-35-any-way-to-default-add-media-to-upload-files#post-3709109
// If you want to have the editor default to the Upload Files tab in the admin editor
add_action( 'admin_footer-post-new.php', 'idealien_mediaDefault_script' );
add_action( 'admin_footer-post.php', 'idealien_mediaDefault_script' );
function idealien_mediaDefault_script()
{
    ?>
<script type="text/javascript">
jQuery(document).ready(function($){
    wp.media.controller.Library.prototype.defaults.contentUserSetting = false; // making editor default to the Upload Files

});
</script>
<?php } 

Solutions Collecting From Web of "Wp3.5 Media Gallery Edit modal: change captions to title"

You can deactivate the default gallery, the shortcode via hook. Also add a new function for the shortcode gallery and copz, paste from original aand change the input for caption. Put all source in a plugin. If WordPress change this in a next version, then deactivate your plugin or change it. I think it is the best solution without change the input on media manager.

I explained solution here: http://unsalkorkmaz.com/wp3-5-media-gallery-edit-modal-change-captions-to-title/

If you want just solution:

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&hellip;'); ?>" {{ 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&hellip;'); ?>"
                <# } else if ( 'audio' === data.type ) { #>
                    placeholder="<?php esc_attr_e('Describe this audio file&hellip;'); ?>"
                <# } else { #>
                    placeholder="<?php esc_attr_e('Describe this media file&hellip;'); ?>"
                <# } #> {{ maybeReadOnly }} />
        <# } #>
    <# } #>
</script>