Go to file
Andrew Nacin 71917873d4 Introduce HTML5 caption support.
When a theme supports HTML5 captions via add_theme_support( 'html5', 'caption' ), figure and figcaption will be used instead of div and p.

There's a bonus. But first, some history: Captions were introduced with an inline style set for the container. This remains, as it is there to force captions to wrap. But this inline style included an extra 10 pixels, which have vexxed theme developers for years. While these pixels were designed to ensure padding around floated images, modern themes handle this with grace. The additional pixels thus feel encumbering.

As the new HTML5 gallery support avoids outputting default gallery styles (again, irking theme developers for years; see #26697), the new HTML5 caption support will also ditch these 10 pixels of unwanted hand-holding. 

The 10 pixels are also removed entirely in the visual editor (and more styles may also disappear here; see #26642), giving themes the power necessary to match the frontend styles.

The filter img_caption_shortcode_width added in 3.7 to work around this madness (see #14380) is skipped entirely when the theme supports HTML5 captions.

props obenland, azaozz.
see #26642. also fixes #9066.


git-svn-id: https://develop.svn.wordpress.org/trunk@27668 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-24 02:04:56 +00:00
src Introduce HTML5 caption support. 2014-03-24 02:04:56 +00:00
tests Fix various issues with WP_Adjacent_Post: 2014-03-20 02:58:48 +00:00
tools/i18n i18n tools: Have makepot search for the main file of the plugin. 2014-03-04 21:06:48 +00:00
.editorconfig Add .editorconfig file, see http://editorconfig.org/. 2014-02-20 02:35:38 +00:00
.gitignore Remove twenty* ignore-exclusion lines. Already tracked. 2014-02-26 20:59:25 +00:00
.jshintrc Remove smarttabs from .jshintrc per IRC discussion. see #25187. 2013-11-13 19:23:16 +00:00
.travis.yml Add jshint to Travis CI config. 2014-02-25 17:57:04 +00:00
Gruntfile.js Widget Customizer: Move style/script registration to script loader. Update Gruntfile.js. 2014-03-13 19:40:15 +00:00
package.json Developer tools: grunt-patch-wordpress from jorbin, for applying patches directly from Trac. 2014-02-26 21:45:55 +00:00
phpunit.xml.dist Move PHPUnit tests into a tests/phpunit directory. 2013-08-29 18:39:34 +00:00
wp-config-sample.php Move wp-config-sample.php to the root of develop.svn. 2013-08-29 20:45:17 +00:00
wp-tests-config-sample.php Update wp-tests-config-sample.php to run with WP_DEBUG by default. see #25282. 2013-09-23 16:17:59 +00:00