Changeset 1355

Show
Ignore:
Timestamp:
07/07/08 17:16:43 (5 months ago)
Author:
donncha
Message:

WP Merge to revision 8266

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/css/press-this.css

    r1336 r1355  
    429429top: 20px; 
    430430right: 25px; 
    431 background: white; 
    432431padding: 5px; 
    433432} 
     
    506505#footer p a:hover { 
    507506        text-decoration: underline; 
     507} 
     508 
     509.centered { 
     510        text-align: center; 
     511} 
  • trunk/wp-admin/gears-manifest.php

    r1347 r1355  
    6565{ 
    6666"betaManifestVersion" : 1, 
    67 "version" : "<?php echo $man_version; ?>_20080703", 
     67"version" : "<?php echo $man_version; ?>_20080704", 
    6868"entries" : [ 
    6969<?php echo $defaults; ?> 
     
    9898{ "url" : "images/wordpress-logo.png" }, 
    9999{ "url" : "images/xit.gif" }, 
     100{ "url" : "images/loading-publish.gif" }, 
     101{ "url" : "images/loading.gif" }, 
    100102 
    101103{ "url" : "../wp-includes/images/crystal/archive.png" }, 
     
    128130{ "url" : "../wp-includes/js/tinymce/themes/advanced/js/anchor.js?ver=311" }, 
    129131{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js?ver=311" }, 
     132{ "url" : "../wp-includes/js/tinymce/tiny_mce.js?ver=311" }, 
     133{ "url" : "../wp-includes/js/tinymce/themes/advanced/editor_template.js?ver=311" }, 
     134{ "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin.js?ver=311" }, 
    130135 
    131136{ "url" : "../wp-includes/js/tinymce/themes/advanced/source_editor.htm?ver=311" }, 
  • trunk/wp-admin/includes/media.php

    r1347 r1355  
    721721 
    722722        $display_title = ( !empty( $title ) ) ? $title : $filename; // $title shouldn't ever be empty, but just in case 
     723        $display_title = wp_html_excerpt($display_title, 100); 
    723724 
    724725        $item = " 
  • trunk/wp-admin/includes/plugin.php

    r1336 r1355  
    471471        $parent = get_admin_page_parent(); 
    472472 
     473        $page_type = 'admin'; 
    473474        if ( empty ( $parent_page ) || 'admin.php' == $parent_page ) { 
    474475                if ( isset( $admin_page_hooks[$plugin_page] )) 
     
    477478                        if ( isset( $admin_page_hooks[$parent] )) 
    478479                                $page_type = $admin_page_hooks[$parent]; 
    479         } else 
    480                 if ( isset( $admin_page_hooks[$parent_page] ) ) { 
    481                         $page_type = $admin_page_hooks[$parent_page]; 
    482                 } else { 
    483                         $page_type = 'admin'; 
    484                 } 
     480        } else if ( isset( $admin_page_hooks[$parent_page] ) ) { 
     481                $page_type = $admin_page_hooks[$parent_page]; 
     482        } 
    485483 
    486484        $plugin_name = preg_replace( '!\.php!', '', $plugin_page ); 
  • trunk/wp-admin/includes/widgets.php

    r1328 r1355  
    6565                                        // it's a multi-widget.  We only need to show it in the list once. 
    6666                                        $already_shown[] = $widget['callback']; 
    67                                         $num = (int) array_pop( explode( '-', $widget['id'] ) ); 
     67                                        $num = (int) array_pop( $ids = explode( '-', $widget['id'] ) ); 
    6868                                        $id_base = $wp_registered_widget_controls[$widget['id']]['id_base']; 
    6969                                        // so that we always add a new one when clicking "add" 
  • trunk/wp-admin/js/editor.js

    r1347 r1355  
    5454        content = content.replace(new RegExp('</div>\\s*', 'mg'), '</div>\n'); 
    5555                content = content.replace(new RegExp('\\s*\\[wp_caption([^\\[]+)\\[/wp_caption\\]\\s*', 'gi'), '\n\n[wp_caption$1[/wp_caption]\n\n'); 
     56                content = content.replace(new RegExp('wp_caption\\]\\n\\n+\\[wp_caption', 'g'), 'wp_caption]\n\n[wp_caption'); 
    5657 
    5758        var blocklist2 = 'blockquote|ul|ol|li|table|thead|tr|th|td|h[1-6]|pre'; 
  • trunk/wp-admin/js/gallery.js

    r1328 r1355  
    1111        // When an update has occurred, adjust the order for each item 
    1212        var galleryReorder = function(e, sort) { 
    13                 jQuery.each(sort['instance'].toArray(), function(i, id) { 
     13                jQuery.each(sort['element'].sortable('toArray'), function(i, id) { 
    1414                        jQuery('#' + id + ' .menu_order input')[0].value = i; 
    1515                }); 
  • trunk/wp-admin/press-this.php

    r1347 r1355  
    137137        </div> 
    138138                 
    139         <p><input type="hidden" name="this_photo" value="<?php echo attribute_escape($image); ?>" id="this_photo" /> 
    140                 <a href="#" class="select"><img src="<?php echo clean_url($image); ?>" width="475" alt="<?php echo attribute_escape(__('Click to insert.')); ?>" title="<?php echo attribute_escape(__('Click to insert.')); ?>" /></a></p> 
    141          
    142         <p id="options"><a href="#" class="select"><?php _e('Insert Image'); ?></a> | <a href="#" class="cancel"><?php _e('Cancel'); ?></a></p> 
     139        <p class="centered"><input type="hidden" name="this_photo" value="<?php echo attribute_escape($image); ?>" id="this_photo" /> 
     140                <a href="#" class="select"><img src="<?php echo clean_url($image); ?>" alt="<?php echo attribute_escape(__('Click to insert.')); ?>" title="<?php echo attribute_escape(__('Click to insert.')); ?>" /></a></p> 
     141         
     142        <p id="options"><a href="#" class="select button"><?php _e('Insert Image'); ?></a> <a href="#" class="cancel button"><?php _e('Cancel'); ?></a></p> 
    143143<?php die;  
    144144} 
     
    296296        <title><?php _e('Press This') ?></title> 
    297297 
    298         <script type="text/javascript" src="../wp-includes/js/tinymce/tiny_mce.js"></script> 
     298        <script type="text/javascript" src="../wp-includes/js/tinymce/tiny_mce.js?ver=311"></script> 
    299299<?php 
    300300        add_thickbox(); 
  • trunk/wp-includes/classes.php

    r1336 r1355  
    9292                        $request_match = $request; 
    9393                        foreach ($rewrite as $match => $query) { 
     94                                // Don't try to match against AtomPub calls 
     95                                if ( $req_uri == 'wp-app.php' ) 
     96                                        break; 
     97 
    9498                                // If the requesting file is the anchor of the match, prepend it 
    9599                                // to the path info. 
  • trunk/wp-includes/functions.php

    r1347 r1355  
    22562256 */ 
    22572257function is_ssl() { 
    2258         return ( 'on' == strtolower($_SERVER['HTTPS']) ) ? true : false;  
     2258        return ( isset($_SERVER['HTTPS']) && 'on' == strtolower($_SERVER['HTTPS']) ) ? true : false;  
    22592259} 
    22602260 
  • trunk/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js

    r1347 r1355  
    128128 
    129129                        // Add Media buttons to fullscreen 
    130             ed.onBeforeExecCommand.add(function(ed, cmd, ui, val) { 
    131                       if ( 'mceFullScreen' != cmd ) return; 
     130                       ed.onBeforeExecCommand.add(function(ed, cmd, ui, val) { 
     131                              if ( 'mceFullScreen' != cmd ) return; 
    132132                                if ( 'mce_fullscreen' != ed.id ) 
    133133                                        ed.settings.theme_advanced_buttons1 += ',|,add_image,add_video,add_audio,add_media'; 
    134                       }); 
     134                      }); 
    135135 
    136136                        // Add class "alignleft", "alignright" and "aligncenter" when selecting align for images. 
    137                         ed.onExecCommand.add(function( ed, cmd ) { 
    138                                 var n, bl, dom = ed.dom; 
    139  
    140                                 if ( 'JustifyCenter' == cmd ) { 
    141                                         tinymce.each(dom.select('img'), function(n) { 
    142                                                 var v = n.className; 
    143  
    144                                                 if (v.indexOf('aligncenter') == -1) { 
    145                                                         dom.getParent(n, function(P) { 
    146                                                                 if (P && P.style && P.style.textAlign == 'center') 
    147                                                                         dom.setStyle(P, 'textAlign', ''); 
    148                                                         }); 
    149                                                 } 
    150                                         }); 
    151  
    152                                         ed.execCommand('mceRepaint'); 
    153                                 } 
    154                         }); 
    155  
    156                         ed.onBeforeExecCommand.add(function( ed, cmd ) { 
    157                                 var n, dir, xdir, bl, dom = ed.dom; 
    158  
    159                                 if ( ( cmd.indexOf('Justify') != -1 ) && ( n = ed.selection.getNode() ) ) { 
    160                                         if ( 'JustifyFull' == cmd || n.nodeName !== 'IMG' ) return; 
    161                                         dir = cmd.substring(7).toLowerCase(); 
    162  
    163                                         if (  ed.queryCommandState( cmd ) ) { 
    164                                                 n.className = n.className.replace(/align[^ '"]+\s?/g, ''); 
    165                                                 dom.addClass( n, "alignnone" ); 
    166                                         } else if ( 'JustifyCenter' == cmd ) { 
    167                                                 n.className = n.className.replace(/alignleft\s?|alignright\s?|alignnone\s?/g, ''); 
    168                                                 if ( dom.hasClass( n, "aligncenter" ) ) { 
    169                                                         dom.removeClass( n, "aligncenter" ); 
    170                                                         dom.addClass( n, "alignnone" ); 
    171                                                 } else 
    172                                                         dom.addClass( n, "aligncenter" ); 
    173  
    174                                         } else { 
    175                                                 n.className = n.className.replace(/align[^ '"]+\s?/g, ''); 
    176                                                 dom.addClass( n, "align"+dir ); 
    177                                         } 
    178                                 } 
    179                         }); 
    180  
    181             // Word count if script is loaded 
    182             if ( 'undefined' != typeof wpWordCount ) { 
    183                 var last = 0; 
    184                 ed.onKeyUp.add(function(ed, e) { 
    185                     if ( e.keyCode == last ) return; 
    186                     if ( 13 == e.keyCode || 8 == last || 46 == last ) wpWordCount.wc( ed.getContent({format : 'raw'}) ); 
    187                     last = e.keyCode; 
    188                 }); 
    189             }; 
    190  
    191             // Add listeners to handle more break 
     137                        ed.addCommand('JustifyLeft', function() { 
     138                                var n = ed.selection.getNode(); 
     139 
     140                                if ( n.nodeName != 'IMG' ) 
     141                                        ed.editorCommands.mceJustify('JustifyLeft', 'left'); 
     142                                else ed.plugins.wordpress.do_align(n, 'alignleft'); 
     143                        }); 
     144 
     145                        ed.addCommand('JustifyRight', function() { 
     146                                var n = ed.selection.getNode(); 
     147 
     148                                if ( n.nodeName != 'IMG' ) 
     149                                        ed.editorCommands.mceJustify('JustifyRight', 'right'); 
     150                                else ed.plugins.wordpress.do_align(n, 'alignright'); 
     151                        }); 
     152 
     153                        ed.addCommand('JustifyCenter', function() { 
     154                                var n = ed.selection.getNode(), P = ed.dom.getParent(n, 'p'), DL = ed.dom.getParent(n, 'dl'); 
     155 
     156                                if ( n.nodeName == 'IMG' && ( P || DL ) ) 
     157                                        ed.plugins.wordpress.do_align(n, 'aligncenter'); 
     158                                else ed.editorCommands.mceJustify('JustifyCenter', 'center'); 
     159                        }); 
     160 
     161                        // Word count if script is loaded 
     162                        if ( 'undefined' != typeof wpWordCount ) { 
     163                                var last = 0; 
     164                                ed.onKeyUp.add(function(ed, e) { 
     165                                        if ( e.keyCode == last ) return; 
     166                                        if ( 13 == e.keyCode || 8 == last || 46 == last ) wpWordCount.wc( ed.getContent({format : 'raw'}) ); 
     167                                        last = e.keyCode; 
     168                                }); 
     169                        }; 
     170 
     171                        // Add listeners to handle more break 
    192172                        t._handleMoreBreak(ed, url); 
    193173 
     
    228208 
    229209                // Internal functions 
     210                do_align : function(n, a) { 
     211                        var P, DL, DIV, cls, c, ed = tinyMCE.activeEditor; 
     212 
     213                        P = ed.dom.getParent(n, 'p'); 
     214                        DL = ed.dom.getParent(n, 'dl'); 
     215                        DIV = ed.dom.getParent(n, 'div'); 
     216 
     217                        if ( DL && DIV ) { 
     218                                cls = ed.dom.hasClass(DL, a) ? 'alignnone' : a; 
     219                                DL.className = DL.className.replace(/align[^ '"]+\s?/g, ''); 
     220                                ed.dom.addClass(DL, cls); 
     221                                c = (cls == 'aligncenter') ? ed.dom.addClass(DIV, 'mceIEcenter') : ed.dom.removeClass(DIV, 'mceIEcenter'); 
     222                        } else if ( P ) { 
     223                                cls = ed.dom.hasClass(n, a) ? 'alignnone' : a; 
     224                                n.className = n.className.replace(/align[^ '"]+\s?/g, ''); 
     225                                ed.dom.addClass(n, cls); 
     226                                if ( cls == 'aligncenter' ) 
     227                                        ed.dom.setStyle(P, 'textAlign', 'center'); 
     228                                else if (P.style && P.style.textAlign == 'center') 
     229                                        ed.dom.setStyle(P, 'textAlign', ''); 
     230                        } 
     231 
     232                        ed.execCommand('mceRepaint'); 
     233                }, 
    230234 
    231235                // Resizes the iframe by a relative height value 
  • trunk/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.js

    r1347 r1355  
    2222                        ed.onInit.add(function(ed) { 
    2323                                tinymce.dom.Event.add(ed.getWin(), 'scroll', function(e) { 
    24                                       ed.plugins.wpeditimage.hideButtons(); 
     24                                      ed.plugins.wpeditimage.hideButtons(); 
    2525                                }); 
    2626                        }); 
     
    2828                        ed.onBeforeExecCommand.add(function(ed, cmd, ui, val) { 
    2929                                ed.plugins.wpeditimage.hideButtons(); 
    30                       }); 
     30                      }); 
    3131 
    3232                        ed.onSaveContent.add(function(ed, o) { 
    33                               ed.plugins.wpeditimage.hideButtons(); 
     33                              ed.plugins.wpeditimage.hideButtons(); 
    3434                        }); 
    3535 
     
    6464 
    6565                        ed.onBeforeSetContent.add(function(ed, o) { 
    66                       o.content = t._do_shcode(o.content); 
    67                       }); 
     66                              o.content = t._do_shcode(o.content); 
     67                      }); 
    6868 
    6969                        ed.onPostProcess.add(function(ed, o) { 
     
    7575                _do_shcode : function(co) { 
    7676                        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=['"]([^'"]+)/); 
     77                                var id = b.match(/id=['"]([^'"]+)/i), cls = b.match(/align=['"]([^'"]+)/i); 
     78                                var w = b.match(/width=['"]([0-9]+)/), cap = b.match(/caption=['"]([^'"]+)/i); 
    7979 
    8080                                id = ( id && id[1] ) ? id[1] : ''; 
     
    9292 
    9393                _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=['"]([^'"]+)/); 
     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){ 
     95                                var id = b.match(/id=['"]([^'"]+)/i), cls = b.match(/class=['"]([^'"]+)/i); 
    9696                                var w = c.match(/width=['"]([0-9]+)/); 
    9797 
     
    101101 
    102102                                if ( ! w || ! cap ) return c; 
    103                                 cls = cls ? cls.match(/align[^ '"]+/) : ''; 
     103                                cls = cls.match(/align[^ '"]+/) || 'alignnone'; 
    104104 
    105105                                return '[wp_caption id="'+id+'" align="'+cls+'" width="'+w+'" caption="'+cap+'"]'+c+'[/wp_caption]'; 
    106                         }); 
    107                 }, 
    108  
    109                 _fixCenter : function(c) { 
    110                         var ed = tinyMCE.activeEditor; 
    111  
    112                         tinymce.each(ed.dom.select('img', c), function(n) { 
    113                                 if ( ed.dom.hasClass(n, 'aligncenter') ) { 
    114                                         var P = ed.dom.getParent(n, 'p'); 
    115                                         if ( tinymce.isIE ) 
    116                                                 ed.dom.addClass(P, 'mce_iecenter'); 
    117                                         if ( P.style && P.style.textAlign == 'center' ) 
    118                                                 ed.dom.setStyle(P, 'textAlign', ''); 
    119                                 } 
    120106                        }); 
    121107                }, 
     
    173159                                ed.execCommand("WP_EditImage"); 
    174160                                this.parentNode.style.display = 'none'; 
    175                         } 
     161                        }; 
    176162 
    177163                        var wp_delimgbtn = DOM.add('wp_editbtns', 'img', { 
     
    197183                                        return false; 
    198184                                } 
    199                         } 
     185                        }; 
    200186                }, 
    201187 
  • trunk/wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js

    r1347 r1355  
    261261                        var dlc = ed.dom.getAttrib(DL, 'class'); 
    262262                        dlc = dlc.match(/align[^ "']+/i); 
    263                         if ( ! dom.hasClass(el, dlc) ) 
     263                        if ( dlc && ! dom.hasClass(el, dlc) ) 
    264264                                c += ' '+dlc; 
    265                                  
     265 
    266266                        tinymce.each(DL.childNodes, function(e) { 
    267                                 if ( e.nodeName == 'DD' ) { 
     267                                if ( e.nodeName == 'DD' && dom.hasClass(e, 'wp_caption_dd') ) { 
    268268                                        caption = e.innerHTML; 
    269269                                        return; 
     
    378378                }); 
    379379 
    380                 if ( ! f.link_href.value ) { 
    381                         if ( A ) { 
    382                                 b = ed.selection.getBookmark(); 
    383                                 ed.dom.remove(A, 1); 
    384                                 ed.selection.moveToBookmark(b); 
    385                         } 
    386                 } else { 
     380                if ( f.link_href.value ) { 
    387381                        // Create new anchor elements 
    388382                        if ( A == null ) { 
    389                                 if ( ! f.link_href.value.match(/https?:\/\//) ) 
     383                                if ( ! f.link_href.value.match(/https?:\/\//i) ) 
    390384                                        f.link_href.value = tinyMCEPopup.editor.documentBaseURI.toAbsolute(f.link_href.value); 
    391385 
     
    432426                                }); 
    433427 
    434                                 if ( DIV )  
     428                                if ( DIV ) 
    435429                                        ed.dom.setAttrib(DIV, 'class', div_cls); 
    436430 
     
    439433 
    440434                        } else { 
     435                                var lnk = '', pa; 
    441436                                if ( (id = f.img_classes.value.match( /wp-image-([0-9]{1,6})/ )) && id[1] ) 
    442437                                        cap_id = 'attachment_'+id[1]; 
    443438 
    444                                 if ( f.link_href.value ) html = ed.dom.getOuterHTML(ed.dom.getParent(el, 'a')); 
    445                                 else html = ed.dom.getOuterHTML(el); 
     439                                if ( f.link_href.value && (lnk = ed.dom.getParent(el, 'a')) ) { 
     440                                        if ( lnk.childNodes.length == 1 ) 
     441                                                html = ed.dom.getOuterHTML(lnk); 
     442                                        else { 
     443                                                html = ed.dom.getOuterHTML(lnk); 
     444                                                html = html.match(/<a[^>]+>/i); 
     445                                                html = html+ed.dom.getOuterHTML(el)+'</a>'; 
     446                                        } 
     447                                } else html = ed.dom.getOuterHTML(el); 
    446448 
    447449                                html = '<dl id="'+cap_id+'" class="wp_caption '+t.align+'" style="width: '+cap_width+ 
     
    452454                                if ( P ) { 
    453455                                        P.parentNode.insertBefore(cap, P); 
    454                                         ed.dom.remove(P); 
     456                                        if ( P.childNodes.length == 1 ) 
     457                                                ed.dom.remove(P); 
     458                                        else if ( lnk && lnk.childNodes.length == 1 ) 
     459                                                ed.dom.remove(lnk); 
     460                                        else ed.dom.remove(el); 
     461                                } else if ( pa = ed.dom.getParent(el, 'TD,TH,LI') ) { 
     462                                        pa.appendChild(cap); 
     463                                        if ( lnk && lnk.childNodes.length == 1 ) 
     464                                                ed.dom.remove(lnk); 
     465                                        else ed.dom.remove(el); 
    455466                                } 
    456467                        } 
    457468 
    458                         tinyMCEPopup.execCommand("mceEndUndoLevel"); 
    459                         ed.execCommand('mceRepaint'); 
    460                         tinyMCEPopup.close(); 
    461                         return; 
    462469                } else { 
    463470                        if ( DL && DIV ) { 
    464                                 if ( f.link_href.value ) html = ed.dom.getOuterHTML(ed.dom.getParent(el, 'a')); 
     471                                var aa; 
     472                                if ( f.link_href.value && (aa = ed.dom.getParent(el, 'a')) ) html = ed.dom.getOuterHTML(aa); 
    465473                                else html = ed.dom.getOuterHTML(el); 
    466                                  
     474 
    467475                                P = ed.dom.create('p', {}, html); 
    468476                                DIV.parentNode.insertBefore(P, DIV); 
     
    477485                        if ( P && P.style && P.style.textAlign == 'center' ) 
    478486                                ed.dom.setStyle(P, 'textAlign', ''); 
     487                } 
     488 
     489                if ( ! f.link_href.value && A ) { 
     490                        b = ed.selection.getBookmark(); 
     491                        ed.dom.remove(A, 1); 
     492                        ed.selection.moveToBookmark(b); 
    479493                } 
    480494 
  • trunk/wp-includes/js/tinymce/tiny_mce_config.php

    r1347 r1355  
    223223if ( $disk_cache ) { 
    224224 
    225         $cacheKey = apply_filters('tiny_mce_version', '20080703'); 
     225        $cacheKey = apply_filters('tiny_mce_version', '20080706'); 
    226226 
    227227        foreach ( $initArray as $v ) 
  • trunk/wp-includes/media.php

    r1347 r1355  
    7474        elseif ( $size == 'thumbnail' ) { 
    7575                // fall back to the old thumbnail 
    76                 if ( $thumb_file = wp_get_attachment_thumb_file() && $info = getimagesize($thumb_file) ) { 
     76                if ( ($thumb_file = wp_get_attachment_thumb_file($id)) && $info = getimagesize($thumb_file) ) { 
    7777                        $img_url = str_replace(basename($img_url), basename($thumb_file), $img_url); 
    7878                        $width = $info[0]; 
     
    275275 
    276276function image_get_intermediate_size($post_id, $size='thumbnail') { 
    277         if ( !$imagedata = wp_get_attachment_metadata( $post_id ) ) 
     277        if ( !is_array( $imagedata = wp_get_attachment_metadata( $post_id ) ) ) 
    278278                return false; 
    279279 
  • trunk/wp-includes/post.php

    r1344 r1355  
    24252425        if ( !$post =& get_post( $post_id ) ) 
    24262426                return false; 
    2427         if ( !$imagedata = wp_get_attachment_metadata( $post->ID ) ) 
     2427        if ( !is_array( $imagedata = wp_get_attachment_metadata( $post->ID ) ) ) 
    24282428                return false; 
    24292429 
  • trunk/wp-includes/script-loader.php

    r1347 r1355  
    3535        $scripts->add( 'editor', false, $visual_editor, '20080321' ); 
    3636 
    37         $scripts->add( 'editor_functions', '/wp-admin/js/editor.js', false, '20080702' ); 
     37        $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', '20080703'); 
     40        $mce_version = apply_filters('tiny_mce_version', '20080706'); 
    4141        $scripts->add( 'tiny_mce', '/wp-includes/js/tinymce/tiny_mce_config.php', array('editor_functions'), $mce_version ); 
    4242 
     
    159159                        'edit' => __('Edit'), 
    160160                ) ); 
    161                 $scripts->add( 'admin-gallery', '/wp-admin/js/gallery.js', array( 'jquery-ui-sortable' ), '20080520' ); 
     161                $scripts->add( 'admin-gallery', '/wp-admin/js/gallery.js', array( 'jquery-ui-sortable' ), '20080705' ); 
    162162                $scripts->add( 'media-upload', '/wp-admin/js/media-upload.js', array( 'thickbox' ), '20080702' ); 
    163163                $scripts->localize( 'upload', 'uploadL10n', array( 
     
    230230        $styles->add( 'install', '/wp-admin/css/install.css' ); 
    231231        $styles->add( 'theme-editor', '/wp-admin/css/theme-editor.css' ); 
    232         $styles->add( 'press-this', '/wp-admin/css/press-this.css' ); 
     232        $styles->add( 'press-this', '/wp-admin/css/press-this.css', array(), '20080704' ); 
    233233        $styles->add( 'thickbox', '/wp-includes/js/thickbox/thickbox.css', array(), '20080613' ); 
    234234        $styles->add( 'login', '/wp-admin/css/login.css' ); 
  • trunk/wp-includes/wp-diff.php

    r1328 r1355  
    309309        function _splitOnWords($string, $newlineEscape = "\n") { 
    310310                $string = str_replace("\0", '', $string); 
    311                 $words  = preg_split( '/([^\w])/', $string, -1, PREG_SPLIT_DELIM_CAPTURE ); 
     311                $words  = preg_split( '/([^\w])/u', $string, -1, PREG_SPLIT_DELIM_CAPTURE ); 
    312312                $words  = str_replace( "\n", $newlineEscape, $words ); 
    313313                return $words;