WordPress.org

Make WordPress Core


Ignore:
Location:
branches/2.8
Files:
2 added
24 edited

Legend:

Unmodified
Added
Removed
  • branches/2.8/readme.html

    r12077 r11806  
    99<h1 id="logo" style="text-align: center">
    1010    <img alt="WordPress" src="wp-admin/images/wordpress-logo.png" />
    11     <br /> Version 2.8.5
     11    <br /> Version 2.8.4
    1212</h1>
    1313<p style="text-align: center">Semantic Personal Publishing Platform</p>
     
    3030<h1>Upgrading</h1>
    3131<p>Before you upgrade anything, make sure you have backup copies of any files you may have modified such as <code>index.php</code>.</p>
    32 <h2>Upgrading from any previous WordPress to 2.8.5:</h2>
     32<h2>Upgrading from any previous WordPress to 2.8.4:</h2>
    3333<ol>
    3434    <li>Delete your old WP files, saving ones you've modified.</li>
  • branches/2.8/wp-admin/edit-attachment-rows.php

    r12077 r11806  
    210210} // end if ( have_posts() )
    211211?>
     212
  • branches/2.8/wp-admin/import/wordpress.php

    r12077 r11806  
    685685
    686686    function is_valid_meta_key($key) {
    687         // skip attachment metadata since we'll regenerate it from scratch
    688         if ( $key == '_wp_attached_file' || $key == '_wp_attachment_metadata' )
     687        // skip _wp_attached_file metadata since we'll regenerate it from scratch
     688        if ( $key == '_wp_attached_file' )
    689689            return false;
    690690        return $key;
  • branches/2.8/wp-admin/includes/post.php

    r12077 r11806  
    247247    if ( isset($post_data['post_category']) ) {
    248248        if ( is_array($post_data['post_category']) && ! empty($post_data['post_category']) )
    249             $new_cats = array_map( 'absint', $post_data['post_category'] );
     249            $new_cats = array_map( absint, $post_data['post_category'] );
    250250        else
    251251            unset($post_data['post_category']);
     
    10581058    if ( !add_post_meta( $post->ID, '_edit_last', $current_user->ID, true ) )
    10591059        update_post_meta( $post->ID, '_edit_last', $current_user->ID );
    1060 }
    1061 
    1062 /**
    1063  * Outputs the notice message to say that someone else is editing this post at the moment.
    1064  *
    1065  * @since 2.8.5
    1066  * @return none
    1067  */
    1068 function _admin_notice_post_locked() {
    1069     global $post;
    1070     $last_user = get_userdata( get_post_meta( $post->ID, '_edit_last', true ) );
    1071     $last_user_name = $last_user ? $last_user->display_name : __('Somebody');
    1072    
    1073     switch ($post->post_type) {
    1074         case 'post':
    1075             $message = __( 'Warning: %s is currently editing this post' );
    1076             break;
    1077         case 'page':
    1078             $message = __( 'Warning: %s is currently editing this page' );
    1079             break;
    1080         default:
    1081             $message = __( 'Warning: %s is currently editing this.' );
    1082     }
    1083    
    1084     $message = sprintf( $message, esc_html( $last_user_name ) );
    1085     echo "<div class='error'><p>$message</p></div>";   
    10861060}
    10871061
  • branches/2.8/wp-admin/includes/update-core.php

    r12077 r11806  
    127127'wp-admin/execute-pings.php',
    128128'wp-admin/import/b2.php',
    129 'wp-admin/import/btt.php',
    130 'wp-admin/import/jkw.php',
    131129'wp-admin/inline-uploading.php',
    132130'wp-admin/link-categories.php',
  • branches/2.8/wp-admin/install.php

    r12077 r11806  
    5050
    5151function display_setup_form( $error = null ) {
    52     // Ensure that Blogs appear in search engines by default
    53     $blog_public = 1;
    54     if ( isset($_POST) && !empty($_POST) ) {
    55         $blog_public = isset($_POST['blog_public']);
    56     }
    57    
    5852    if ( ! is_null( $error ) ) {
    5953?>
     
    7266        </tr>
    7367        <tr>
    74             <td colspan="2"><label><input type="checkbox" name="blog_public" value="1" <?php checked($blog_public); ?> /> <?php _e('Allow my blog to appear in search engines like Google and Technorati.'); ?></label></td>
     68            <td colspan="2"><label><input type="checkbox" name="blog_public" value="1"<?php if( isset($_POST) && ! empty($_POST) && isset( $_POST['blog_public'] ) ) : ?> checked="checked"<?php endif; ?> /> <?php _e('Allow my blog to appear in search engines like Google and Technorati.'); ?></label></td>
    7569        </tr>
    7670    </table>
  • branches/2.8/wp-admin/page.php

    r12077 r11806  
    9999    if ( current_user_can('edit_page', $page_ID) ) {
    100100        if ( $last = wp_check_post_lock( $post->ID ) ) {
    101             add_action('admin_notices', '_admin_notice_post_locked' );
     101            $last_user = get_userdata( $last );
     102            $last_user_name = $last_user ? $last_user->display_name : __('Somebody');
     103            $message = sprintf( __( 'Warning: %s is currently editing this page' ), esc_html( $last_user_name ) );
     104            $message = str_replace( "'", "\'", "<div class='error'><p>$message</p></div>" );
     105            add_action('admin_notices', create_function( '', "echo '$message';" ) );
    102106        } else {
    103107            wp_set_post_lock( $post->ID );
  • branches/2.8/wp-admin/post.php

    r12077 r11806  
    134134    if ( current_user_can('edit_post', $post_ID) ) {
    135135        if ( $last = wp_check_post_lock( $post->ID ) ) {
    136             add_action('admin_notices', '_admin_notice_post_locked' );
     136            $last_user = get_userdata( $last );
     137            $last_user_name = $last_user ? $last_user->display_name : __('Somebody');
     138            $message = sprintf( __( 'Warning: %s is currently editing this post' ), esc_html( $last_user_name ) );
     139            $message = str_replace( "'", "\'", "<div class='error'><p>$message</p></div>" );
     140            add_action('admin_notices', create_function( '', "echo '$message';" ) );
    137141        } else {
    138142            wp_set_post_lock( $post->ID );
  • branches/2.8/wp-app.php

    r12077 r11806  
    781781
    782782        $location = get_post_meta($entry['ID'], '_wp_attached_file', true);
    783         $location = get_option ('upload_path') . '/' . $location;
    784783        $filetype = wp_check_filetype($location);
    785784
     
    791790        header('Connection: close');
    792791
    793         if ($fp = fopen($location, "rb")) {
    794             status_header('200');
    795             header('Content-Type: ' . $entry['post_mime_type']);
    796             header('Connection: close');
    797 
    798             while(!feof($fp)) {
    799                 echo fread($fp, 4096);
    800             }
    801 
    802             fclose($fp);
    803         } else {
    804             status_header ('404');
    805         }
     792        $fp = fopen($location, "rb");
     793        while(!feof($fp)) {
     794            echo fread($fp, 4096);
     795        }
     796        fclose($fp);
    806797
    807798        log_app('function',"get_file($postID)");
  • branches/2.8/wp-includes/author-template.php

    r12077 r11806  
    133133function the_author_link() {
    134134    if ( get_the_author_meta('url') ) {
    135         echo '<a href="' . get_the_author_meta('url') . '" title="' . esc_attr( sprintf(__("Visit %s&#8217;s website"), get_the_author()) ) . '" rel="external">' . get_the_author() . '</a>';
     135        echo '<a href="' . get_the_author_meta('url') . '" title="' . sprintf(__("Visit %s&#8217;s website"), get_the_author()) . '" rel="external">' . get_the_author() . '</a>';
    136136    } else {
    137137        the_author();
     
    182182        '<a href="%1$s" title="%2$s">%3$s</a>',
    183183        get_author_posts_url( $authordata->ID, $authordata->user_nicename ),
    184         esc_attr( sprintf( __( 'Posts by %s' ), get_the_author() ) ),
     184        sprintf( __( 'Posts by %s' ), esc_attr( get_the_author() ) ),
    185185        get_the_author()
    186186    );
     
    293293                $link = $name;
    294294        } else {
    295             $link = '<a href="' . get_author_posts_url($author->ID, $author->user_nicename) . '" title="' . esc_attr( sprintf(__("Posts by %s"), $author->display_name) ) . '">' . $name . '</a>';
     295            $link = '<a href="' . get_author_posts_url($author->ID, $author->user_nicename) . '" title="' . sprintf(__("Posts by %s"), esc_attr($author->display_name)) . '">' . $name . '</a>';
    296296
    297297            if ( (! empty($feed_image)) || (! empty($feed)) ) {
     
    302302
    303303                if ( !empty($feed) ) {
    304                     $title = ' title="' . esc_attr($feed) . '"';
    305                     $alt = ' alt="' . esc_attr($feed) . '"';
     304                    $title = ' title="' . $feed . '"';
     305                    $alt = ' alt="' . $feed . '"';
    306306                    $name = $feed;
    307307                    $link .= $title;
     
    311311
    312312                if ( !empty($feed_image) )
    313                     $link .= "<img src=\"" . esc_url($feed_image) . "\" style=\"border: none;\"$alt$title" . ' />';
     313                    $link .= "<img src=\"$feed_image\" style=\"border: none;\"$alt$title" . ' />';
    314314                else
    315315                    $link .= $name;
  • branches/2.8/wp-includes/bookmark-template.php

    r12077 r11806  
    9191        $rel = $bookmark->link_rel;
    9292        if ( '' != $rel )
    93             $rel = ' rel="' . esc_attr($rel) . '"';
     93            $rel = ' rel="' . $rel . '"';
    9494
    9595        $target = $bookmark->link_target;
  • branches/2.8/wp-includes/capabilities.php

    r12077 r11806  
    901901            $caps[] = 'read_private_pages';
    902902        break;
    903     case 'unfiltered_upload':
    904         if ( defined('ALLOW_UNFILTERED_UPLOADS') && ALLOW_UNFILTERED_UPLOADS == true )
    905             $caps[] = $cap;
    906         else
    907             $caps[] = 'do_not_allow';
    908         break;
    909903    default:
    910904        // If no meta caps match, return the original cap.
  • branches/2.8/wp-includes/category-template.php

    r12077 r11806  
    6969
    7070    if ( $link )
    71         $chain .= '<a href="' . get_category_link( $parent->term_id ) . '" title="' . esc_attr( sprintf( __( "View all posts in %s" ), $parent->cat_name ) ) . '">'.$name.'</a>' . $separator;
     71        $chain .= '<a href="' . get_category_link( $parent->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $parent->cat_name ) . '">'.$name.'</a>' . $separator;
    7272    else
    7373        $chain .= $name.$separator;
     
    191191                    if ( $category->parent )
    192192                        $thelist .= get_category_parents( $category->parent, true, $separator );
    193                     $thelist .= '<a href="' . get_category_link( $category->term_id ) . '" title="' . esc_attr( sprintf( __( "View all posts in %s" ), $category->name ) ) . '" ' . $rel . '>' . $category->name.'</a></li>';
     193                    $thelist .= '<a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . $rel . '>' . $category->name.'</a></li>';
    194194                    break;
    195195                case 'single':
    196                     $thelist .= '<a href="' . get_category_link( $category->term_id ) . '" title="' . esc_attr( sprintf( __( "View all posts in %s" ), $category->name ) ) . '" ' . $rel . '>';
     196                    $thelist .= '<a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . $rel . '>';
    197197                    if ( $category->parent )
    198198                        $thelist .= get_category_parents( $category->parent, false, $separator );
     
    201201                case '':
    202202                default:
    203                     $thelist .= '<a href="' . get_category_link( $category->term_id ) . '" title="' . esc_attr( sprintf( __( "View all posts in %s" ), $category->name ) ) . '" ' . $rel . '>' . $category->cat_name.'</a></li>';
     203                    $thelist .= '<a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . $rel . '>' . $category->cat_name.'</a></li>';
    204204            }
    205205        }
     
    214214                    if ( $category->parent )
    215215                        $thelist .= get_category_parents( $category->parent, true, $separator );
    216                     $thelist .= '<a href="' . get_category_link( $category->term_id ) . '" title="' . esc_attr( sprintf( __( "View all posts in %s" ), $category->name ) ) . '" ' . $rel . '>' . $category->cat_name.'</a>';
     216                    $thelist .= '<a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . $rel . '>' . $category->cat_name.'</a>';
    217217                    break;
    218218                case 'single':
    219                     $thelist .= '<a href="' . get_category_link( $category->term_id ) . '" title="' . esc_attr( sprintf( __( "View all posts in %s" ), $category->name ) ) . '" ' . $rel . '>';
     219                    $thelist .= '<a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . $rel . '>';
    220220                    if ( $category->parent )
    221221                        $thelist .= get_category_parents( $category->parent, false, $separator );
     
    224224                case '':
    225225                default:
    226                     $thelist .= '<a href="' . get_category_link( $category->term_id ) . '" title="' . esc_attr( sprintf( __( "View all posts in %s" ), $category->name ) ) . '" ' . $rel . '>' . $category->name.'</a>';
     226                    $thelist .= '<a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . $rel . '>' . $category->name.'</a>';
    227227            }
    228228            ++$i;
     
    353353
    354354    $categories = get_categories( $r );
    355     $name = esc_attr($name);
    356     $class = esc_attr($class);
    357355
    358356    $output = '';
  • branches/2.8/wp-includes/classes.php

    r12077 r11806  
    215215                    // Trim the query of everything up to the '?'.
    216216                    $query = preg_replace("!^.+\?!", '', $query);
    217                                        
     217
    218218                    // Substitute the substring matches into the query.
    219                     $query = addslashes(WP_MatchesMapRegex::apply($query, $matches));
     219                    eval("@\$query = \"" . addslashes($query) . "\";");
    220220
    221221                    $this->matched_query = $query;
     
    15931593}
    15941594
    1595 /**
    1596  * Helper class to remove the need to use eval to replace $matches[] in query strings.
    1597  *
    1598  * @since 2.9.0
    1599  */
    1600 class WP_MatchesMapRegex {
    1601     /**
    1602      * store for matches
    1603      *
    1604      * @access private
    1605      * @var array
    1606      */
    1607     var $_matches;
    1608    
    1609     /**
    1610      * store for mapping result
    1611      *
    1612      * @access public
    1613      * @var string
    1614      */
    1615     var $output;
    1616    
    1617     /**
    1618      * subject to perform mapping on (query string containing $matches[] references
    1619      *
    1620      * @access private
    1621      * @var string
    1622      */
    1623     var $_subject;
    1624    
    1625     /**
    1626      * regexp pattern to match $matches[] references
    1627      *
    1628      * @var string
    1629      */
    1630     var $_pattern = '(\$matches\[[1-9]+[0-9]*\])'; // magic number
    1631    
    1632     /**
    1633      * constructor
    1634      *
    1635      * @param string $subject subject if regex
    1636      * @param array  $matches data to use in map
    1637      * @return self
    1638      */                     
    1639     function WP_MatchesMapRegex($subject, $matches) {
    1640         $this->_subject = $subject;
    1641         $this->_matches = $matches;
    1642         $this->output = $this->_map();             
    1643     }
    1644    
    1645     /**
    1646      * Substitute substring matches in subject.
    1647      *
    1648      * static helper function to ease use
    1649      *
    1650      * @access public
    1651      * @param string $subject subject
    1652      * @param array  $matches data used for subsitution
    1653      * @return string
    1654      */
    1655     function apply($subject, $matches) {
    1656         $oSelf =& new WP_MatchesMapRegex($subject, $matches);
    1657         return $oSelf->output;                                                             
    1658     }
    1659    
    1660     /**
    1661      * do the actual mapping
    1662      *
    1663      * @access private
    1664      * @return string
    1665      */
    1666     function _map() {
    1667         $callback = array(&$this, 'callback');
    1668         return preg_replace_callback($this->_pattern, $callback, $this->_subject);
    1669     }
    1670    
    1671     /**
    1672      * preg_replace_callback hook
    1673      *
    1674      * @access public
    1675      * @param  array $matches preg_replace regexp matches
    1676      * @return string
    1677      */
    1678     function callback($matches) {
    1679         $index = intval(substr($matches[0], 9, -1));
    1680         return ( isset( $this->_matches[$index] ) ? $this->_matches[$index] : '' );
    1681     }
    1682    
    1683 }
    1684 
    16851595?>
  • branches/2.8/wp-includes/comment-template.php

    r12077 r11806  
    338338        $classes = array_merge($classes, $class);
    339339    }
    340 
    341     $classes = array_map('esc_attr', $classes);
    342340
    343341    return apply_filters('comment_class', $classes, $class, $comment_id, $post_id);
     
    943941
    944942    if ( 0 == $number && !comments_open() && !pings_open() ) {
    945         echo '<span' . ((!empty($css_class)) ? ' class="' . esc_attr( $css_class ) . '"' : '') . '>' . $none . '</span>';
     943        echo '<span' . ((!empty($css_class)) ? ' class="' . $css_class . '"' : '') . '>' . $none . '</span>';
    946944        return;
    947945    }
     
    975973    echo apply_filters( 'comments_popup_link_attributes', '' );
    976974
    977     echo ' title="' . esc_attr( sprintf( __('Comment on %s'), $title ) ) . '">';
     975    echo ' title="' . sprintf( __('Comment on %s'), $title ) . '">';
    978976    comments_number( $zero, $one, $more, $number );
    979977    echo '</a>';
  • branches/2.8/wp-includes/formatting.php

    r12077 r11806  
    601601function sanitize_file_name( $filename ) {
    602602    $filename_raw = $filename;
    603     $special_chars = array("?", "[", "]", "/", "\\", "=", "<", ">", ":", ";", ",", "'", "\"", "&", "$", "#", "*", "(", ")", "|", "~", "`", "!", "{", "}", chr(0));
     603    $special_chars = array("?", "[", "]", "/", "\\", "=", "<", ">", ":", ";", ",", "'", "\"", "&", "$", "#", "*", "(", ")", "|", "~", "`", "!", "{", "}");
    604604    $special_chars = apply_filters('sanitize_file_name_chars', $special_chars, $filename_raw);
    605605    $filename = str_replace($special_chars, '', $filename);
     
    14531453 *
    14541454 * Requires and returns a date in the Y-m-d H:i:s format. Simply subtracts the
    1455  * value of the 'gmt_offset' option. Return format can be overridden using the
    1456  * $format parameter
     1455 * value of the 'gmt_offset' option.
    14571456 *
    14581457 * @since 1.2.0
     
    14601459 * @uses get_option() to retrieve the the value of 'gmt_offset'.
    14611460 * @param string $string The date to be converted.
    1462  * @param string $format The format string for the returned date (default is Y-m-d H:i:s)
    14631461 * @return string GMT version of the date provided.
    14641462 */
    1465 function get_gmt_from_date($string, $format = 'Y-m-d H:i:s') {
     1463function get_gmt_from_date($string) {
    14661464    preg_match('#([0-9]{1,4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})#', $string, $matches);
    14671465    $string_time = gmmktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1]);
    1468     $string_gmt = gmdate($format, $string_time - get_option('gmt_offset') * 3600);
     1466    $string_gmt = gmdate('Y-m-d H:i:s', $string_time - get_option('gmt_offset') * 3600);
    14691467    return $string_gmt;
    14701468}
     
    14741472 *
    14751473 * Requires and returns in the Y-m-d H:i:s format. Simply adds the value of
    1476  * gmt_offset.Return format can be overridden using the $format parameter
     1474 * gmt_offset.
    14771475 *
    14781476 * @since 1.2.0
    14791477 *
    14801478 * @param string $string The date to be converted.
    1481  * @param string $format The format string for the returned date (default is Y-m-d H:i:s)
    14821479 * @return string Formatted date relative to the GMT offset.
    14831480 */
    1484 function get_date_from_gmt($string, $format = 'Y-m-d H:i:s') {
     1481function get_date_from_gmt($string) {
    14851482    preg_match('#([0-9]{1,4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})#', $string, $matches);
    14861483    $string_time = gmmktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1]);
    1487     $string_localtime = gmdate($format, $string_time + get_option('gmt_offset')*3600);
     1484    $string_localtime = gmdate('Y-m-d H:i:s', $string_time + get_option('gmt_offset')*3600);
    14881485    return $string_localtime;
    14891486}
  • branches/2.8/wp-includes/general-template.php

    r12077 r11806  
    10241024    /* translators: Calendar caption: 1: month name, 2: 4-digit year */
    10251025    $calendar_caption = _x('%1$s %2$s', 'calendar caption');
    1026     echo '<table id="wp-calendar" summary="' . esc_attr__('Calendar') . '">
     1026    echo '<table id="wp-calendar" summary="' . __('Calendar') . '">
    10271027    <caption>' . sprintf($calendar_caption, $wp_locale->get_month($thismonth), date('Y', $unixmonth)) . '</caption>
    10281028    <thead>
     
    10371037    foreach ( $myweek as $wd ) {
    10381038        $day_name = (true == $initial) ? $wp_locale->get_weekday_initial($wd) : $wp_locale->get_weekday_abbrev($wd);
    1039         $wd = esc_attr($wd);
    10401039        echo "\n\t\t<th abbr=\"$wd\" scope=\"col\" title=\"$wd\">$day_name</th>";
    10411040    }
     
    10601059    if ( $next ) {
    10611060        echo "\n\t\t".'<td abbr="' . $wp_locale->get_month($next->month) . '" colspan="3" id="next"><a href="' .
    1062         get_month_link($next->year, $next->month) . '" title="' . esc_attr( sprintf(__('View posts for %1$s %2$s'), $wp_locale->get_month($next->month) ,
    1063             date('Y', mktime(0, 0 , 0, $next->month, 1, $next->year))) ) . '">' . $wp_locale->get_month_abbrev($wp_locale->get_month($next->month)) . ' &raquo;</a></td>';
     1061        get_month_link($next->year, $next->month) . '" title="' . sprintf(__('View posts for %1$s %2$s'), $wp_locale->get_month($next->month),
     1062            date('Y', mktime(0, 0 , 0, $next->month, 1, $next->year))) . '">' . $wp_locale->get_month_abbrev($wp_locale->get_month($next->month)) . ' &raquo;</a></td>';
    10641063    } else {
    10651064        echo "\n\t\t".'<td colspan="3" id="next" class="pad">&nbsp;</td>';
     
    11181117    $pad = calendar_week_mod(date('w', $unixmonth)-$week_begins);
    11191118    if ( 0 != $pad )
    1120         echo "\n\t\t".'<td colspan="'. esc_attr($pad) .'" class="pad">&nbsp;</td>';
     1119        echo "\n\t\t".'<td colspan="'.$pad.'" class="pad">&nbsp;</td>';
    11211120
    11221121    $daysinmonth = intval(date('t', $unixmonth));
     
    11321131
    11331132        if ( in_array($day, $daywithpost) ) // any posts today?
    1134                 echo '<a href="' . get_day_link($thisyear, $thismonth, $day) . "\" title=\"" . esc_attr($ak_titles_for_day[$day]) . "\">$day</a>";
     1133                echo '<a href="' . get_day_link($thisyear, $thismonth, $day) . "\" title=\"$ak_titles_for_day[$day]\">$day</a>";
    11351134        else
    11361135            echo $day;
     
    11431142    $pad = 7 - calendar_week_mod(date('w', mktime(0, 0 , 0, $thismonth, $day, $thisyear))-$week_begins);
    11441143    if ( $pad != 0 && $pad != 7 )
    1145         echo "\n\t\t".'<td class="pad" colspan="'. esc_attr($pad) .'">&nbsp;</td>';
     1144        echo "\n\t\t".'<td class="pad" colspan="'.$pad.'">&nbsp;</td>';
    11461145
    11471146    echo "\n\t</tr>\n\t</tbody>\n\t</table>";
  • branches/2.8/wp-includes/media.php

    r12077 r11806  
    592592        return $content;
    593593
    594     if ( $id ) $id = 'id="' . esc_attr($id) . '" ';
    595 
    596     return '<div ' . $id . 'class="wp-caption ' . esc_attr($align) . '" style="width: ' . (10 + (int) $width) . 'px">'
     594    if ( $id ) $id = 'id="' . $id . '" ';
     595
     596    return '<div ' . $id . 'class="wp-caption ' . $align . '" style="width: ' . (10 + (int) $width) . 'px">'
    597597    . do_shortcode( $content ) . '<p class="wp-caption-text">' . $caption . '</p></div>';
    598598}
  • branches/2.8/wp-includes/post-template.php

    r12077 r11806  
    342342        $classes = array_merge($classes, $class);
    343343    }
    344 
    345     $classes = array_map('esc_attr', $classes);
    346344
    347345    return apply_filters('post_class', $classes, $class, $post_id);
     
    480478        $classes = array_merge($classes, $class);
    481479    }
    482 
    483     $classes = array_map('esc_attr', $classes);
    484480
    485481    return apply_filters('body_class', $classes, $class);
     
    711707    $pages = get_pages($r);
    712708    $output = '';
    713     $name = esc_attr($name);
    714709
    715710    if ( ! empty($pages) ) {
     
    848843        $menu = '<ul>' . $menu . '</ul>';
    849844
    850     $menu = '<div class="' . esc_attr($args['menu_class']) . '">' . $menu . "</div>\n";
     845    $menu = '<div class="' . $args['menu_class'] . '">' . $menu . "</div>\n";
    851846    $menu = apply_filters( 'wp_page_menu', $menu, $args );
    852847    if ( $args['echo'] )
  • branches/2.8/wp-includes/rewrite.php

    r12077 r11806  
    300300
    301301            // Substitute the substring matches into the query.
    302             $query = addslashes(WP_MatchesMapRegex::apply($query, $matches));
     302            eval("\$query = \"" . addslashes($query) . "\";");
    303303            // Filter out non-public query vars
    304304            global $wp;
  • branches/2.8/wp-includes/theme.php

    r12077 r11806  
    876876        return;
    877877
    878     add_filter( 'template', '_preview_theme_template_filter' );
     878    add_filter( 'template', create_function('', "return '{$_GET['template']}';") );
    879879
    880880    if ( isset($_GET['stylesheet']) ) {
     
    882882        if ( validate_file($_GET['stylesheet']) )
    883883            return;
    884         add_filter( 'stylesheet', '_preview_theme_stylesheet_filter' );
     884        add_filter( 'stylesheet', create_function('', "return '{$_GET['stylesheet']}';") );
    885885    }
    886886
     
    891891}
    892892add_action('setup_theme', 'preview_theme');
    893 
    894 /**
    895  * Private function to modify the current template when previewing a theme
    896  *
    897  * @return string
    898  */
    899 function _preview_theme_template_filter() {
    900     return isset($_GET['template']) ? $_GET['template'] : '';
    901 }
    902 
    903 /**
    904  * Private function to modify the current stylesheet when previewing a theme
    905  *
    906  * @return string
    907  */
    908 function _preview_theme_stylesheet_filter() {
    909     return isset($_GET['stylesheet']) ? $_GET['stylesheet'] : '';
    910 }
    911893
    912894/**
  • branches/2.8/wp-includes/version.php

    r12077 r11806  
    99 * @global string $wp_version
    1010 */
    11 $wp_version = '2.8.5';
     11$wp_version = '2.8.4';
    1212
    1313/**
  • branches/2.8/wp-trackback.php

    r12077 r11806  
    5151
    5252if ($charset)
    53     $charset = str_replace( array(',', ' '), '', strtoupper( trim($charset) ) );
     53    $charset = strtoupper( trim($charset) );
    5454else
    5555    $charset = 'ASCII, UTF-8, ISO-8859-1, JIS, EUC-JP, SJIS';
  • branches/2.8/xmlrpc.php

    r12077 r11806  
    527527            $page_date_gmt = mysql2date("Ymd\TH:i:s", $page->post_date_gmt, false);
    528528
    529             // For drafts use the GMT version of the date
    530             if ( $page->post_status == 'draft' ) {
    531                 $page_date_gmt = get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $page->post_date ), 'Ymd\TH:i:s' );
    532             }
    533 
    534529            // Pull the categories info together.
    535530            $categories = array();
     
    796791                post_parent page_parent_id,
    797792                post_date_gmt,
    798                 post_date,
    799                 post_status
     793                post_date
    800794            FROM {$wpdb->posts}
    801795            WHERE post_type = 'page'
     
    812806            $page_list[$i]->date_created_gmt = new IXR_Date($post_date_gmt);
    813807
    814             // For drafts use the GMT version of the date
    815             if ( $page_list[$i]->post_status == 'draft' ) {
    816                 $page_list[$i]->date_created_gmt = get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $page_list[$i]->post_date ), 'Ymd\TH:i:s' );
    817                 $page_list[$i]->date_created_gmt = new IXR_Date( $page_list[$i]->date_created_gmt );
    818             }
    819 
    820808            unset($page_list[$i]->post_date_gmt);
    821809            unset($page_list[$i]->post_date);
    822             unset($page_list[$i]->post_status);
    823810        }
    824811
     
    25902577            // For drafts use the GMT version of the post date
    25912578            if ( $postdata['post_status'] == 'draft' ) {
    2592                 $post_date_gmt = get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $postdata['post_date'] ), 'Ymd\TH:i:s' );
     2579                $post_date_gmt = get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $postdata['post_date'] ) );
     2580                $post_date_gmt = preg_replace( '|\-|', '', $post_date_gmt );
     2581                $post_date_gmt = preg_replace( '| |', 'T', $post_date_gmt );
    25932582            }
    25942583
     
    27092698            $post_date_gmt = mysql2date('Ymd\TH:i:s', $entry['post_date_gmt'], false);
    27102699
    2711             // For drafts use the GMT version of the date
    2712             if ( $entry['post_status'] == 'draft' ) {
    2713                 $post_date_gmt = get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $entry['post_date'] ), 'Ymd\TH:i:s' );
    2714             }
    2715 
    27162700            $categories = array();
    27172701            $catids = wp_get_post_categories($entry['ID']);
     
    29482932            $post_date = mysql2date('Ymd\TH:i:s', $entry['post_date'], false);
    29492933            $post_date_gmt = mysql2date('Ymd\TH:i:s', $entry['post_date_gmt'], false);
    2950 
    2951             // For drafts use the GMT version of the date
    2952             if ( $entry['post_status'] == 'draft' ) {
    2953                 $post_date_gmt = get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $entry['post_date'] ), 'Ymd\TH:i:s' );
    2954             }
    29552934
    29562935            $struct[] = array(
Note: See TracChangeset for help on using the changeset viewer.