[wp-trac] [WordPress Trac] #21092: Media uploader insert button doesn't respect the current post type
WordPress Trac
wp-trac at lists.automattic.com
Thu Jun 28 08:41:39 UTC 2012
#21092: Media uploader insert button doesn't respect the current post type
-------------------------+------------------------------
Reporter: evansolomon | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version:
Severity: normal | Resolution:
Keywords: has-patch |
-------------------------+------------------------------
Comment (by dd32):
Purely code review:
> {{{isset( $_GET ) && isset( $_GET['post_id'] )}}}
There's no need to check to see if GET is set, You can simply do {{{ if (
isset( $_GET['post_id'] ) ) }}} or {{{!empty()}}} if that fits the use-
case better
> {{{esc_attr__( $parent_type_obj->labels->insert_into_post )}}}
`esc_attr__` is a alias for `esc_attr( __(...) )` so you should remove the
`__` from the function call
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21092#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list