WordPress.org

Make WordPress Core

Ticket #6812: img_captions5.patch

File img_captions5.patch, 10.2 KB (added by azaozz, 7 years ago)
  • wp-admin/gears-manifest.php

     
    145145{ "url" : "../wp-includes/js/tinymce/plugins/paste/pastetext.htm?ver=311" }, 
    146146{ "url" : "../wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm?ver=311" }, 
    147147{ "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/template.htm?ver=311" }, 
    148 { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/editimage.html?ver=311" }, 
     148{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/editimage.html?ver=311b" }, 
    149149{ "url" : "../wp-includes/js/tinymce/wp-mce-help.php?ver=311" }, 
    150150 
    151151{ "url" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/ui.css?ver=311" }, 
     
    158158{ "url" : "../wp-includes/js/tinymce/plugins/media/css/media.css?ver=311" }, 
    159159{ "url" : "../wp-includes/js/tinymce/plugins/paste/css/pasteword.css?ver=311" }, 
    160160{ "url" : "../wp-includes/js/tinymce/plugins/paste/css/blank.css?ver=311" }, 
    161 { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css?ver=311" }, 
     161{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css?ver=311b" }, 
    162162{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage-rtl.css?ver=311" }, 
    163163{ "url" : "../wp-includes/js/tinymce/wordpress.css?ver=311" }, 
    164164 
  • wp-content/themes/classic/style.css

     
    322322 
    323323/* Captions & aligment */ 
    324324.aligncenter, 
    325 dl.aligncenter { 
     325div.aligncenter { 
    326326        display: block; 
    327327        margin-left: auto; 
    328328        margin-right: auto; 
     
    336336        float: right; 
    337337} 
    338338 
    339 .wp_caption { 
     339.wp-caption { 
    340340        border: 1px solid #ddd; 
    341341        text-align: center; 
    342342        background-color: #f3f3f3; 
     
    348348        border-radius: 3px; 
    349349} 
    350350 
    351 .wp_caption img { 
     351.wp-caption img { 
    352352        margin: 0; 
    353353        padding: 0; 
    354354        border: 0 none; 
    355355} 
    356356 
    357 .wp_caption_dd { 
     357.wp-caption p.wp-caption-text { 
    358358        font-size: 11px; 
    359359        line-height: 17px; 
    360360        padding: 0 4px 5px; 
  • wp-content/themes/default/style.css

     
    640640 
    641641/* Captions */ 
    642642.aligncenter, 
    643 dl.aligncenter { 
     643div.aligncenter { 
    644644        display: block; 
    645645        margin-left: auto; 
    646646        margin-right: auto; 
    647647} 
    648648 
    649 .wp_caption { 
     649.wp-caption { 
    650650        border: 1px solid #ddd; 
    651651        text-align: center; 
    652652        background-color: #f3f3f3; 
     
    658658        border-radius: 3px; 
    659659} 
    660660 
    661 .wp_caption img { 
     661.wp-caption img { 
    662662        margin: 0; 
    663663        padding: 0; 
    664664        border: 0 none; 
    665665} 
    666666 
    667 .wp_caption_dd { 
     667.wp-caption p.wp-caption-text { 
    668668        font-size: 11px; 
    669669        line-height: 17px; 
    670670        padding: 0 4px 5px; 
  • wp-includes/formatting.php

     
    11241124        // Filtering a blank results in an annoying <br />\n 
    11251125        if ( empty($text) ) return apply_filters('richedit_pre', ''); 
    11261126 
    1127         $output = $text; 
    1128         $output = convert_chars($output); 
     1127        $output = convert_chars($text); 
    11291128        $output = wpautop($output); 
     1129        $output = htmlspecialchars($output, ENT_NOQUOTES); 
    11301130 
    1131         // These must be double-escaped or planets will collide. 
    1132         $output = str_replace('&lt;', '&amp;lt;', $output); 
    1133         $output = str_replace('&gt;', '&amp;gt;', $output); 
    1134  
    1135         // These should be entities too 
    1136         $output = str_replace('<', '&lt;', $output); 
    1137         $output = str_replace('>', '&gt;', $output); 
    1138          
    11391131        return apply_filters('richedit_pre', $output); 
    11401132} 
    11411133 
  • wp-includes/js/tinymce/langs/wp-langs.php

     
    434434s110:"' . mce_escape( __('110%') ) . '", 
    435435s120:"' . mce_escape( __('120%') ) . '", 
    436436s130:"' . mce_escape( __('130%') ) . '", 
    437 caption:"' . mce_escape( __('Caption') ) . '" 
     437img_title:"' . mce_escape( __('Edit Image Title') ) . '", 
     438caption:"' . mce_escape( __('Edit Image Caption') ) . '" 
    438439}); 
    439440'; 
    440441?> 
     442 No newline at end of file 
  • wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css

     
    6262        width: 107px; 
    6363} 
    6464 
     65#media-upload #basic th.label { 
     66        padding: 5px 5px 5px 0; 
     67} 
     68 
    6569.show-align { 
    6670        height: 200px; 
    6771        width: 480px; 
  • wp-includes/js/tinymce/plugins/wpeditimage/editimage.html

     
    77<script type="text/javascript" src="js/editimage.js?ver=311"></script> 
    88<script type="text/javascript" src="../../utils/form_utils.js?ver=311"></script> 
    99 
    10 <link rel="stylesheet" href="css/editimage.css?ver=311" type="text/css" media="all" /> 
     10<link rel="stylesheet" href="css/editimage.css?ver=311b" type="text/css" media="all" /> 
    1111<link rel="stylesheet" href="../../../../../wp-admin/css/media.css?ver=2.6-beta1" type="text/css" media="all" /> 
    1212<script type="text/javascript"> 
    1313if ( 'rtl' == tinyMCEPopup.editor.getParam('directionality','') ) 
     
    7777                <tr class=""> 
    7878                        <th valign="top" scope="row" class="label"> 
    7979                                <label for="img_title"> 
    80                                 <span class="alignleft">{#advanced_dlg.link_titlefield}</span> 
    81                                 <span class="alignright"><abbr title="required" class="required">*</abbr></span> 
     80                                <span class="alignleft">{#wpeditimage.img_title}</span> 
    8281                                </label> 
    8382                        </th> 
    8483                        <td class="field"> 
  • wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.js

     
    1515                                if ( ed.dom.getAttrib(el, 'class').indexOf('mceItem') != -1 || el.nodeName != 'IMG' ) 
    1616                                        return; 
    1717 
    18                                 tb_show('', url + '/editimage.html?TB_iframe=true'); 
     18                                tb_show('', url + '/editimage.html?ver=311b&TB_iframe=true'); 
    1919                                tinymce.DOM.setStyle( ['TB_overlay','TB_window','TB_load'], 'z-index', '999999' ); 
    2020                        }); 
    2121 
     
    7474 
    7575                _do_shcode : function(co) { 
    7676                        return co.replace(/\[wp_caption([^\]]+)\]([\s\S]+?)\[\/wp_caption\][\s\u00a0]*/g, function(a,b,c){ 
     77                                b = b.replace(/\\'|\\&#39;|\\&#039;/g, '&#39;').replace(/\\"|\\&quot;/g, '&quot;'); 
     78                                c = c.replace(/\\&#39;|\\&#039;/g, '&#39;').replace(/\\&quot;/g, '&quot;'); 
    7779                                var id = b.match(/id=['"]([^'"]+)/i), cls = b.match(/align=['"]([^'"]+)/i); 
    7880                                var w = b.match(/width=['"]([0-9]+)/), cap = b.match(/caption=['"]([^'"]+)/i); 
    7981 
     
    9193                }, 
    9294 
    9395                _get_shcode : function(co) { 
    94                         return co.replace(/<div class="mceTemp[^"]*">\s*<dl([^>]+)>\s*<dt[^>]+>([\s\S]+?)<\/dt>\s*<dd[^>]+>([^<]+)<\/dd>\s*<\/dl>\s*<\/div>\s*/gi, function(a,b,c,cap){ 
     96                        return co.replace(/<div class="mceTemp[^"]*">\s*<dl([^>]+)>\s*<dt[^>]+>([\s\S]+?)<\/dt>\s*<dd[^>]+>(.+?)<\/dd>\s*<\/dl>\s*<\/div>\s*/gi, function(a,b,c,cap){ 
    9597                                var id = b.match(/id=['"]([^'"]+)/i), cls = b.match(/class=['"]([^'"]+)/i); 
    9698                                var w = c.match(/width=['"]([0-9]+)/); 
    9799 
     
    101103 
    102104                                if ( ! w || ! cap ) return c; 
    103105                                cls = cls.match(/align[^ '"]+/) || 'alignnone'; 
     106                                cap = cap.replace(/<\S[^<>]*>/gi, '').replace(/'/g, '&#39;').replace(/"/g, '&quot;'); 
    104107 
    105108                                return '[wp_caption id="'+id+'" align="'+cls+'" width="'+w+'" caption="'+cap+'"]'+c+'[/wp_caption]'; 
    106109                        }); 
  • wp-includes/js/tinymce/tiny_mce_config.php

     
    222222// Setup cache info 
    223223if ( $disk_cache ) { 
    224224 
    225         $cacheKey = apply_filters('tiny_mce_version', '20080706'); 
     225        $cacheKey = apply_filters('tiny_mce_version', '20080708'); 
    226226 
    227227        foreach ( $initArray as $v ) 
    228228                $cacheKey .= $v; 
  • wp-includes/media.php

     
    350350        return $html; 
    351351} 
    352352 
    353 add_shortcode('wp_caption', 'wp_caption_shortcode'); 
     353add_shortcode('wp_caption', 'img_caption_shortcode'); 
    354354 
    355 function wp_caption_shortcode($attr, $content = null) { 
     355function img_caption_shortcode($attr, $content = null) { 
    356356         
    357357        // Allow plugins/themes to override the default caption template. 
    358         $output = apply_filters('wp_caption_shortcode', '', $attr, $content); 
     358        $output = apply_filters('img_caption_shortcode', '', $attr, $content); 
    359359        if ( $output != '' ) 
    360360                return $output; 
    361361 
     
    371371         
    372372        if ( $id ) $id = 'id="' . $id . '" '; 
    373373         
    374         return '<dl ' . $id . 'class="wp_caption ' . $align . '" style="width: ' . (10 + (int) $width) . 'px">' 
    375         . '<dt class="wp_caption_dt">' . $content . '</dt><dd class="wp_caption_dd">' . $caption . '</dd></dl>'; 
     374        return '<div ' . $id . 'class="wp-caption ' . $align . '" style="width: ' . (10 + (int) $width) . 'px">' 
     375        . $content . '<p class="wp-caption-text">' . $caption . '</p></div>'; 
    376376} 
    377377 
    378378add_shortcode('gallery', 'gallery_shortcode'); 
  • wp-includes/script-loader.php

     
    3737        $scripts->add( 'editor_functions', '/wp-admin/js/editor.js', false, '20080706' ); 
    3838 
    3939        // Modify this version when tinyMCE plugins are changed. 
    40         $mce_version = apply_filters('tiny_mce_version', '20080706'); 
     40        $mce_version = apply_filters('tiny_mce_version', '20080708'); 
    4141        $scripts->add( 'tiny_mce', '/wp-includes/js/tinymce/tiny_mce_config.php', array('editor_functions'), $mce_version ); 
    4242 
    4343        $scripts->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.6');