Ticket #26642: 26642.9.diff
File 26642.9.diff, 3.8 KB (added by , 11 years ago) |
---|
-
src/wp-includes/class-wp-editor.php
333 333 'preview_styles' => 'font-family font-size font-weight font-style text-decoration text-transform', 334 334 335 335 'wpeditimage_disable_captions' => $no_captions, 336 'wpeditimage_html5_captions' => current_theme_supports( 'html5', 'caption' ), 336 337 'plugins' => implode( ',', $plugins ), 337 338 ); 338 339 … … 345 346 $dashicons = includes_url( "css/dashicons$suffix.css?$version" ); 346 347 $mediaelement = includes_url( "js/mediaelement/mediaelementplayer.min.css?$version" ); 347 348 $wpmediaelement = includes_url( "js/mediaelement/wp-mediaelement.css?$version" ); 348 349 349 350 // WordPress default stylesheet and dashicons 350 351 $mce_css = array( 351 352 $dashicons, -
src/wp-includes/js/tinymce/plugins/wordpress/plugin.js
303 303 bodyClass.push('rtl'); 304 304 } 305 305 306 if ( editor.getParam( 'wpeditimage_html5_captions' ) ) { 307 bodyClass.push( 'html5-caption' ); 308 } 309 306 310 if ( env.ie ) { 307 311 if ( parseInt( env.ie, 10 ) === 9 ) { 308 312 bodyClass.push('ie9'); -
src/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js
47 47 return c; 48 48 } 49 49 50 width = parseInt( w, 10 ) + 10; 50 width = parseInt( w, 10 ); 51 if ( ! editor.getParam( 'wpeditimage_html5_captions' ) ) { 52 width = width + 10; 53 } 51 54 52 55 return '<div class="mceTemp"><dl id="'+ id +'" class="wp-caption '+ cls +'" style="width: '+ width +'px">' + 53 56 '<dt class="wp-caption-dt">'+ img +'</dt><dd class="wp-caption-dd">'+ cap +'</dd></dl></div>'; … … 618 621 619 622 // Remove toolbar to avoid an orphaned toolbar when dragging an image to a new location 620 623 removeToolbar(); 621 622 624 }); 623 625 624 626 // Prevent IE11 from making dl.wp-caption resizable -
src/wp-includes/js/tinymce/skins/wordpress/wp-content.css
40 40 margin: 10px 0; 41 41 } 42 42 43 .html5-caption .wp-caption { 44 padding: 4px; 45 } 46 43 47 .mceIEcenter { 44 48 text-align: center; 45 49 } -
src/wp-includes/media.php
765 765 if ( ! empty( $atts['id'] ) ) 766 766 $atts['id'] = 'id="' . esc_attr( $atts['id'] ) . '" '; 767 767 768 $class = trim( 'wp-caption ' . $atts['align'] . ' ' . $atts['class'] ); 769 770 if ( current_theme_supports( 'html5', 'caption' ) ) { 771 return '<figure ' . $atts['id'] . 'style="width: ' . $atts['width'] . 'px;" class="' . esc_attr( $class ) . '">' 772 . do_shortcode( $content ) . '<figcaption class="wp-caption-text">' . $atts['caption'] . '</figcaption></figure>'; 773 } 774 768 775 $caption_width = 10 + $atts['width']; 769 776 770 777 /** … … 788 795 if ( $caption_width ) 789 796 $style = 'style="width: ' . (int) $caption_width . 'px" '; 790 797 791 $class = trim( 'wp-caption ' . $atts['align'] . ' ' . $atts['class'] );792 793 798 return '<div ' . $atts['id'] . $style . 'class="' . esc_attr( $class ) . '">' 794 799 . do_shortcode( $content ) . '<p class="wp-caption-text">' . $atts['caption'] . '</p></div>'; 795 800 }