[wp-trac] [WordPress Trac] #43123: Default captions should NOT use max-width
WordPress Trac
noreply at wordpress.org
Fri Mar 16 18:48:29 UTC 2018
#43123: Default captions should NOT use max-width
--------------------------------------+------------------------
Reporter: smerriman | Owner: joemcgill
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 4.9.5
Component: Media | Version: 4.9
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+------------------------
Comment (by joemcgill):
@jakeqz, I'm not sure an extra filter is necessary here, since someone
could filter the output using the `do_shortcode_tag` filter, like this:
{{{#!php
add_filter( 'do_shortcode_tag', function ( $output, $tag ) {
if ( 'caption' === $tag || 'wp_caption' === $tag ) {
$output = str_replace( 'width:', 'max-width:', $output );
}
return $output;
}, 10, 2 );
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43123#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list