[wp-trac] [WordPress Trac] #22667: 3.5 Meida: Compat Meta can float wrap around to the right (was: 3.5 Meida: Compat Meta needs to clear: left; )
WordPress Trac
noreply at wordpress.org
Sat Dec 1 00:43:05 UTC 2012
#22667: 3.5 Meida: Compat Meta can float wrap around to the right
--------------------------+------------------------------
Reporter: Viper007Bond | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: trunk
Severity: normal | Resolution:
Keywords: needs-patch |
--------------------------+------------------------------
Changes (by Viper007Bond):
* keywords: has-patch => needs-patch
Old description:
> 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 );
> }}}
New description:
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 );
}}}
--
Comment:
A `clear: left;` just always puts it below the image. Needs a better fix
than that.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22667#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list