Changes from tags/2.8.5 at r12083 to tags/2.8.4 at r12083
- Location:
- tags/2.8.4
- Files:
-
- 2 added
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
tags/2.8.4/readme.html
r12083 r12083 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. 511 <br /> Version 2.8.4 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. 5:</h2>32 <h2>Upgrading from any previous WordPress to 2.8.4:</h2> 33 33 <ol> 34 34 <li>Delete your old WP files, saving ones you've modified.</li> -
tags/2.8.4/wp-admin/edit-attachment-rows.php
r12083 r12083 210 210 } // end if ( have_posts() ) 211 211 ?> 212 -
tags/2.8.4/wp-admin/import/wordpress.php
r12083 r12083 685 685 686 686 function is_valid_meta_key($key) { 687 // skip attachmentmetadata since we'll regenerate it from scratch688 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' ) 689 689 return false; 690 690 return $key; -
tags/2.8.4/wp-admin/includes/post.php
r12083 r12083 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.51066 * @return none1067 */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>";1086 1060 } 1087 1061 -
tags/2.8.4/wp-admin/includes/update-core.php
r12083 r12083 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',131 129 'wp-admin/inline-uploading.php', 132 130 'wp-admin/link-categories.php', -
tags/2.8.4/wp-admin/install.php
r12083 r12083 50 50 51 51 function display_setup_form( $error = null ) { 52 // Ensure that Blogs appear in search engines by default53 $blog_public = 1;54 if ( isset($_POST) && !empty($_POST) ) {55 $blog_public = isset($_POST['blog_public']);56 }57 58 52 if ( ! is_null( $error ) ) { 59 53 ?> … … 72 66 </tr> 73 67 <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> 75 69 </tr> 76 70 </table> -
tags/2.8.4/wp-admin/page.php
r12083 r12083 99 99 if ( current_user_can('edit_page', $page_ID) ) { 100 100 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';" ) ); 102 106 } else { 103 107 wp_set_post_lock( $post->ID ); -
tags/2.8.4/wp-admin/post.php
r12083 r12083 134 134 if ( current_user_can('edit_post', $post_ID) ) { 135 135 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';" ) ); 137 141 } else { 138 142 wp_set_post_lock( $post->ID ); -
tags/2.8.4/wp-app.php
r12083 r12083 781 781 782 782 $location = get_post_meta($entry['ID'], '_wp_attached_file', true); 783 $location = get_option ('upload_path') . '/' . $location;784 783 $filetype = wp_check_filetype($location); 785 784 … … 791 790 header('Connection: close'); 792 791 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); 806 797 807 798 log_app('function',"get_file($postID)"); -
tags/2.8.4/wp-includes/author-template.php
r12083 r12083 133 133 function the_author_link() { 134 134 if ( get_the_author_meta('url') ) { 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>';135 echo '<a href="' . get_the_author_meta('url') . '" title="' . 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 esc_attr( sprintf( __( 'Posts by %s' ),get_the_author() ) ),184 sprintf( __( 'Posts by %s' ), esc_attr( 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="' . 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>'; 296 296 297 297 if ( (! empty($feed_image)) || (! empty($feed)) ) { … … 302 302 303 303 if ( !empty($feed) ) { 304 $title = ' title="' . esc_attr($feed). '"';305 $alt = ' alt="' . esc_attr($feed). '"';304 $title = ' title="' . $feed . '"'; 305 $alt = ' alt="' . $feed . '"'; 306 306 $name = $feed; 307 307 $link .= $title; … … 311 311 312 312 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" . ' />'; 314 314 else 315 315 $link .= $name; -
tags/2.8.4/wp-includes/bookmark-template.php
r12083 r12083 91 91 $rel = $bookmark->link_rel; 92 92 if ( '' != $rel ) 93 $rel = ' rel="' . esc_attr($rel). '"';93 $rel = ' rel="' . $rel . '"'; 94 94 95 95 $target = $bookmark->link_target; -
tags/2.8.4/wp-includes/capabilities.php
r12083 r12083 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 else907 $caps[] = 'do_not_allow';908 break;909 903 default: 910 904 // If no meta caps match, return the original cap. -
tags/2.8.4/wp-includes/category-template.php
r12083 r12083 69 69 70 70 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; 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="' . 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>'; 194 194 break; 195 195 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 . '>'; 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="' . 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>'; 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="' . 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>'; 217 217 break; 218 218 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 . '>'; 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="' . 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>'; 227 227 } 228 228 ++$i; … … 353 353 354 354 $categories = get_categories( $r ); 355 $name = esc_attr($name);356 $class = esc_attr($class);357 355 358 356 $output = ''; -
tags/2.8.4/wp-includes/classes.php
r12083 r12083 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 $query = addslashes(WP_MatchesMapRegex::apply($query, $matches));219 eval("@\$query = \"" . addslashes($query) . "\";"); 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.01599 */1600 class WP_MatchesMapRegex {1601 /**1602 * store for matches1603 *1604 * @access private1605 * @var array1606 */1607 var $_matches;1608 1609 /**1610 * store for mapping result1611 *1612 * @access public1613 * @var string1614 */1615 var $output;1616 1617 /**1618 * subject to perform mapping on (query string containing $matches[] references1619 *1620 * @access private1621 * @var string1622 */1623 var $_subject;1624 1625 /**1626 * regexp pattern to match $matches[] references1627 *1628 * @var string1629 */1630 var $_pattern = '(\$matches\[[1-9]+[0-9]*\])'; // magic number1631 1632 /**1633 * constructor1634 *1635 * @param string $subject subject if regex1636 * @param array $matches data to use in map1637 * @return self1638 */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 use1649 *1650 * @access public1651 * @param string $subject subject1652 * @param array $matches data used for subsitution1653 * @return string1654 */1655 function apply($subject, $matches) {1656 $oSelf =& new WP_MatchesMapRegex($subject, $matches);1657 return $oSelf->output;1658 }1659 1660 /**1661 * do the actual mapping1662 *1663 * @access private1664 * @return string1665 */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 hook1673 *1674 * @access public1675 * @param array $matches preg_replace regexp matches1676 * @return string1677 */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 1685 1595 ?> -
tags/2.8.4/wp-includes/comment-template.php
r12083 r12083 338 338 $classes = array_merge($classes, $class); 339 339 } 340 341 $classes = array_map('esc_attr', $classes);342 340 343 341 return apply_filters('comment_class', $classes, $class, $comment_id, $post_id); … … 943 941 944 942 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>'; 946 944 return; 947 945 } … … 975 973 echo apply_filters( 'comments_popup_link_attributes', '' ); 976 974 977 echo ' title="' . esc_attr( sprintf( __('Comment on %s'), $title )) . '">';975 echo ' title="' . sprintf( __('Comment on %s'), $title ) . '">'; 978 976 comments_number( $zero, $one, $more, $number ); 979 977 echo '</a>'; -
tags/2.8.4/wp-includes/formatting.php
r12083 r12083 601 601 function sanitize_file_name( $filename ) { 602 602 $filename_raw = $filename; 603 $special_chars = array("?", "[", "]", "/", "\\", "=", "<", ">", ":", ";", ",", "'", "\"", "&", "$", "#", "*", "(", ")", "|", "~", "`", "!", "{", "}" , chr(0));603 $special_chars = array("?", "[", "]", "/", "\\", "=", "<", ">", ":", ";", ",", "'", "\"", "&", "$", "#", "*", "(", ")", "|", "~", "`", "!", "{", "}"); 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. Return format can be overridden using the 1456 * $format parameter 1455 * value of the 'gmt_offset' option. 1457 1456 * 1458 1457 * @since 1.2.0 … … 1460 1459 * @uses get_option() to retrieve the the value of 'gmt_offset'. 1461 1460 * @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)1463 1461 * @return string GMT version of the date provided. 1464 1462 */ 1465 function get_gmt_from_date($string , $format = 'Y-m-d H:i:s') {1463 function get_gmt_from_date($string) { 1466 1464 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); 1467 1465 $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); 1469 1467 return $string_gmt; 1470 1468 } … … 1474 1472 * 1475 1473 * 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 parameter1474 * gmt_offset. 1477 1475 * 1478 1476 * @since 1.2.0 1479 1477 * 1480 1478 * @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)1482 1479 * @return string Formatted date relative to the GMT offset. 1483 1480 */ 1484 function get_date_from_gmt($string , $format = 'Y-m-d H:i:s') {1481 function get_date_from_gmt($string) { 1485 1482 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); 1486 1483 $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); 1488 1485 return $string_localtime; 1489 1486 } -
tags/2.8.4/wp-includes/general-template.php
r12083 r12083 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="' . esc_attr__('Calendar') . '">1026 echo '<table id="wp-calendar" summary="' . __('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);1040 1039 echo "\n\t\t<th abbr=\"$wd\" scope=\"col\" title=\"$wd\">$day_name</th>"; 1041 1040 } … … 1060 1059 if ( $next ) { 1061 1060 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)) . ' »</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)) . ' »</a></td>'; 1064 1063 } else { 1065 1064 echo "\n\t\t".'<td colspan="3" id="next" class="pad"> </td>'; … … 1118 1117 $pad = calendar_week_mod(date('w', $unixmonth)-$week_begins); 1119 1118 if ( 0 != $pad ) 1120 echo "\n\t\t".'<td colspan="'. esc_attr($pad).'" class="pad"> </td>';1119 echo "\n\t\t".'<td colspan="'.$pad.'" class="pad"> </td>'; 1121 1120 1122 1121 $daysinmonth = intval(date('t', $unixmonth)); … … 1132 1131 1133 1132 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>"; 1135 1134 else 1136 1135 echo $day; … … 1143 1142 $pad = 7 - calendar_week_mod(date('w', mktime(0, 0 , 0, $thismonth, $day, $thisyear))-$week_begins); 1144 1143 if ( $pad != 0 && $pad != 7 ) 1145 echo "\n\t\t".'<td class="pad" colspan="'. esc_attr($pad).'"> </td>';1144 echo "\n\t\t".'<td class="pad" colspan="'.$pad.'"> </td>'; 1146 1145 1147 1146 echo "\n\t</tr>\n\t</tbody>\n\t</table>"; -
tags/2.8.4/wp-includes/media.php
r12083 r12083 592 592 return $content; 593 593 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">' 597 597 . do_shortcode( $content ) . '<p class="wp-caption-text">' . $caption . '</p></div>'; 598 598 } -
tags/2.8.4/wp-includes/post-template.php
r12083 r12083 342 342 $classes = array_merge($classes, $class); 343 343 } 344 345 $classes = array_map('esc_attr', $classes);346 344 347 345 return apply_filters('post_class', $classes, $class, $post_id); … … 480 478 $classes = array_merge($classes, $class); 481 479 } 482 483 $classes = array_map('esc_attr', $classes);484 480 485 481 return apply_filters('body_class', $classes, $class); … … 711 707 $pages = get_pages($r); 712 708 $output = ''; 713 $name = esc_attr($name);714 709 715 710 if ( ! empty($pages) ) { … … 848 843 $menu = '<ul>' . $menu . '</ul>'; 849 844 850 $menu = '<div class="' . esc_attr($args['menu_class']). '">' . $menu . "</div>\n";845 $menu = '<div class="' . $args['menu_class'] . '">' . $menu . "</div>\n"; 851 846 $menu = apply_filters( 'wp_page_menu', $menu, $args ); 852 847 if ( $args['echo'] ) -
tags/2.8.4/wp-includes/rewrite.php
r12083 r12083 300 300 301 301 // Substitute the substring matches into the query. 302 $query = addslashes(WP_MatchesMapRegex::apply($query, $matches));302 eval("\$query = \"" . addslashes($query) . "\";"); 303 303 // Filter out non-public query vars 304 304 global $wp; -
tags/2.8.4/wp-includes/theme.php
r12083 r12083 876 876 return; 877 877 878 add_filter( 'template', '_preview_theme_template_filter');878 add_filter( 'template', create_function('', "return '{$_GET['template']}';") ); 879 879 880 880 if ( isset($_GET['stylesheet']) ) { … … 882 882 if ( validate_file($_GET['stylesheet']) ) 883 883 return; 884 add_filter( 'stylesheet', '_preview_theme_stylesheet_filter');884 add_filter( 'stylesheet', create_function('', "return '{$_GET['stylesheet']}';") ); 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 theme896 *897 * @return string898 */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 theme905 *906 * @return string907 */908 function _preview_theme_stylesheet_filter() {909 return isset($_GET['stylesheet']) ? $_GET['stylesheet'] : '';910 }911 893 912 894 /** -
tags/2.8.4/wp-includes/version.php
r12083 r12083 9 9 * @global string $wp_version 10 10 */ 11 $wp_version = '2.8. 5';11 $wp_version = '2.8.4'; 12 12 13 13 /** -
tags/2.8.4/wp-trackback.php
r12083 r12083 51 51 52 52 if ($charset) 53 $charset = str _replace( array(',', ' '), '', strtoupper( trim($charset)) );53 $charset = strtoupper( trim($charset) ); 54 54 else 55 55 $charset = 'ASCII, UTF-8, ISO-8859-1, JIS, EUC-JP, SJIS'; -
tags/2.8.4/xmlrpc.php
r12083 r12083 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 date530 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 534 529 // Pull the categories info together. 535 530 $categories = array(); … … 796 791 post_parent page_parent_id, 797 792 post_date_gmt, 798 post_date, 799 post_status 793 post_date 800 794 FROM {$wpdb->posts} 801 795 WHERE post_type = 'page' … … 812 806 $page_list[$i]->date_created_gmt = new IXR_Date($post_date_gmt); 813 807 814 // For drafts use the GMT version of the date815 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 820 808 unset($page_list[$i]->post_date_gmt); 821 809 unset($page_list[$i]->post_date); 822 unset($page_list[$i]->post_status);823 810 } 824 811 … … 2590 2577 // For drafts use the GMT version of the post date 2591 2578 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 ); 2593 2582 } 2594 2583 … … 2709 2698 $post_date_gmt = mysql2date('Ymd\TH:i:s', $entry['post_date_gmt'], false); 2710 2699 2711 // For drafts use the GMT version of the date2712 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 2716 2700 $categories = array(); 2717 2701 $catids = wp_get_post_categories($entry['ID']); … … 2948 2932 $post_date = mysql2date('Ymd\TH:i:s', $entry['post_date'], false); 2949 2933 $post_date_gmt = mysql2date('Ymd\TH:i:s', $entry['post_date_gmt'], false); 2950 2951 // For drafts use the GMT version of the date2952 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 }2955 2934 2956 2935 $struct[] = array(
Note: See TracChangeset
for help on using the changeset viewer.