[wp-trac] [WordPress Trac] #22667: 3.5 Meida: Compat Meta needs to clear: left;

WordPress Trac noreply at wordpress.org
Sat Dec 1 00:39:16 UTC 2012


#22667: 3.5 Meida: Compat Meta needs to clear: left;
-----------------------------+--------------------------
 Reporter:  Viper007Bond     |       Type:  defect (bug)
   Status:  new              |   Priority:  normal
Milestone:  Awaiting Review  |  Component:  Media
  Version:  trunk            |   Severity:  normal
 Keywords:  has-patch        |
-----------------------------+--------------------------
 The `compat-meta` div which adds extra stuff to the meta data in the new
 media UI is floated to the left. However it also needs a clear, otherwise
 it can end up looking weird depending on the image size (a narrow image
 seems to be required to set it off).

 Screenshots attached of me adding an "Advanced Edit" link using the
 following:

 {{{
 add_filter( 'media_meta', function( $media_meta, $attachment ) {

         // Abort when actually editing this media item
         // We only want to modify this outside of the media edit screen
         if ( ! empty( $_GET['post'] ) && $attachment->ID == $_GET['post']
 )
                 return $media_meta;

         $media_meta .= '<a href="' . esc_url( get_edit_post_link(
 $attachment->ID ) ) . '" target="_blank">Advanced Edit</a>';

         return $media_meta;

 }, 10, 2 );
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/22667>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list