Changes in branches/2.8 [11806:12077]
- Location:
- branches/2.8
- Files:
-
- 2 deleted
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.8/readme.html
r11806 r12077 9 9 <h1 id="logo" style="text-align: center"> 10 10 <img alt="WordPress" src="wp-admin/images/wordpress-logo.png" /> 11 <br /> Version 2.8. 411 <br /> Version 2.8.5 12 12 </h1> 13 13 <p style="text-align: center">Semantic Personal Publishing Platform</p> … … 30 30 <h1>Upgrading</h1> 31 31 <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. 4:</h2>32 <h2>Upgrading from any previous WordPress to 2.8.5:</h2> 33 33 <ol> 34 34 <li>Delete your old WP files, saving ones you've modified.</li> -
branches/2.8/wp-admin/edit-attachment-rows.php
r11806 r12077 210 210 } // end if ( have_posts() ) 211 211 ?> 212 -
branches/2.8/wp-admin/import/wordpress.php
r11806 r12077 685 685 686 686 function is_valid_meta_key($key) { 687 // skip _wp_attached_filemetadata since we'll regenerate it from scratch688 if ( $key == '_wp_attached_file' )687 // skip attachment metadata since we'll regenerate it from scratch 688 if ( $key == '_wp_attached_file' || $key == '_wp_attachment_metadata' ) 689 689 return false; 690 690 return $key; -
branches/2.8/wp-admin/includes/post.php
r11806 r12077 247 247 if ( isset($post_data['post_category']) ) { 248 248 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'] ); 250 250 else 251 251 unset($post_data['post_category']); … … 1058 1058 if ( !add_post_meta( $post->ID, '_edit_last', $current_user->ID, true ) ) 1059 1059 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>"; 1060 1086 } 1061 1087 -
branches/2.8/wp-admin/includes/update-core.php
r11806 r12077 127 127 'wp-admin/execute-pings.php', 128 128 'wp-admin/import/b2.php', 129 'wp-admin/import/btt.php', 130 'wp-admin/import/jkw.php', 129 131 'wp-admin/inline-uploading.php', 130 132 'wp-admin/link-categories.php', -
branches/2.8/wp-admin/install.php
r11806 r12077 50 50 51 51 function 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 52 58 if ( ! is_null( $error ) ) { 53 59 ?> … … 66 72 </tr> 67 73 <tr> 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>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> 69 75 </tr> 70 76 </table> -
branches/2.8/wp-admin/page.php
r11806 r12077 99 99 if ( current_user_can('edit_page', $page_ID) ) { 100 100 if ( $last = wp_check_post_lock( $post->ID ) ) { 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';" ) ); 101 add_action('admin_notices', '_admin_notice_post_locked' ); 106 102 } else { 107 103 wp_set_post_lock( $post->ID ); -
branches/2.8/wp-admin/post.php
r11806 r12077 134 134 if ( current_user_can('edit_post', $post_ID) ) { 135 135 if ( $last = wp_check_post_lock( $post->ID ) ) { 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';" ) ); 136 add_action('admin_notices', '_admin_notice_post_locked' ); 141 137 } else { 142 138 wp_set_post_lock( $post->ID ); -
branches/2.8/wp-app.php
r11806 r12077 781 781 782 782 $location = get_post_meta($entry['ID'], '_wp_attached_file', true); 783 $location = get_option ('upload_path') . '/' . $location; 783 784 $filetype = wp_check_filetype($location); 784 785 … … 790 791 header('Connection: close'); 791 792 792 $fp = fopen($location, "rb"); 793 while(!feof($fp)) { 794 echo fread($fp, 4096); 795 } 796 fclose($fp); 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 } 797 806 798 807 log_app('function',"get_file($postID)"); -
branches/2.8/wp-includes/author-template.php
r11806 r12077 133 133 function the_author_link() { 134 134 if ( get_the_author_meta('url') ) { 135 echo '<a href="' . get_the_author_meta('url') . '" title="' . sprintf(__("Visit %s’s website"), get_the_author()) . '" rel="external">' . get_the_author() . '</a>';135 echo '<a href="' . get_the_author_meta('url') . '" title="' . esc_attr( sprintf(__("Visit %s’s website"), get_the_author()) ) . '" rel="external">' . get_the_author() . '</a>'; 136 136 } else { 137 137 the_author(); … … 182 182 '<a href="%1$s" title="%2$s">%3$s</a>', 183 183 get_author_posts_url( $authordata->ID, $authordata->user_nicename ), 184 sprintf( __( 'Posts by %s' ), esc_attr(get_the_author() ) ),184 esc_attr( sprintf( __( 'Posts by %s' ), get_the_author() ) ), 185 185 get_the_author() 186 186 ); … … 293 293 $link = $name; 294 294 } else { 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>';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>'; 296 296 297 297 if ( (! empty($feed_image)) || (! empty($feed)) ) { … … 302 302 303 303 if ( !empty($feed) ) { 304 $title = ' title="' . $feed. '"';305 $alt = ' alt="' . $feed. '"';304 $title = ' title="' . esc_attr($feed) . '"'; 305 $alt = ' alt="' . esc_attr($feed) . '"'; 306 306 $name = $feed; 307 307 $link .= $title; … … 311 311 312 312 if ( !empty($feed_image) ) 313 $link .= "<img src=\" $feed_image\" style=\"border: none;\"$alt$title" . ' />';313 $link .= "<img src=\"" . esc_url($feed_image) . "\" style=\"border: none;\"$alt$title" . ' />'; 314 314 else 315 315 $link .= $name; -
branches/2.8/wp-includes/bookmark-template.php
r11806 r12077 91 91 $rel = $bookmark->link_rel; 92 92 if ( '' != $rel ) 93 $rel = ' rel="' . $rel. '"';93 $rel = ' rel="' . esc_attr($rel) . '"'; 94 94 95 95 $target = $bookmark->link_target; -
branches/2.8/wp-includes/capabilities.php
r11806 r12077 901 901 $caps[] = 'read_private_pages'; 902 902 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; 903 909 default: 904 910 // If no meta caps match, return the original cap. -
branches/2.8/wp-includes/category-template.php
r11806 r12077 69 69 70 70 if ( $link ) 71 $chain .= '<a href="' . get_category_link( $parent->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $parent->cat_name) . '">'.$name.'</a>' . $separator;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; 72 72 else 73 73 $chain .= $name.$separator; … … 191 191 if ( $category->parent ) 192 192 $thelist .= get_category_parents( $category->parent, true, $separator ); 193 $thelist .= '<a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name) . '" ' . $rel . '>' . $category->name.'</a></li>';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>'; 194 194 break; 195 195 case 'single': 196 $thelist .= '<a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name) . '" ' . $rel . '>';196 $thelist .= '<a href="' . get_category_link( $category->term_id ) . '" title="' . esc_attr( sprintf( __( "View all posts in %s" ), $category->name ) ) . '" ' . $rel . '>'; 197 197 if ( $category->parent ) 198 198 $thelist .= get_category_parents( $category->parent, false, $separator ); … … 201 201 case '': 202 202 default: 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>';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>'; 204 204 } 205 205 } … … 214 214 if ( $category->parent ) 215 215 $thelist .= get_category_parents( $category->parent, true, $separator ); 216 $thelist .= '<a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name) . '" ' . $rel . '>' . $category->cat_name.'</a>';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>'; 217 217 break; 218 218 case 'single': 219 $thelist .= '<a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name) . '" ' . $rel . '>';219 $thelist .= '<a href="' . get_category_link( $category->term_id ) . '" title="' . esc_attr( sprintf( __( "View all posts in %s" ), $category->name ) ) . '" ' . $rel . '>'; 220 220 if ( $category->parent ) 221 221 $thelist .= get_category_parents( $category->parent, false, $separator ); … … 224 224 case '': 225 225 default: 226 $thelist .= '<a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name) . '" ' . $rel . '>' . $category->name.'</a>';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>'; 227 227 } 228 228 ++$i; … … 353 353 354 354 $categories = get_categories( $r ); 355 $name = esc_attr($name); 356 $class = esc_attr($class); 355 357 356 358 $output = ''; -
branches/2.8/wp-includes/classes.php
r11806 r12077 215 215 // Trim the query of everything up to the '?'. 216 216 $query = preg_replace("!^.+\?!", '', $query); 217 217 218 218 // Substitute the substring matches into the query. 219 eval("@\$query = \"" . addslashes($query) . "\";");219 $query = addslashes(WP_MatchesMapRegex::apply($query, $matches)); 220 220 221 221 $this->matched_query = $query; … … 1593 1593 } 1594 1594 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 1595 1685 ?> -
branches/2.8/wp-includes/comment-template.php
r11806 r12077 338 338 $classes = array_merge($classes, $class); 339 339 } 340 341 $classes = array_map('esc_attr', $classes); 340 342 341 343 return apply_filters('comment_class', $classes, $class, $comment_id, $post_id); … … 941 943 942 944 if ( 0 == $number && !comments_open() && !pings_open() ) { 943 echo '<span' . ((!empty($css_class)) ? ' class="' . $css_class. '"' : '') . '>' . $none . '</span>';945 echo '<span' . ((!empty($css_class)) ? ' class="' . esc_attr( $css_class ) . '"' : '') . '>' . $none . '</span>'; 944 946 return; 945 947 } … … 973 975 echo apply_filters( 'comments_popup_link_attributes', '' ); 974 976 975 echo ' title="' . sprintf( __('Comment on %s'), $title) . '">';977 echo ' title="' . esc_attr( sprintf( __('Comment on %s'), $title ) ) . '">'; 976 978 comments_number( $zero, $one, $more, $number ); 977 979 echo '</a>'; -
branches/2.8/wp-includes/formatting.php
r11806 r12077 601 601 function sanitize_file_name( $filename ) { 602 602 $filename_raw = $filename; 603 $special_chars = array("?", "[", "]", "/", "\\", "=", "<", ">", ":", ";", ",", "'", "\"", "&", "$", "#", "*", "(", ")", "|", "~", "`", "!", "{", "}" );603 $special_chars = array("?", "[", "]", "/", "\\", "=", "<", ">", ":", ";", ",", "'", "\"", "&", "$", "#", "*", "(", ")", "|", "~", "`", "!", "{", "}", chr(0)); 604 604 $special_chars = apply_filters('sanitize_file_name_chars', $special_chars, $filename_raw); 605 605 $filename = str_replace($special_chars, '', $filename); … … 1453 1453 * 1454 1454 * Requires and returns a date in the Y-m-d H:i:s format. Simply subtracts the 1455 * value of the 'gmt_offset' option. 1455 * value of the 'gmt_offset' option. Return format can be overridden using the 1456 * $format parameter 1456 1457 * 1457 1458 * @since 1.2.0 … … 1459 1460 * @uses get_option() to retrieve the the value of 'gmt_offset'. 1460 1461 * @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) 1461 1463 * @return string GMT version of the date provided. 1462 1464 */ 1463 function get_gmt_from_date($string ) {1465 function get_gmt_from_date($string, $format = 'Y-m-d H:i:s') { 1464 1466 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); 1465 1467 $string_time = gmmktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1]); 1466 $string_gmt = gmdate( 'Y-m-d H:i:s', $string_time - get_option('gmt_offset') * 3600);1468 $string_gmt = gmdate($format, $string_time - get_option('gmt_offset') * 3600); 1467 1469 return $string_gmt; 1468 1470 } … … 1472 1474 * 1473 1475 * Requires and returns in the Y-m-d H:i:s format. Simply adds the value of 1474 * gmt_offset. 1476 * gmt_offset.Return format can be overridden using the $format parameter 1475 1477 * 1476 1478 * @since 1.2.0 1477 1479 * 1478 1480 * @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) 1479 1482 * @return string Formatted date relative to the GMT offset. 1480 1483 */ 1481 function get_date_from_gmt($string ) {1484 function get_date_from_gmt($string, $format = 'Y-m-d H:i:s') { 1482 1485 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); 1483 1486 $string_time = gmmktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1]); 1484 $string_localtime = gmdate( 'Y-m-d H:i:s', $string_time + get_option('gmt_offset')*3600);1487 $string_localtime = gmdate($format, $string_time + get_option('gmt_offset')*3600); 1485 1488 return $string_localtime; 1486 1489 } -
branches/2.8/wp-includes/general-template.php
r11806 r12077 1024 1024 /* translators: Calendar caption: 1: month name, 2: 4-digit year */ 1025 1025 $calendar_caption = _x('%1$s %2$s', 'calendar caption'); 1026 echo '<table id="wp-calendar" summary="' . __('Calendar') . '">1026 echo '<table id="wp-calendar" summary="' . esc_attr__('Calendar') . '"> 1027 1027 <caption>' . sprintf($calendar_caption, $wp_locale->get_month($thismonth), date('Y', $unixmonth)) . '</caption> 1028 1028 <thead> … … 1037 1037 foreach ( $myweek as $wd ) { 1038 1038 $day_name = (true == $initial) ? $wp_locale->get_weekday_initial($wd) : $wp_locale->get_weekday_abbrev($wd); 1039 $wd = esc_attr($wd); 1039 1040 echo "\n\t\t<th abbr=\"$wd\" scope=\"col\" title=\"$wd\">$day_name</th>"; 1040 1041 } … … 1059 1060 if ( $next ) { 1060 1061 echo "\n\t\t".'<td abbr="' . $wp_locale->get_month($next->month) . '" colspan="3" id="next"><a href="' . 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)) . ' »</a></td>';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)) . ' »</a></td>'; 1063 1064 } else { 1064 1065 echo "\n\t\t".'<td colspan="3" id="next" class="pad"> </td>'; … … 1117 1118 $pad = calendar_week_mod(date('w', $unixmonth)-$week_begins); 1118 1119 if ( 0 != $pad ) 1119 echo "\n\t\t".'<td colspan="'. $pad.'" class="pad"> </td>';1120 echo "\n\t\t".'<td colspan="'. esc_attr($pad) .'" class="pad"> </td>'; 1120 1121 1121 1122 $daysinmonth = intval(date('t', $unixmonth)); … … 1131 1132 1132 1133 if ( in_array($day, $daywithpost) ) // any posts today? 1133 echo '<a href="' . get_day_link($thisyear, $thismonth, $day) . "\" title=\" $ak_titles_for_day[$day]\">$day</a>";1134 echo '<a href="' . get_day_link($thisyear, $thismonth, $day) . "\" title=\"" . esc_attr($ak_titles_for_day[$day]) . "\">$day</a>"; 1134 1135 else 1135 1136 echo $day; … … 1142 1143 $pad = 7 - calendar_week_mod(date('w', mktime(0, 0 , 0, $thismonth, $day, $thisyear))-$week_begins); 1143 1144 if ( $pad != 0 && $pad != 7 ) 1144 echo "\n\t\t".'<td class="pad" colspan="'. $pad.'"> </td>';1145 echo "\n\t\t".'<td class="pad" colspan="'. esc_attr($pad) .'"> </td>'; 1145 1146 1146 1147 echo "\n\t</tr>\n\t</tbody>\n\t</table>"; -
branches/2.8/wp-includes/media.php
r11806 r12077 592 592 return $content; 593 593 594 if ( $id ) $id = 'id="' . $id. '" ';595 596 return '<div ' . $id . 'class="wp-caption ' . $align. '" style="width: ' . (10 + (int) $width) . 'px">'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">' 597 597 . do_shortcode( $content ) . '<p class="wp-caption-text">' . $caption . '</p></div>'; 598 598 } -
branches/2.8/wp-includes/post-template.php
r11806 r12077 342 342 $classes = array_merge($classes, $class); 343 343 } 344 345 $classes = array_map('esc_attr', $classes); 344 346 345 347 return apply_filters('post_class', $classes, $class, $post_id); … … 478 480 $classes = array_merge($classes, $class); 479 481 } 482 483 $classes = array_map('esc_attr', $classes); 480 484 481 485 return apply_filters('body_class', $classes, $class); … … 707 711 $pages = get_pages($r); 708 712 $output = ''; 713 $name = esc_attr($name); 709 714 710 715 if ( ! empty($pages) ) { … … 843 848 $menu = '<ul>' . $menu . '</ul>'; 844 849 845 $menu = '<div class="' . $args['menu_class']. '">' . $menu . "</div>\n";850 $menu = '<div class="' . esc_attr($args['menu_class']) . '">' . $menu . "</div>\n"; 846 851 $menu = apply_filters( 'wp_page_menu', $menu, $args ); 847 852 if ( $args['echo'] ) -
branches/2.8/wp-includes/rewrite.php
r11806 r12077 300 300 301 301 // Substitute the substring matches into the query. 302 eval("\$query = \"" . addslashes($query) . "\";");302 $query = addslashes(WP_MatchesMapRegex::apply($query, $matches)); 303 303 // Filter out non-public query vars 304 304 global $wp; -
branches/2.8/wp-includes/theme.php
r11806 r12077 876 876 return; 877 877 878 add_filter( 'template', create_function('', "return '{$_GET['template']}';"));878 add_filter( 'template', '_preview_theme_template_filter' ); 879 879 880 880 if ( isset($_GET['stylesheet']) ) { … … 882 882 if ( validate_file($_GET['stylesheet']) ) 883 883 return; 884 add_filter( 'stylesheet', create_function('', "return '{$_GET['stylesheet']}';"));884 add_filter( 'stylesheet', '_preview_theme_stylesheet_filter' ); 885 885 } 886 886 … … 891 891 } 892 892 add_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 } 893 911 894 912 /** -
branches/2.8/wp-includes/version.php
r11806 r12077 9 9 * @global string $wp_version 10 10 */ 11 $wp_version = '2.8. 4';11 $wp_version = '2.8.5'; 12 12 13 13 /** -
branches/2.8/wp-trackback.php
r11806 r12077 51 51 52 52 if ($charset) 53 $charset = str toupper( trim($charset) );53 $charset = str_replace( array(',', ' '), '', strtoupper( trim($charset) ) ); 54 54 else 55 55 $charset = 'ASCII, UTF-8, ISO-8859-1, JIS, EUC-JP, SJIS'; -
branches/2.8/xmlrpc.php
r11806 r12077 527 527 $page_date_gmt = mysql2date("Ymd\TH:i:s", $page->post_date_gmt, false); 528 528 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 529 534 // Pull the categories info together. 530 535 $categories = array(); … … 791 796 post_parent page_parent_id, 792 797 post_date_gmt, 793 post_date 798 post_date, 799 post_status 794 800 FROM {$wpdb->posts} 795 801 WHERE post_type = 'page' … … 806 812 $page_list[$i]->date_created_gmt = new IXR_Date($post_date_gmt); 807 813 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 808 820 unset($page_list[$i]->post_date_gmt); 809 821 unset($page_list[$i]->post_date); 822 unset($page_list[$i]->post_status); 810 823 } 811 824 … … 2577 2590 // For drafts use the GMT version of the post date 2578 2591 if ( $postdata['post_status'] == 'draft' ) { 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 ); 2592 $post_date_gmt = get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $postdata['post_date'] ), 'Ymd\TH:i:s' ); 2582 2593 } 2583 2594 … … 2698 2709 $post_date_gmt = mysql2date('Ymd\TH:i:s', $entry['post_date_gmt'], false); 2699 2710 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 2700 2716 $categories = array(); 2701 2717 $catids = wp_get_post_categories($entry['ID']); … … 2932 2948 $post_date = mysql2date('Ymd\TH:i:s', $entry['post_date'], false); 2933 2949 $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 } 2934 2955 2935 2956 $struct[] = array(
Note: See TracChangeset
for help on using the changeset viewer.