[wp-trac] [WordPress Trac] #24472: Filter for wp_editor() arguments on attachment edit screen
WordPress Trac
noreply at wordpress.org
Sun Jun 29 20:18:48 UTC 2014
#24472: Filter for wp_editor() arguments on attachment edit screen
------------------------------------+-----------------------------------
Reporter: navitronic | Owner: DrewAPicture
Type: enhancement | Status: reviewing
Priority: normal | Milestone: 4.0
Component: Media | Version: 3.5.1
Severity: normal | Resolution:
Keywords: has-patch dev-feedback | Focuses: docs, administration
------------------------------------+-----------------------------------
Comment (by azaozz):
Replying to [comment:14 DrewAPicture]:
Yeah, we don't need two filters. All default setting can be overridden
with `$settings` and should always be set, no point to allow plugins to
change them separately.
Thinking a filter only makes sense on the passed in `$settings` before
they are merged with the defaults. It's inadvisable to filter the return
value as we may need to add some per-processing similar to resetting
`$set['editor_height']`, etc.
So this should probably be:
{{{
public static function parse_settings( $editor_id, $settings ) {
$settings = apply_filters( 'wp_editor_settings', $settings,
$editor_id );
$set = wp_parse_args( $settings, array(
...
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/24472#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list