[wp-trac] [WordPress Trac] #22559: Solve for incorrect uses of media_buttons_context
WordPress Trac
noreply at wordpress.org
Fri Nov 23 23:15:15 UTC 2012
#22559: Solve for incorrect uses of media_buttons_context
--------------------------+--------------------
Reporter: nacin | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.5
Component: Media | Version: trunk
Severity: major | Resolution:
Keywords: has-patch |
--------------------------+--------------------
Changes (by nacin):
* keywords: => has-patch
Comment:
Attached patch tries to handle both of these situations:
{{{
// Results in nesting
add_filter( 'media_buttons_context', function( $str ) {
return $str . ' <a href="#">Insert Other Media</a>';
} );
}}}
{{{
// Avoids nesting
add_filter( 'media_buttons_context', function( $str ) {
return $str . ' </a> <a href="#">Insert Other Media';
} );
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22559#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list