Changeset 8239
- Timestamp:
- 07/02/2008 06:41:11 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/gears-manifest.php
r8204 r8239 65 65 { 66 66 "betaManifestVersion" : 1, 67 "version" : "<?php echo $man_version; ?>_20080 626",67 "version" : "<?php echo $man_version; ?>_20080701", 68 68 "entries" : [ 69 69 <?php echo $defaults; ?> -
trunk/wp-admin/includes/media.php
r8201 r8239 62 62 return $html; 63 63 } 64 65 function image_add_caption( $html, $id, $alt, $title, $align, $url, $size ) { 66 67 if ( empty($alt) ) return $html; 68 $id = ( 0 < (int) $id ) ? 'attachment_' . $id : ''; 69 70 preg_match( '/width="([0-9]+)/', $html, $matches ); 71 if ( ! isset($matches[1]) ) return $html; 72 $width = $matches[1]; 73 74 $html = preg_replace( '/align[^\s\'"]+\s?/', '', $html ); 75 if ( empty($align) ) $align = 'none'; 76 77 $shcode = '[wp_caption id="' . $id . '" align="align' . $align 78 . '" width="' . $width . '" caption="' . $alt . '"]' . $html . '[/wp_caption]'; 79 80 return apply_filters( 'image_add_caption_shortcode', $shcode, $html ); 81 } 82 add_filter( 'image_send_to_editor', 'image_add_caption', 20, 7 ); 64 83 65 84 function media_send_to_editor($html) { -
trunk/wp-admin/js/editor.js
r7716 r8239 53 53 content = content.replace(new RegExp('\\s*<div', 'mg'), '\n<div'); 54 54 content = content.replace(new RegExp('</div>\\s*', 'mg'), '</div>\n'); 55 content = content.replace(new RegExp('\\s*\\[wp_caption([^\\[]+)\\[/wp_caption\\]\\s*', 'gi'), '\n\n[wp_caption$1[/wp_caption]\n\n'); 55 56 56 57 var blocklist2 = 'blockquote|ul|ol|li|table|thead|tr|th|td|h[1-6]|pre'; … … 70 71 // Trim whitespace 71 72 content = content.replace(new RegExp('^\\s*', ''), ''); 72 content = content.replace(new RegExp(' \\s*$', ''), '');73 content = content.replace(new RegExp('[\\s\\u00a0]*$', ''), ''); 73 74 74 75 // put back the line breaks in pre|script … … 165 166 pee = pee.replace(new RegExp('(</?(?:'+blocklist+')[^>]*>)\\s*<br />', 'gi'), "$1"); 166 167 pee = pee.replace(new RegExp('<br />(\\s*</?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)>)', 'gi'), '$1'); 168 pee = pee.replace(new RegExp('(?:<p>|<br ?/?>)*\\s*\\[wp_caption([^\\[]+)\\[/wp_caption\\]\\s*(?:</p>|<br ?/?>)*', 'gi'), '[wp_caption$1[/wp_caption]'); 167 169 // pee = pee.replace(new RegExp('^((?: )*)\\s', 'mg'), '$1 '); 168 170 -
trunk/wp-admin/js/media-upload.js
r8194 r8239 7 7 8 8 ed.execCommand('mceInsertContent', false, h); 9 ed.execCommand('mceCleanup'); 9 10 } else 10 11 edInsertContent(edCanvas, h); -
trunk/wp-content/themes/classic/style.css
r7361 r8239 320 320 text-transform: capitalize; 321 321 } 322 323 /* Captions & aligment */ 324 .aligncenter, 325 dl.aligncenter { 326 display: block; 327 margin-left: auto; 328 margin-right: auto; 329 } 330 331 .alignleft { 332 float: left; 333 } 334 335 .alignright { 336 float: right; 337 } 338 339 .wp_caption { 340 border: 1px solid #ddd; 341 text-align: center; 342 background-color: #f3f3f3; 343 padding-top: 4px; 344 margin: 10px; 345 -moz-border-radius: 3px; 346 -khtml-border-radius: 3px; 347 -webkit-border-radius: 3px; 348 border-radius: 3px; 349 } 350 351 .wp_caption img { 352 margin: 0; 353 padding: 0; 354 border: 0 none; 355 } 356 357 .wp_caption_dd { 358 font-size: 11px; 359 line-height: 17px; 360 padding: 0 4px 5px; 361 margin: 0; 362 } 363 /* End captions & aligment */ -
trunk/wp-content/themes/default/style.css
r7883 r8239 639 639 640 640 641 /* Captions */ 642 .aligncenter, 643 dl.aligncenter { 644 display: block; 645 margin-left: auto; 646 margin-right: auto; 647 } 648 649 .wp_caption { 650 border: 1px solid #ddd; 651 text-align: center; 652 background-color: #f3f3f3; 653 padding-top: 4px; 654 margin: 10px; 655 -moz-border-radius: 3px; 656 -khtml-border-radius: 3px; 657 -webkit-border-radius: 3px; 658 border-radius: 3px; 659 } 660 661 .wp_caption img { 662 margin: 0; 663 padding: 0; 664 border: 0 none; 665 } 666 667 .wp_caption_dd { 668 font-size: 11px; 669 line-height: 17px; 670 padding: 0 4px 5px; 671 margin: 0; 672 } 673 /* End captions */ 674 675 641 676 /* "Daisy, Daisy, give me your answer do. I'm half crazy all for the love of you. 642 677 It won't be a stylish marriage, I can't afford a carriage. -
trunk/wp-includes/js/tinymce/langs/wp-langs.php
r8167 r8239 401 401 tinyMCE.addI18n("' . $language . '.wpeditimage",{ 402 402 edit_img:"' . mce_escape( __('Edit Image') ) . '", 403 del_img:"' . mce_escape( __('Delete Image') ) . '", 403 404 adv_settings:"' . mce_escape( __('Advanced Settings') ) . '", 404 405 none:"' . mce_escape( __('None') ) . '", -
trunk/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.js
r8167 r8239 35 35 36 36 ed.onMouseUp.add(function(ed, e) { 37 if ( tinymce.isOpera ) 38 ed.plugins.wpeditimage.showButtons(e); 37 if ( ! tinymce.isOpera ) return; 38 if ( e.target.nodeName == 'IMG' ) 39 ed.plugins.wpeditimage.showButtons(e.target); 39 40 }); 40 41 41 42 ed.onMouseDown.add(function(ed, e) { 42 if ( tinymce.isOpera ) return; 43 ed.plugins.wpeditimage.showButtons(e); 44 }); 45 /* 46 ed.onSetContent.add(function() { 47 t._fixCenter(ed.getBody()); 48 }); 49 50 ed.onPreProcess.add(function(ed, o) { 51 if (o.set) 52 t._fixCenter(o.node); 53 43 if ( tinymce.isOpera || e.target.nodeName != 'IMG' ) { 44 t.hideButtons(); 45 return; 46 } 47 ed.plugins.wpeditimage.showButtons(e.target); 48 }); 49 50 ed.onKeyPress.add(function(ed, e) { 51 var DL, DIV; 52 53 if ( e.keyCode == 13 && (DL = ed.dom.getParent(ed.selection.getNode(), 'DL')) ) { 54 var P = ed.dom.create('p', {}, ' '); 55 if ( (DIV = DL.parentNode) && DIV.nodeName == 'DIV' ) 56 ed.dom.insertAfter( P, DIV ); 57 else ed.dom.insertAfter( P, DL ); 58 59 tinymce.dom.Event.cancel(e); 60 ed.selection.select(P); 61 return false; 62 } 63 }); 64 65 ed.onBeforeSetContent.add(function(ed, o) { 66 o.content = t._do_shcode(o.content); 67 }); 68 69 ed.onPostProcess.add(function(ed, o) { 54 70 if (o.get) 55 ed.dom.removeClass(ed.dom.select('p', o.node), 'mce_iecenter'); 56 }); 57 */ 71 o.content = t._get_shcode(o.content); 72 }); 73 }, 74 75 _do_shcode : function(co) { 76 return co.replace(/\[wp_caption([^\]]+)\]([\s\S]+?)\[\/wp_caption\][\s\u00a0]*/g, function(a,b,c){ 77 var id = b.match(/id=['"]([^'"]+)/), cls = b.match(/align=['"]([^'"]+)/); 78 var w = b.match(/width=['"]([0-9]+)/), cap = b.match(/caption=['"]([^'"]+)/); 79 80 id = ( id && id[1] ) ? id[1] : ''; 81 cls = ( cls && cls[1] ) ? cls[1] : 'alignnone'; 82 w = ( w && w[1] ) ? w[1] : ''; 83 cap = ( cap && cap[1] ) ? cap[1] : ''; 84 if ( ! w || ! cap ) return c; 85 86 var div_cls = (cls == 'aligncenter') ? 'mceTemp mceIEcenter' : 'mceTemp'; 87 88 return '<div class="'+div_cls+'"><dl id="'+id+'" class="wp_caption '+cls+'" style="width: '+(10+parseInt(w))+ 89 'px"><dt class="wp_caption_dt">'+c+'</dt><dd class="wp_caption_dd">'+cap+'</dd></dl></div>'; 90 }); 91 }, 92 93 _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*/g, function(a,b,c,cap){ 95 var id = b.match(/id=['"]([^'"]+)/), cls = b.match(/class=['"]([^'"]+)/); 96 var w = c.match(/width=['"]([0-9]+)/); 97 98 id = ( id && id[1] ) ? id[1] : ''; 99 cls = ( cls && cls[1] ) ? cls[1] : 'alignnone'; 100 w = ( w && w[1] ) ? w[1] : ''; 101 102 if ( ! w || ! cap ) return c; 103 cls = cls ? cls.match(/align[^ '"]+/) : ''; 104 105 return '[wp_caption id="'+id+'" align="'+cls+'" width="'+w+'" caption="'+cap+'"]'+c+'[/wp_caption]'; 106 }); 58 107 }, 59 108 … … 72 121 }, 73 122 74 showButtons : function(e) { 75 var t = this, ed = tinyMCE.activeEditor, p1, p2, vp, DOM = tinymce.DOM, X, Y, el = e.target; 76 77 t.hideButtons(); 78 if (el.nodeName == 'IMG') { 79 if (ed.dom.getAttrib(el, 'class').indexOf('mceItem') != -1) 80 return; 81 82 vp = ed.dom.getViewPort(ed.getWin()); 83 p1 = DOM.getPos(ed.getContentAreaContainer()); 84 p2 = ed.dom.getPos(el); 85 86 X = Math.max(p2.x - vp.x, 0) + p1.x; 87 Y = Math.max(p2.y - vp.y, 0) + p1.y; 88 89 DOM.setStyles('wp_editbtns', { 90 'top' : Y+5+'px', 91 'left' : X+5+'px', 92 'display' : 'block' 93 }); 94 95 t.btnsTout = window.setTimeout( function(){ed.plugins.wpeditimage.hideButtons();}, 5000 ); 96 } 123 showButtons : function(n) { 124 var t = this, ed = tinyMCE.activeEditor, p1, p2, vp, DOM = tinymce.DOM, X, Y; 125 126 if (ed.dom.getAttrib(n, 'class').indexOf('mceItem') != -1) 127 return; 128 129 vp = ed.dom.getViewPort(ed.getWin()); 130 p1 = DOM.getPos(ed.getContentAreaContainer()); 131 p2 = ed.dom.getPos(n); 132 133 X = Math.max(p2.x - vp.x, 0) + p1.x; 134 Y = Math.max(p2.y - vp.y, 0) + p1.y; 135 136 DOM.setStyles('wp_editbtns', { 137 'top' : Y+5+'px', 138 'left' : X+5+'px', 139 'display' : 'block' 140 }); 141 142 t.btnsTout = window.setTimeout( function(){ed.plugins.wpeditimage.hideButtons();}, 5000 ); 97 143 }, 98 144 99 145 hideButtons : function() { 146 if ( tinymce.DOM.isHidden('wp_editbtns') ) return; 147 100 148 tinymce.DOM.hide('wp_editbtns'); 101 149 window.clearTimeout(this.btnsTout); … … 117 165 width : '24', 118 166 height : '24', 119 title : 'Edit'167 title : ed.getLang('wpeditimage.edit_img') 120 168 }); 121 169 … … 132 180 width : '24', 133 181 height : '24', 134 title : 'Delete'182 title : ed.getLang('wpeditimage.del_img') 135 183 }); 136 184 … … 138 186 var ed = tinyMCE.activeEditor, el = ed.selection.getNode(), p; 139 187 140 if ( el.nodeName != 'IMG' || ed.dom.getAttrib(el, 'class').indexOf('mceItem') != -1 ) return; 141 142 if ( (p = ed.dom.getParent(el, 'A')) && p.childNodes.length == 1) 143 ed.dom.remove(p); 144 else ed.dom.remove(el); 145 146 this.parentNode.style.display = 'none'; 147 ed.execCommand('mceRepaint'); 148 return false; 188 if ( el.nodeName == 'IMG' && ed.dom.getAttrib(el, 'class').indexOf('mceItem') == -1 ) { 189 if ( (p = ed.dom.getParent(el, 'div')) && ed.dom.hasClass(p, 'mceTemp') ) 190 ed.dom.remove(p); 191 else if ( (p = ed.dom.getParent(el, 'A')) && p.childNodes.length == 1 ) 192 ed.dom.remove(p); 193 else ed.dom.remove(el); 194 195 this.parentNode.style.display = 'none'; 196 ed.execCommand('mceRepaint'); 197 return false; 198 } 149 199 } 150 200 }, -
trunk/wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js
r8204 r8239 96 96 width : '', 97 97 height : '', 98 align : '', 99 img_alt : '', 98 100 99 101 setTabs : function(tab) { … … 126 128 var t = this, cls = t.I('img_classes').value; 127 129 128 t.I('img_demo').className = v;130 t.I('img_demo').className = t.align = v; 129 131 130 132 cls = cls.replace( /align[^ "']+/gi, '' ); … … 136 138 t.updateStyle('hspace'); 137 139 } 138 140 139 141 t.I('img_classes').value = cls; 140 142 }, … … 154 156 showSizeSet : function() { 155 157 var t = this; 156 158 157 159 if ( (t.width * 1.3) > parseInt(t.preloadImg.width) ) { 158 160 var s130 = t.I('s130'), s120 = t.I('s120'), s110 = t.I('s110'); … … 244 246 245 247 setup : function() { 246 var t = this, h, c, el, id, link, fname, f = document.forms[0], ed = tinyMCEPopup.editor, d = t.I('img_demo'), dom = tinyMCEPopup.dom ;248 var t = this, h, c, el, id, link, fname, f = document.forms[0], ed = tinyMCEPopup.editor, d = t.I('img_demo'), dom = tinyMCEPopup.dom, DL, caption; 247 249 document.dir = tinyMCEPopup.editor.getParam('directionality',''); 248 250 tinyMCEPopup.restoreSelection(); … … 253 255 ed.dom.setStyle(el, 'float', ''); 254 256 t.getImageData(); 257 c = ed.dom.getAttrib(el, 'class'); 258 caption = t.img_alt = ed.dom.getAttrib(el, 'alt'); 259 260 if ( DL = dom.getParent(el, 'dl') ) { 261 var dlc = ed.dom.getAttrib(DL, 'class'); 262 dlc = dlc.match(/align[^ "']+/i); 263 if ( ! dom.hasClass(el, dlc) ) 264 c += ' '+dlc; 265 266 tinymce.each(DL.childNodes, function(e) { 267 if ( e.nodeName == 'DD' ) { 268 caption = e.innerHTML; 269 return; 270 } 271 }); 272 } 255 273 256 274 f.img_title.value = ed.dom.getAttrib(el, 'title'); 257 f.img_alt.value = ed.dom.getAttrib(el, 'alt');275 f.img_alt.value = caption; 258 276 f.border.value = ed.dom.getAttrib(el, 'border'); 259 277 f.vspace.value = ed.dom.getAttrib(el, 'vspace'); … … 262 280 f.width.value = t.width = ed.dom.getAttrib(el, 'width'); 263 281 f.height.value = t.height = ed.dom.getAttrib(el, 'height'); 264 f.img_classes.value = c = ed.dom.getAttrib(el, 'class');282 f.img_classes.value = c; 265 283 f.img_style.value = ed.dom.getAttrib(el, 'style'); 266 284 … … 292 310 if ( c.indexOf('alignleft') != -1 ) { 293 311 t.I('alignleft').checked = "checked"; 294 d.className = "alignleft";312 d.className = t.align = "alignleft"; 295 313 } else if ( c.indexOf('aligncenter') != -1 ) { 296 314 t.I('aligncenter').checked = "checked"; 297 d.className = "aligncenter";315 d.className = t.align = "aligncenter"; 298 316 } else if ( c.indexOf('alignright') != -1 ) { 299 317 t.I('alignright').checked = "checked"; 300 d.className = "alignright";318 d.className = t.align = "alignright"; 301 319 } else if ( c.indexOf('alignnone') != -1 ) { 302 320 t.I('alignnone').checked = "checked"; 303 d.className = "alignnone";321 d.className = t.align = "alignnone"; 304 322 } 305 323 306 324 if ( t.width && t.preloadImg.width ) t.showSizeSet(); 307 325 document.body.style.display = ''; 308 /*309 // Test if is attachment310 if ( (id = c.match( /wp-image-([0-9]{1,6})/ )) && id[1] ) {311 t.I('tab_attachment').href = tinymce.documentBaseURL + 'media.php?action=edit&attachment_id=' + id[1];312 t.I('tab_attachment').style.display = 'inline';313 }314 */315 326 }, 316 327 … … 322 333 if (el.nodeName != 'IMG') return; 323 334 324 if ( (p = ed.dom.getParent(el, ' A')) && p.childNodes.length == 1)335 if ( (p = ed.dom.getParent(el, 'div')) && ed.dom.hasClass(p, 'mceTemp') ) 325 336 ed.dom.remove(p); 326 else 327 ed.dom.remove(el); 337 else if ( (p = ed.dom.getParent(el, 'A')) && p.childNodes.length == 1 ) 338 ed.dom.remove(p); 339 else ed.dom.remove(el); 328 340 329 341 ed.execCommand('mceRepaint'); … … 333 345 334 346 update : function() { 335 var t = this, f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, el, P, A, v = f.img_classes.value;347 var t = this, f = document.forms[0], ed = tinyMCEPopup.editor, el, b, fixSafari = null, DL, P, A, DIV, do_caption = null, img_class = f.img_classes.value, html; 336 348 337 349 tinyMCEPopup.restoreSelection(); … … 339 351 340 352 if (el.nodeName != 'IMG') return; 341 if (f.img_src.value === '') t.remove(); 342 343 A = ed.dom.getParent(el, 'A'); 353 if (f.img_src.value === '') { 354 t.remove(); 355 return; 356 } 357 358 if ( f.img_alt.value != '' && f.width.value != '' ) { 359 do_caption = 1; 360 img_class = img_class.replace( /align[^ "']+\s?/gi, '' ); 361 } 362 363 A = ed.dom.getParent(el, 'a'); 344 364 P = ed.dom.getParent(el, 'p'); 365 DL = ed.dom.getParent(el, 'dl'); 366 DIV = ed.dom.getParent(el, 'div'); 367 345 368 tinyMCEPopup.execCommand("mceBeginUndoLevel"); 346 /* if ( tinymce.isIE ) { 347 if ( f.img_classes.value.indexOf('aligncenter') != -1 ) 348 ed.dom.addClass(P, 'mce_iecenter'); 349 else ed.dom.removeClass(P, 'mce_iecenter'); 350 } 351 */ 369 352 370 ed.dom.setAttribs(el, { 353 371 src : f.img_src.value, 354 372 title : f.img_title.value, 355 alt : f.img_alt.value,373 alt : t.img_alt, 356 374 width : f.width.value, 357 375 height : f.height.value, 358 376 style : f.img_style.value, 359 'class' : '' //f.img_classes.value377 'class' : img_class 360 378 }); 361 379 … … 369 387 // Create new anchor elements 370 388 if ( A == null ) { 371 372 389 if ( ! f.link_href.value.match(/https?:\/\//) ) 373 390 f.link_href.value = tinyMCEPopup.editor.documentBaseURI.toAbsolute(f.link_href.value); 374 391 392 if ( tinymce.isWebKit && ed.dom.hasClass(el, 'aligncenter') ) { 393 ed.dom.removeClass(el, 'aligncenter'); 394 fixSafari = 1; 395 } 396 375 397 tinyMCEPopup.execCommand("CreateLink", false, "#mce_temp_url#", {skip_undo : 1}); 376 398 if ( fixSafari ) ed.dom.addClass(el, 'aligncenter'); 399 377 400 tinymce.each(ed.dom.select("a"), function(n) { 378 401 if (ed.dom.getAttrib(n, 'href') == '#mce_temp_url#') { 379 402 380 403 ed.dom.setAttribs(n, { 381 404 href : f.link_href.value, … … 400 423 } 401 424 402 ed.dom.setAttrib(el, 'class', f.img_classes.value); 403 404 if ( v.indexOf('aligncenter') != -1 ) { 425 if ( do_caption ) { 426 var id, cap_id = '', cap, DT, DD, cap_width = 10 + parseInt(f.width.value), align = t.align.substring(5), div_cls = (t.align == 'aligncenter') ? 'mceTemp mceIEcenter' : 'mceTemp'; 427 428 if ( DL ) { 429 ed.dom.setAttribs(DL, { 430 'class' : 'wp_caption '+t.align, 431 style : 'width: '+cap_width+'px;' 432 }); 433 434 if ( DIV ) 435 ed.dom.setAttrib(DIV, 'class', div_cls); 436 437 if ( (DT = ed.dom.getParent(el, 'dt')) && (DD = DT.nextSibling) && ed.dom.hasClass(DD, 'wp_caption_dd') ) 438 ed.dom.setHTML(DD, f.img_alt.value); 439 440 } else { 441 if ( (id = f.img_classes.value.match( /wp-image-([0-9]{1,6})/ )) && id[1] ) 442 cap_id = 'attachment_'+id[1]; 443 444 if ( f.link_href.value ) html = ed.dom.getOuterHTML(ed.dom.getParent(el, 'a')); 445 else html = ed.dom.getOuterHTML(el); 446 447 html = '<dl id="'+cap_id+'" class="wp_caption '+t.align+'" style="width: '+cap_width+ 448 'px"><dt class="wp_caption_dt">'+html+'</dt><dd class="wp_caption_dd">'+f.img_alt.value+'</dd></dl>'; 449 450 cap = ed.dom.create('div', {'class': div_cls}, html); 451 452 if ( P ) { 453 P.parentNode.insertBefore(cap, P); 454 ed.dom.remove(P); 455 } 456 } 457 458 tinyMCEPopup.execCommand("mceEndUndoLevel"); 459 ed.execCommand('mceRepaint'); 460 tinyMCEPopup.close(); 461 return; 462 } else { 463 if ( DL ) { 464 if ( f.link_href.value ) html = ed.dom.getOuterHTML(ed.dom.getParent(el, 'a')); 465 else html = ed.dom.getOuterHTML(el); 466 467 P = ed.dom.create('p', {}, html); 468 DL.parentNode.insertBefore(P,DL); 469 ed.dom.remove(DL.childNodes); 470 ed.dom.remove(DL); 471 } 472 } 473 474 if ( f.img_classes.value.indexOf('aligncenter') != -1 ) { 405 475 if ( P && ( ! P.style || P.style.textAlign != 'center' ) ) 406 476 ed.dom.setStyle(P, 'textAlign', 'center'); … … 409 479 ed.dom.setStyle(P, 'textAlign', ''); 410 480 } 481 411 482 tinyMCEPopup.execCommand("mceEndUndoLevel"); 412 483 ed.execCommand('mceRepaint'); … … 497 568 f.height.value = t.height = t.preloadImg.height; 498 569 } 499 570 500 571 t.showSizeSet(); 501 572 t.demoSetSize(); -
trunk/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/content.css
r8167 r8239 1 body, td , pre{color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;}1 body, td {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;} 2 2 body {background:#FFF;} 3 3 body.mceForceColors {background:#FFF; color:#000;} … … 18 18 cite {border-bottom:1px dashed blue} 19 19 acronym {border-bottom:1px dotted #CCC; cursor:help} 20 21 p.mce_iecenter {22 text-align: center;23 } -
trunk/wp-includes/js/tinymce/wordpress.css
r7687 r8239 1 1 /* This file contains the CSS data for the editable area(iframe) of TinyMCE */ 2 2 3 .aligncenter { 3 .aligncenter, 4 dl.aligncenter { 4 5 display: block; 5 6 margin-left: auto; … … 13 14 .alignright { 14 15 float: right; 16 } 17 18 .wp_caption { 19 border: 1px solid #ddd; 20 text-align: center; 21 background-color: #f3f3f3; 22 padding-top: 4px; 23 margin: 10px; 24 -moz-border-radius: 3px; 25 -khtml-border-radius: 3px; 26 -webkit-border-radius: 3px; 27 border-radius: 3px; 28 } 29 30 .wp_caption img { 31 margin: 0; 32 padding: 0; 33 border: 0 none; 34 } 35 36 .wp_caption_dd { 37 font-size: 11px; 38 line-height: 17px; 39 padding: 0 4px 5px; 40 margin: 0; 15 41 } 16 42 … … 64 90 background: url(img/items.gif) no-repeat bottom left; 65 91 } 92 93 .mceIEcenter { 94 text-align: center; 95 } -
trunk/wp-includes/media.php
r8029 r8239 349 349 350 350 return $html; 351 } 352 353 add_shortcode('wp_caption', 'wp_caption_shortcode'); 354 355 function wp_caption_shortcode($attr, $content = null) { 356 357 // Allow plugins/themes to override the default caption template. 358 $output = apply_filters('wp_caption_shortcode', '', $attr, $content); 359 if ( $output != '' ) 360 return $output; 361 362 extract(shortcode_atts(array( 363 'id' => '', 364 'align' => 'alignnone', 365 'width' => '', 366 'caption' => '' 367 ), $attr)); 368 369 if ( 1 > (int) $width || empty($caption) ) 370 return $content; 371 372 if ( $id ) $id = 'id="' . $id . '" '; 373 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>'; 351 376 } 352 377 -
trunk/wp-includes/script-loader.php
r8214 r8239 35 35 $scripts->add( 'editor', false, $visual_editor, '20080321' ); 36 36 37 $scripts->add( 'editor_functions', '/wp-admin/js/editor.js', false, '20080 325' );37 $scripts->add( 'editor_functions', '/wp-admin/js/editor.js', false, '20080701' ); 38 38 39 39 // Modify this version when tinyMCE plugins are changed. 40 $mce_version = apply_filters('tiny_mce_version', '20080 626');40 $mce_version = apply_filters('tiny_mce_version', '20080701'); 41 41 $scripts->add( 'tiny_mce', '/wp-includes/js/tinymce/tiny_mce_config.php', array('editor_functions'), $mce_version ); 42 42 … … 160 160 ) ); 161 161 $scripts->add( 'admin-gallery', '/wp-admin/js/gallery.js', array( 'jquery-ui-sortable' ), '20080520' ); 162 $scripts->add( 'media-upload', '/wp-admin/js/media-upload.js', array( 'thickbox' ), '20080 625' );162 $scripts->add( 'media-upload', '/wp-admin/js/media-upload.js', array( 'thickbox' ), '20080701' ); 163 163 $scripts->localize( 'upload', 'uploadL10n', array( 164 164 'browseTitle' => attribute_escape(__('Browse your files')),
Note: See TracChangeset
for help on using the changeset viewer.