From d040ddef2e0897a1ee3776743b688480529ffab7 Mon Sep 17 00:00:00 2001 From: Kevin Lisota Date: Wed, 23 Jul 2014 21:08:26 -0700 Subject: [PATCH] use WP HTML5 markup for captions instead of Soil Use add_theme_support to enable native HTML5 captions and add caption styling to wp-caption-text. --- assets/less/components/_media.less | 4 ++++ lib/init.php | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/assets/less/components/_media.less b/assets/less/components/_media.less index 78458a2..349fe12 100644 --- a/assets/less/components/_media.less +++ b/assets/less/components/_media.less @@ -3,6 +3,10 @@ &:extend(.thumbnail all); } +.wp-caption-text { + &:extend(.thumbnail .caption); +} + // Gallery shortcode .gallery-row { padding: (@line-height-computed / 2) 0; diff --git a/lib/init.php b/lib/init.php index 686673e..d70a899 100644 --- a/lib/init.php +++ b/lib/init.php @@ -23,6 +23,10 @@ function roots_setup() { // http://codex.wordpress.org/Post_Formats add_theme_support('post-formats', array('aside', 'gallery', 'link', 'image', 'quote', 'video', 'audio')); + // Add HTML5 markup for captions + // http://codex.wordpress.org/Function_Reference/add_theme_support#HTML5 + add_theme_support('html5', array('caption')); + // Tell the TinyMCE editor to use a custom stylesheet add_editor_style('/assets/css/editor-style.css'); }