WordPress.org

Forums

[resolved] Add fields to Attachment Details (5 posts)

  1. Compute
    Member
    Posted 6 months ago #

    Hi,

    Is there any way to add more fields to Attachment details inside the media uploader? Seems pretty closed off and there are no hooks inside:

    wp-includes/media.php, line 1600

    <h3><?php _e('Attachment Details'); ?></h3>
    <div class="attachment-info">
    	<div class="thumbnail">
    		<# if ( data.uploading ) { #>
    			<div class="media-progress-bar"><div></div></div>
    		<# } else if ( 'image' === data.type ) { #>
    			<img src="{{ data.size.url }}" draggable="false" />
    		<# } else { #>
    			<img src="{{ data.icon }}" class="icon" draggable="false" />
    		<# } #>
    	</div>
    	<div class="details">
    		<div class="filename">{{ data.filename }}</div>
    		<div class="uploaded">{{ data.dateFormatted }}</div>
    		<# if ( 'image' === data.type && ! data.uploading ) { #>
    			<div class="dimensions">{{ data.width }} &times; {{ data.height }}</div>
    		<# } #>
    	</div>
    	<div class="compat-meta">
    		<# if ( data.compat && data.compat.meta ) { #>
    			{{{ data.compat.meta }}}
    		<# } #>
    	</div>
    </div>
  2. keesiemeijer
    moderator
    Posted 6 months ago #

  3. Compute
    Member
    Posted 6 months ago #

    Oh same hooks. Smart..

    Sorry for this silly question and thanks alot.

  4. keesiemeijer
    moderator
    Posted 6 months ago #

    No problem :-)

    By the way: not a silly question.

Reply

You must log in to post.

About this Topic