Index: tags/2.7/wp-admin/admin-ajax.php
===================================================================
--- tags/2.7.1/wp-admin/admin-ajax.php (revision 10539)
+++ tags/2.7/wp-admin/admin-ajax.php (revision 10539)
@@ -431,7 +431,4 @@
if ( empty( $tags ) )
die( __('No tags found!') );
-
- if ( is_wp_error($tags) )
- die($tags->get_error_message());
foreach ( $tags as $key => $tag ) {
@@ -724,5 +721,5 @@
$data = '';
- $message = sprintf( __('Draft Saved at %s.'), date_i18n( __('g:i:s a') ) );
+ $message = sprintf( __('Draft Saved at %s.'), date( __('g:i:s a'), current_time( 'timestamp', true ) ) );
$supplemental = array();
Index: tags/2.7/wp-admin/admin.php
===================================================================
--- tags/2.7.1/wp-admin/admin.php (revision 10539)
+++ tags/2.7/wp-admin/admin.php (revision 10539)
@@ -62,10 +62,5 @@
// backwards compatibility for plugins using add_management_page
if ( empty( $page_hook ) && 'edit.php' == $pagenow && '' != get_plugin_page_hook($plugin_page, 'tools.php') ) {
- // There could be plugin specific params on the URL, so we need the whole query string
- if ( !empty($_SERVER[ 'QUERY_STRING' ]) )
- $query_string = $_SERVER[ 'QUERY_STRING' ];
- else
- $query_string = 'page=' . $plugin_page;
- wp_redirect( 'tools.php?' . $query_string );
+ wp_redirect('tools.php?page=' . $plugin_page);
exit;
}
Index: tags/2.7/wp-admin/css/colors-classic.css
===================================================================
--- tags/2.7.1/wp-admin/css/colors-classic.css (revision 10539)
+++ tags/2.7/wp-admin/css/colors-classic.css (revision 10539)
@@ -614,13 +614,13 @@
}
-.plugins .active,
-.plugins .active th,
-.plugins .active td {
+.plugins .active {
background-color: #e7f7d3;
}
-#the-comment-list .unapproved,
-#the-comment-list .unapproved th,
-#the-comment-list .unapproved td {
+.plugins .togl {
+ border-right-color: #ccc;
+}
+
+#the-comment-list .unapproved {
background-color: #ffffe0;
}
Index: tags/2.7/wp-admin/css/colors-fresh.css
===================================================================
--- tags/2.7.1/wp-admin/css/colors-fresh.css (revision 10539)
+++ tags/2.7/wp-admin/css/colors-fresh.css (revision 10539)
@@ -614,13 +614,13 @@
}
-.plugins .active,
-.plugins .active th,
-.plugins .active td {
+.plugins .active {
background-color: #e7f7d3;
}
-#the-comment-list .unapproved,
-#the-comment-list .unapproved th,
-#the-comment-list .unapproved td {
+.plugins .togl {
+ border-right-color: #ccc;
+}
+
+#the-comment-list .unapproved {
background-color: #ffffe0;
}
Index: tags/2.7/wp-admin/css/ie.css
===================================================================
--- tags/2.7.1/wp-admin/css/ie.css (revision 10539)
+++ tags/2.7/wp-admin/css/ie.css (revision 10539)
@@ -179,8 +179,4 @@
}
/* end Inline Editor */
-
-input {
- line-height: 1;
-}
* html .row-actions {
@@ -278,6 +274,5 @@
}
-#ed_toolbar input,
-#ed_reply_toolbar input {
+#ed_toolbar input {
overflow: visible;
padding: 0 4px;
Index: tags/2.7/wp-admin/css/press-this.css
===================================================================
--- tags/2.7.1/wp-admin/css/press-this.css (revision 10539)
+++ tags/2.7/wp-admin/css/press-this.css (revision 10539)
@@ -121,5 +121,7 @@
padding: 7px;
margin: 0 0 10px;
- background: #dfdfdf url("../images/gray-grad.png") repeat-x left top;
+ background-image: url(../images/postbox-bg.gif);
+ background-position: left top;
+ background-repeat: repeat-x;
font-size: 12px;
font-weight: bold;
Index: tags/2.7/wp-admin/edit-comments.php
===================================================================
--- tags/2.7.1/wp-admin/edit-comments.php (revision 10539)
+++ tags/2.7/wp-admin/edit-comments.php (revision 10539)
@@ -19,9 +19,6 @@
$delete_time = $wpdb->escape( $_REQUEST['pagegen_timestamp'] );
- if ( current_user_can('moderate_comments')) {
- $deleted_spam = $wpdb->query( "DELETE FROM $wpdb->comments WHERE comment_approved = 'spam' AND '$delete_time' > comment_date_gmt" );
- } else {
- $deleted_spam = 0;
- }
+ $deleted_spam = $wpdb->query( "DELETE FROM $wpdb->comments WHERE comment_approved = 'spam' AND '$delete_time' > comment_date_gmt" );
+
$redirect_to = 'edit-comments.php?comment_status=spam&deleted=' . (int) $deleted_spam;
if ( $post_id )
@@ -276,9 +273,7 @@
if ( 'spam' == $comment_status ) {
- wp_nonce_field('bulk-spam-delete', '_spam_nonce');
- if ( current_user_can ('moderate_comments')) { ?>
-
-
+ wp_nonce_field('bulk-spam-delete', '_spam_nonce'); ?>
+
+
@@ -330,5 +325,5 @@
-
+
Index: tags/2.7/wp-admin/edit-link-form.php
===================================================================
--- tags/2.7.1/wp-admin/edit-link-form.php (revision 10539)
+++ tags/2.7/wp-admin/edit-link-form.php (revision 10539)
@@ -119,5 +119,5 @@
-
+
Index: tags/2.7/wp-admin/import/blogger.php
===================================================================
--- tags/2.7.1/wp-admin/import/blogger.php (revision 10539)
+++ tags/2.7/wp-admin/import/blogger.php (revision 10539)
@@ -551,5 +551,5 @@
// Clean up content
- $post_content = preg_replace_callback('|<(/?[A-Z]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $post_content);
+ $post_content = preg_replace('|<(/?[A-Z]+)|e', "'<' . strtolower('$1')", $post_content);
$post_content = str_replace('
', '
', $post_content);
$post_content = str_replace('
', '
', $post_content);
@@ -604,5 +604,5 @@
// Clean up content
- $comment_content = preg_replace_callback('|<(/?[A-Z]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $comment_content);
+ $comment_content = preg_replace('|<(/?[A-Z]+)|e', "'<' . strtolower('$1')", $comment_content);
$comment_content = str_replace('
', '
', $comment_content);
$comment_content = str_replace('
', '
', $comment_content);
Index: tags/2.7/wp-admin/import/blogware.php
===================================================================
--- tags/2.7.1/wp-admin/import/blogware.php (revision 10539)
+++ tags/2.7/wp-admin/import/blogware.php (revision 10539)
@@ -90,5 +90,5 @@
// Clean up content
- $post_content = preg_replace_callback('|<(/?[A-Z]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $post_content);
+ $post_content = preg_replace('|<(/?[A-Z]+)|e', "'<' . strtolower('$1')", $post_content);
$post_content = str_replace('
', '
', $post_content);
$post_content = str_replace('
', '
', $post_content);
@@ -130,5 +130,5 @@
// Clean up content
- $comment_content = preg_replace_callback('|<(/?[A-Z]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $comment_content);
+ $comment_content = preg_replace('|<(/?[A-Z]+)|e', "'<' . strtolower('$1')", $comment_content);
$comment_content = str_replace('
', '
', $comment_content);
$comment_content = str_replace('
', '
', $comment_content);
Index: tags/2.7/wp-admin/import/livejournal.php
===================================================================
--- tags/2.7.1/wp-admin/import/livejournal.php (revision 10539)
+++ tags/2.7/wp-admin/import/livejournal.php (revision 10539)
@@ -71,5 +71,5 @@
// Clean up content
- $post_content = preg_replace_callback('|<(/?[A-Z]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $post_content);
+ $post_content = preg_replace('|<(/?[A-Z]+)|e', "'<' . strtolower('$1')", $post_content);
$post_content = str_replace('
', '
', $post_content);
$post_content = str_replace('
', '
', $post_content);
@@ -107,5 +107,5 @@
// Clean up content
- $comment_content = preg_replace_callback('|<(/?[A-Z]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $comment_content);
+ $comment_content = preg_replace('|<(/?[A-Z]+)|e', "'<' . strtolower('$1')", $comment_content);
$comment_content = str_replace('
', '
', $comment_content);
$comment_content = str_replace('
', '
', $comment_content);
Index: tags/2.7/wp-admin/import/mt.php
===================================================================
--- tags/2.7.1/wp-admin/import/mt.php (revision 10539)
+++ tags/2.7/wp-admin/import/mt.php (revision 10539)
@@ -439,8 +439,6 @@
} else {
// Processing multi-line field, check context.
-
- if( !empty($line) )
- $line .= "\n";
-
+
+ $line .= "\n";
if ( 'body' == $context ) {
$post->post_content .= $line;
Index: tags/2.7/wp-admin/import/rss.php
===================================================================
--- tags/2.7.1/wp-admin/import/rss.php (revision 10539)
+++ tags/2.7/wp-admin/import/rss.php (revision 10539)
@@ -104,5 +104,5 @@
// Clean up content
- $post_content = preg_replace_callback('|<(/?[A-Z]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $post_content);
+ $post_content = preg_replace('|<(/?[A-Z]+)|e', "'<' . strtolower('$1')", $post_content);
$post_content = str_replace('
', '
', $post_content);
$post_content = str_replace('
', '
', $post_content);
Index: tags/2.7/wp-admin/import/wordpress.php
===================================================================
--- tags/2.7.1/wp-admin/import/wordpress.php (revision 10539)
+++ tags/2.7/wp-admin/import/wordpress.php (revision 10539)
@@ -382,10 +382,10 @@
$post_excerpt = $this->get_tag( $post, 'excerpt:encoded' );
- $post_excerpt = preg_replace_callback('|<(/?[A-Z]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $post_excerpt);
+ $post_excerpt = preg_replace('|<(/?[A-Z]+)|e', "'<' . strtolower('$1')", $post_excerpt);
$post_excerpt = str_replace('
', '
', $post_excerpt);
$post_excerpt = str_replace('
', '
', $post_excerpt);
$post_content = $this->get_tag( $post, 'content:encoded' );
- $post_content = preg_replace_callback('|<(/?[A-Z]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $post_content);
+ $post_content = preg_replace('|<(/?[A-Z]+)|e', "'<' . strtolower('$1')", $post_content);
$post_content = str_replace('
', '
', $post_content);
$post_content = str_replace('
', '
', $post_content);
Index: tags/2.7/wp-admin/includes/bookmark.php
===================================================================
--- tags/2.7.1/wp-admin/includes/bookmark.php (revision 10539)
+++ tags/2.7/wp-admin/includes/bookmark.php (revision 10539)
@@ -143,11 +143,6 @@
$update = true;
- if ( trim( $link_name ) == '' ) {
- if ( trim( $link_url ) != '' ) {
- $link_name = $link_url;
- } else {
- return 0;
- }
- }
+ if ( trim( $link_name ) == '' )
+ return 0;
if ( trim( $link_url ) == '' )
Index: tags/2.7/wp-admin/includes/dashboard.php
===================================================================
--- tags/2.7.1/wp-admin/includes/dashboard.php (revision 10539)
+++ tags/2.7/wp-admin/includes/dashboard.php (revision 10539)
@@ -182,11 +182,10 @@
// Posts
$num = number_format_i18n( $num_posts->publish );
- $text = __ngettext( 'Post', 'Posts', intval($num_posts->publish) );
- if ( current_user_can( 'edit_posts' ) ) {
- $num = "$num";
- $text = "$text";
- }
- echo '' . $num . ' | ';
- echo '' . $text . ' | ';
+ if ( current_user_can( 'edit_posts' ) )
+ $text = "$num";
+ else
+ $text = $num;
+ echo '' . $text . ' | ';
+ echo '' . __ngettext( 'Post', 'Posts', intval($num_posts->publish) ) . ' | ';
/* TODO: Show status breakdown on hover
if ( $can_edit_pages && !empty($num_pages->publish) ) { // how many pages is not exposed in feeds. Don't show if !current_user_can
@@ -208,11 +207,8 @@
// Total Comments
$num = number_format_i18n($num_comm->total_comments);
- $text = __ngettext( 'Comment', 'Comments', $num_comm->total_comments );
- if ( current_user_can( 'moderate_comments' ) ) {
+ if ( current_user_can( 'moderate_comments' ) )
$num = "$num";
- $text = "$text";
- }
- echo '';
- echo '';
+ echo '';
+ echo '';
echo '';
@@ -220,21 +216,15 @@
// Pages
$num = number_format_i18n( $num_pages->publish );
- $text = __ngettext( 'Page', 'Pages', $num_pages->publish );
- if ( current_user_can( 'edit_pages' ) ) {
+ if ( current_user_can( 'edit_pages' ) )
$num = "$num";
- $text = "$text";
- }
- echo '' . $num . ' | ';
- echo '' . $text . ' | ';
+ echo ''.$num.' | ';
+ echo '' . __ngettext( 'Page', 'Pages', $num_pages->publish ) . ' | ';
// Approved Comments
$num = number_format_i18n($num_comm->approved);
- $text = __ngettext( 'Approved', 'Approved', $num_comm->approved );
- if ( current_user_can( 'moderate_comments' ) ) {
+ if ( current_user_can( 'moderate_comments' ) )
$num = "$num";
- $text = "$text";
- }
- echo '' . $num . ' | ';
- echo '' . $text . ' | ';
+ echo ''.$num.' | ';
+ echo '' . __ngettext( 'Approved', 'Approved', $num_comm->approved ) . ' | ';
echo "
\n\t";
@@ -242,21 +232,15 @@
// Categories
$num = number_format_i18n( $num_cats );
- $text = __ngettext( 'Category', 'Categories', $num_cats );
- if ( current_user_can( 'manage_categories' ) ) {
+ if ( current_user_can( 'manage_categories' ) )
$num = "$num";
- $text = "$text";
- }
- echo '' . $num . ' | ';
- echo '' . $text . ' | ';
+ echo ''.$num.' | ';
+ echo '' . __ngettext( 'Category', 'Categories', $num_cats ) . ' | ';
// Pending Comments
$num = number_format_i18n($num_comm->moderated);
- $text = __ngettext( 'Pending', 'Pending', $num_comm->moderated );
- if ( current_user_can( 'moderate_comments' ) ) {
+ if ( current_user_can( 'moderate_comments' ) )
$num = "$num";
- $text = "$text";
- }
- echo '' . $num . ' | ';
- echo '' . $text . ' | ';
+ echo ''.$num.' | ';
+ echo '' . __ngettext( 'Pending', 'Pending', $num_comm->moderated ) . ' | ';
echo "
\n\t";
@@ -264,21 +248,15 @@
// Tags
$num = number_format_i18n( $num_tags );
- $text = __ngettext( 'Tag', 'Tags', $num_tags );
- if ( current_user_can( 'manage_categories' ) ) {
+ if ( current_user_can( 'manage_categories' ) )
$num = "$num";
- $text = "$text";
- }
- echo '' . $num . ' | ';
- echo '' . $text . ' | ';
+ echo ''.$num.' | ';
+ echo '' . __ngettext( 'Tag', 'Tags', $num_tags ) . ' | ';
// Spam Comments
$num = number_format_i18n($num_comm->spam);
- $text = __ngettext( 'Spam', 'Spam', $num_comm->spam );
- if ( current_user_can( 'moderate_comments' ) ) {
+ if ( current_user_can( 'moderate_comments' ) )
$num = "$num";
- $text = "$text";
- }
- echo '' . $num . ' | ';
- echo '' . $text . ' | ';
+ echo ''.$num.' | ';
+ echo '' . __ngettext( 'Spam', 'Spam', $num_comm->spam ) . ' | ';
echo "
";
@@ -304,5 +282,5 @@
update_right_now_message();
- echo "\n\t".'
';
+ echo "\n\t".'';
do_action( 'rightnow_end' );
do_action( 'activity_box_end' );
Index: tags/2.7/wp-admin/includes/file.php
===================================================================
--- tags/2.7.1/wp-admin/includes/file.php (revision 10539)
+++ tags/2.7/wp-admin/includes/file.php (revision 10539)
@@ -668,11 +668,6 @@
$credentials['private_key'] = defined('FTP_PRIKEY') ? FTP_PRIKEY : (!empty($_POST['private_key']) ? $_POST['private_key'] : $credentials['private_key']);
- //sanitize the hostname, Some people might pass in odd-data:
- $credentials['hostname'] = preg_replace('|\w+://|', '', $credentials['hostname']); //Strip any schemes off
-
if ( strpos($credentials['hostname'], ':') )
list( $credentials['hostname'], $credentials['port'] ) = explode(':', $credentials['hostname'], 2);
- else
- unset($credentials['port']);
if ( defined('FTP_SSH') || (isset($_POST['connection_type']) && 'ssh' == $_POST['connection_type']) )
@@ -685,8 +680,5 @@
if ( ! $error && !empty($credentials['password']) && !empty($credentials['username']) && !empty($credentials['hostname']) ) {
$stored_credentials = $credentials;
- if ( !empty($stored_credentials['port']) ) //save port as part of hostname to simplify above code.
- $stored_credentials['hostname'] .= ':' . $stored_credentials['port'];
-
- unset($stored_credentials['password'], $stored_credentials['port'], $stored_credentials['private_key'], $stored_credentials['public_key']);
+ unset($stored_credentials['password'], $stored_credentials['private_key'], $stored_credentials['public_key']);
update_option('ftp_credentials', $stored_credentials);
return $credentials;
Index: tags/2.7/wp-admin/includes/media.php
===================================================================
--- tags/2.7.1/wp-admin/includes/media.php (revision 10539)
+++ tags/2.7/wp-admin/includes/media.php (revision 10539)
@@ -370,9 +370,4 @@
check_admin_referer('media-form');
- if ( isset($_POST['send']) ) {
- $keys = array_keys($_POST['send']);
- $send_id = (int) array_shift($keys);
- }
-
if ( !empty($_POST['attachments']) ) foreach ( $_POST['attachments'] as $attachment_id => $attachment ) {
$post = $_post = get_post($attachment_id, ARRAY_A);
@@ -385,8 +380,6 @@
if ( isset($attachment['menu_order']) )
$post['menu_order'] = $attachment['menu_order'];
- if ( isset($send_id) && $attachment_id == $send_id ) {
- if ( isset($attachment['post_parent']) )
- $post['post_parent'] = $attachment['post_parent'];
- }
+ if ( isset($attachment['post_parent']) )
+ $post['post_parent'] = $attachment['post_parent'];
$post = apply_filters('attachment_fields_to_save', $post, $attachment);
@@ -416,5 +409,7 @@
}
- if ( isset($send_id) ) {
+ if ( isset($_POST['send']) ) {
+ $keys = array_keys($_POST['send']);
+ $send_id = (int) array_shift($keys);
$attachment = stripslashes_deep( $_POST['attachments'][$send_id] );
$html = $attachment['post_title'];
Index: tags/2.7/wp-admin/includes/plugin.php
===================================================================
--- tags/2.7.1/wp-admin/includes/plugin.php (revision 10539)
+++ tags/2.7/wp-admin/includes/plugin.php (revision 10539)
@@ -122,5 +122,5 @@
$plugin_data['Title'] = $plugin_data['Name'];
- if ( ! empty($plugin_data['AuthorURI']) && ! empty($plugin_data['Author']) )
+ if ( ! empty($plugin_data['AuthorURI']) )
$plugin_data['Author'] = '' . $plugin_data['Author'] . '';
@@ -863,5 +863,5 @@
$parent = get_admin_page_parent();
- if ( !isset( $plugin_page ) && isset( $_wp_submenu_nopriv[$parent][$pagenow] ) )
+ if ( isset( $_wp_submenu_nopriv[$parent][$pagenow] ) )
return false;
Index: tags/2.7/wp-admin/includes/post.php
===================================================================
--- tags/2.7.1/wp-admin/includes/post.php (revision 10539)
+++ tags/2.7/wp-admin/includes/post.php (revision 10539)
@@ -229,5 +229,5 @@
$post_data = &$_POST;
- if ( isset($post_data['post_type']) && 'page' == $post_data['post_type'] ) {
+ if ( 'page' == $post_data['post_type'] ) {
if ( ! current_user_can( 'edit_pages' ) )
wp_die( __('You are not allowed to edit pages.') );
@@ -237,5 +237,5 @@
}
- $post_IDs = array_map( 'intval', (array) $post_data['post'] );
+ $post_IDs = array_map( intval, (array) $post_data['post'] );
$reset = array( 'post_author', 'post_status', 'post_password', 'post_parent', 'page_template', 'comment_status', 'ping_status', 'keep_private', 'tags_input', 'post_category', 'sticky' );
@@ -910,6 +910,4 @@
}
- $post->filter = 'sample';
-
$permalink = get_permalink($post, true);
@@ -929,6 +927,4 @@
$post->post_date = $original_date;
$post->post_name = $original_name;
- unset($post->filter);
-
return $permalink;
}
@@ -1166,7 +1162,7 @@
if ( ! empty($mce_external_languages) ) {
foreach ( $mce_external_languages as $name => $path ) {
- if ( @is_file($path) && @is_readable($path) ) {
+ if ( is_file($path) && is_readable($path) ) {
include_once($path);
- $ext_plugins .= $strings . "\n";
+ $ext_plugins .= $strings;
$loaded_langs[] = $name;
}
@@ -1189,19 +1185,19 @@
$path = trailingslashit( realpath($path) );
- if ( @is_file($path . $mce_locale . '.js') )
- $strings .= @file_get_contents($path . $mce_locale . '.js') . "\n";
-
- if ( @is_file($path . $mce_locale . '_dlg.js') )
- $strings .= @file_get_contents($path . $mce_locale . '_dlg.js') . "\n";
+ if ( is_file($path . $mce_locale . '.js') )
+ $strings .= @file_get_contents($path . $mce_locale . '.js');
+
+ if ( is_file($path . $mce_locale . '_dlg.js') )
+ $strings .= @file_get_contents($path . $mce_locale . '_dlg.js');
if ( 'en' != $mce_locale && empty($strings) ) {
- if ( @is_file($path . 'en.js') ) {
+ if ( is_file($path . 'en.js') ) {
$str1 = @file_get_contents($path . 'en.js');
- $strings .= preg_replace( '/([\'"])en\./', '$1' . $mce_locale . '.', $str1, 1 ) . "\n";
+ $strings .= preg_replace( '/([\'"])en\./', '$1' . $mce_locale . '.', $str1, 1 );
}
- if ( @is_file($path . 'en_dlg.js') ) {
+ if ( is_file($path . 'en_dlg.js') ) {
$str2 = @file_get_contents($path . 'en_dlg.js');
- $strings .= preg_replace( '/([\'"])en\./', '$1' . $mce_locale . '.', $str2, 1 ) . "\n";
+ $strings .= preg_replace( '/([\'"])en\./', '$1' . $mce_locale . '.', $str2, 1 );
}
}
Index: tags/2.7/wp-admin/includes/schema.php
===================================================================
--- tags/2.7.1/wp-admin/includes/schema.php (revision 10539)
+++ tags/2.7/wp-admin/includes/schema.php (revision 10539)
@@ -352,5 +352,5 @@
// Add caps for Administrator role
- $role =& get_role('administrator');
+ $role = get_role('administrator');
$role->add_cap('switch_themes');
$role->add_cap('edit_themes');
@@ -385,5 +385,5 @@
// Add caps for Editor role
- $role =& get_role('editor');
+ $role = get_role('editor');
$role->add_cap('moderate_comments');
$role->add_cap('manage_categories');
@@ -407,5 +407,5 @@
// Add caps for Author role
- $role =& get_role('author');
+ $role = get_role('author');
$role->add_cap('upload_files');
$role->add_cap('edit_posts');
@@ -418,5 +418,5 @@
// Add caps for Contributor role
- $role =& get_role('contributor');
+ $role = get_role('contributor');
$role->add_cap('edit_posts');
$role->add_cap('read');
@@ -425,5 +425,5 @@
// Add caps for Subscriber role
- $role =& get_role('subscriber');
+ $role = get_role('subscriber');
$role->add_cap('read');
$role->add_cap('level_0');
@@ -438,5 +438,5 @@
$roles = array('administrator', 'editor');
foreach ($roles as $role) {
- $role =& get_role($role);
+ $role = get_role($role);
if ( empty($role) )
continue;
@@ -459,5 +459,5 @@
}
- $role =& get_role('administrator');
+ $role = get_role('administrator');
if ( ! empty($role) ) {
$role->add_cap('delete_users');
@@ -465,5 +465,5 @@
}
- $role =& get_role('author');
+ $role = get_role('author');
if ( ! empty($role) ) {
$role->add_cap('delete_posts');
@@ -471,5 +471,5 @@
}
- $role =& get_role('contributor');
+ $role = get_role('contributor');
if ( ! empty($role) ) {
$role->add_cap('delete_posts');
@@ -483,5 +483,5 @@
*/
function populate_roles_230() {
- $role =& get_role( 'administrator' );
+ $role = get_role( 'administrator' );
if ( !empty( $role ) ) {
@@ -496,5 +496,5 @@
*/
function populate_roles_250() {
- $role =& get_role( 'administrator' );
+ $role = get_role( 'administrator' );
if ( !empty( $role ) ) {
@@ -509,5 +509,5 @@
*/
function populate_roles_260() {
- $role =& get_role( 'administrator' );
+ $role = get_role( 'administrator' );
if ( !empty( $role ) ) {
@@ -523,5 +523,5 @@
*/
function populate_roles_270() {
- $role =& get_role( 'administrator' );
+ $role = get_role( 'administrator' );
if ( !empty( $role ) ) {
Index: tags/2.7/wp-admin/includes/template.php
===================================================================
--- tags/2.7.1/wp-admin/includes/template.php (revision 10539)
+++ tags/2.7/wp-admin/includes/template.php (revision 10539)
@@ -440,8 +440,6 @@
* @param unknown_type $popular_cats
*/
-function wp_category_checklist( $post_id = 0, $descendants_and_self = 0, $selected_cats = false, $popular_cats = false, $walker = null ) {
- if ( empty($walker) || !is_a($walker, 'Walker') )
- $walker = new Walker_Category_Checklist;
-
+function wp_category_checklist( $post_id = 0, $descendants_and_self = 0, $selected_cats = false, $popular_cats = false ) {
+ $walker = new Walker_Category_Checklist;
$descendants_and_self = (int) $descendants_and_self;
@@ -2400,5 +2398,5 @@
if ( $for_post )
- $edit = ( in_array($post->post_status, array('draft', 'pending') ) && (!$post->post_date_gmt || '0000-00-00 00:00:00' == $post->post_date_gmt ) ) ? false : true;
+ $edit = ( in_array($post->post_status, array('draft', 'pending') ) && (!$post->post_date || '0000-00-00 00:00:00' == $post->post_date ) ) ? false : true;
$tab_index_attribute = '';
Index: tags/2.7/wp-admin/index.php
===================================================================
--- tags/2.7.1/wp-admin/index.php (revision 10539)
+++ tags/2.7/wp-admin/index.php (revision 10539)
@@ -42,3 +42,3 @@
-
+
Index: tags/2.7/wp-admin/js/common.js
===================================================================
--- tags/2.7.1/wp-admin/js/common.js (revision 10539)
+++ tags/2.7/wp-admin/js/common.js (revision 10539)
@@ -1,4 +1,4 @@
-var wpCookies = {
+wpCookies = {
// The following functions are from Cookie.js class in TinyMCE, Moxiecode, used under LGPL.
Index: tags/2.7/wp-admin/js/editor.js
===================================================================
--- tags/2.7.1/wp-admin/js/editor.js (revision 10539)
+++ tags/2.7/wp-admin/js/editor.js (revision 10539)
@@ -1,4 +1,4 @@
-var switchEditors = {
+switchEditors = {
mode : '',
@@ -170,3 +170,3 @@
return pee;
}
-};
+}
Index: tags/2.7/wp-admin/js/link.js
===================================================================
--- tags/2.7.1/wp-admin/js/link.js (revision 10539)
+++ tags/2.7/wp-admin/js/link.js (revision 10539)
@@ -12,5 +12,5 @@
// Ajax Cat
var newCat = jQuery('#newcat').one( 'focus', function() { jQuery(this).val( '' ).removeClass( 'form-input-tip' ) } );
- jQuery('#category-add-submit').click( function() { newCat.focus(); } );
+ jQuery('#category-add-sumbit').click( function() { newCat.focus(); } );
var noSyncChecks = false; // prophylactic. necessary?
var syncChecks = function() {
Index: tags/2.7/wp-admin/js/plugin-install.js
===================================================================
--- tags/2.7.1/wp-admin/js/plugin-install.js (revision 10539)
+++ tags/2.7/wp-admin/js/plugin-install.js (revision 10539)
@@ -30,4 +30,6 @@
return false;
});
+
+ $(window).resize( function() { tb_position() } );
});
Index: tags/2.7/wp-admin/link-manager.php
===================================================================
--- tags/2.7.1/wp-admin/link-manager.php (revision 10539)
+++ tags/2.7/wp-admin/link-manager.php (revision 10539)
@@ -169,5 +169,5 @@
$link->link_category = wp_get_link_cats($link->link_id);
$short_url = str_replace('http://', '', $link->link_url);
- $short_url = preg_replace('/^www./i', '', $short_url);
+ $short_url = str_replace('www.', '', $short_url);
if ('/' == substr($short_url, -1))
$short_url = substr($short_url, 0, -1);
Index: tags/2.7/wp-admin/menu-header.php
===================================================================
--- tags/2.7.1/wp-admin/menu-header.php (revision 10539)
+++ tags/2.7/wp-admin/menu-header.php (revision 10539)
@@ -75,5 +75,5 @@
$submenu[$item[2]] = array_values($submenu[$item[2]]); // Re-index.
$menu_hook = get_plugin_page_hook($submenu[$item[2]][0][2], $item[2]);
- if ( ( file_exists(WP_PLUGIN_DIR . "/{$submenu[$item[2]][0][2]}") && ('index.php' != $submenu[$item[2]][0][2]) ) || !empty($menu_hook)) {
+ if ( file_exists(WP_PLUGIN_DIR . "/{$submenu[$item[2]][0][2]}") || !empty($menu_hook)) {
$admin_is_parent = true;
echo "$img$toggle{$item[0]}";
@@ -116,5 +116,5 @@
$menu_hook = get_plugin_page_hook($sub_item[2], $item[2]);
- if ( ( file_exists(WP_PLUGIN_DIR . "/{$sub_item[2]}") && ('index.php' != $sub_item[2]) ) || ! empty($menu_hook) ) {
+ if ( file_exists(WP_PLUGIN_DIR . "/{$sub_item[2]}") || ! empty($menu_hook) ) {
// If admin.php is the current page or if the parent exists as a file in the plugins or admin dir
$parent_exists = (!$admin_is_parent && file_exists(WP_PLUGIN_DIR . "/{$item[2]}") && !is_dir(WP_PLUGIN_DIR . "/{$item[2]}") ) || file_exists($item[2]);
Index: tags/2.7/wp-admin/menu.php
===================================================================
--- tags/2.7.1/wp-admin/menu.php (revision 10539)
+++ tags/2.7/wp-admin/menu.php (revision 10539)
@@ -84,5 +84,5 @@
}
-$menu[55] = array( __('Tools'), 'read', 'tools.php', '', 'menu-top', 'menu-tools', 'div' );
+$menu[55] = array( __('Tools'), 'manage_options', 'tools.php', '', 'menu-top', 'menu-tools', 'div' );
$submenu['tools.php'][5] = array( __('Tools'), 'read', 'tools.php' );
$submenu['tools.php'][10] = array( __('Import'), 'import', 'import.php' );
Index: tags/2.7/wp-admin/theme-editor.php
===================================================================
--- tags/2.7.1/wp-admin/theme-editor.php (revision 10539)
+++ tags/2.7/wp-admin/theme-editor.php (revision 10539)
@@ -97,5 +97,5 @@
$description = get_file_description($file);
-$desc_header = ( $description != $file_show ) ? "$description (%s)" : "%s";
+$desc_header = ( $description != $file_show ) ? "$description (%s)" : "%s";
?>
@@ -121,5 +121,5 @@
-
+
Index: tags/2.7/wp-admin/update-core.php
===================================================================
--- tags/2.7.1/wp-admin/update-core.php (revision 10539)
+++ tags/2.7/wp-admin/update-core.php (revision 10539)
@@ -135,9 +135,5 @@
global $wp_filesystem;
- if ( $reinstall )
- $url = 'update-core.php?action=do-core-reinstall';
- else
- $url = 'update-core.php?action=do-core-upgrade';
- $url = wp_nonce_url($url, 'upgrade-core');
+ $url = wp_nonce_url('update-core.php?action=do-core-upgrade', 'upgrade-core');
if ( false === ($credentials = request_filesystem_credentials($url)) )
return;
Index: tags/2.7/wp-admin/wp-admin.css
===================================================================
--- tags/2.7.1/wp-admin/wp-admin.css (revision 10539)
+++ tags/2.7/wp-admin/wp-admin.css (revision 10539)
@@ -16,6 +16,6 @@
}
-.plugins .action-links {
- white-space: nowrap;
+.plugins .togl {
+ width: 150px;
}
@@ -436,6 +436,5 @@
}
-#ed_toolbar input,
-#ed_reply_toolbar input {
+#ed_toolbar input {
margin: 3px 1px 4px;
line-height: 18px;
@@ -450,8 +449,4 @@
-webkit-border-radius: 3px;
border-radius: 3px;
-}
-
-#ed_reply_toolbar input {
- margin: 1px 2px 1px 1px;
}
@@ -1649,5 +1644,4 @@
#edit-slug-box {
- height: 1em;
margin-top: 8px;
padding: 0 7px;
@@ -1859,29 +1853,4 @@
padding: 0;
line-height: 19px;
-}
-
-#category-adder h4 {
- margin-top: 4px;
- margin-bottom: 0px;
-}
-
-#categorydiv .ui-tabs-panel {
- border-width: 3px;
- border-style: solid;
-}
-
-ul#category-tabs {
- margin-top: 12px;
-}
-
-ul#category-tabs li {
- padding: 5px 8px;
- -moz-border-radius: 3px 3px 0 0;
- -webkit-border-top-left-radius: 3px;
- -webkit-border-top-right-radius: 3px;
- -khtml-border-top-left-radius: 3px;
- -khtml-border-top-right-radius: 3px;
- border-top-left-radius: 3px;
- border-top-right-radius: 3px;
}
@@ -2284,5 +2253,17 @@
}
+#replyrow #ed_reply_toolbar input {
+ margin: 1px 2px 1px 1px;
+ min-width: 24px;
+ padding: 3px 4px;
+ font-size: 11px;
+ -moz-border-radius: 3px;
+ -khtml-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ border-radius: 3px;
+}
+
/* show/hide settings */
+
#screen-meta {
position: relative;
Index: tags/2.7/wp-config-sample.php
===================================================================
--- tags/2.7.1/wp-config-sample.php (revision 10539)
+++ tags/2.7/wp-config-sample.php (revision 10539)
@@ -38,5 +38,5 @@
*
* Change these to different unique phrases!
- * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/ WordPress.org secret-key service}
+ * You can generate these using the {@link http://api.wordpress.org/secret-key/1.1/ WordPress.org secret-key service}
*
* @since 2.6.0
Index: tags/2.7/wp-includes/bookmark-template.php
===================================================================
--- tags/2.7.1/wp-includes/bookmark-template.php (revision 10539)
+++ tags/2.7/wp-includes/bookmark-template.php (revision 10539)
@@ -27,5 +27,5 @@
* 'show_images' - Default is 1 (integer). Whether to show link image if
* available.
- * 'show_name' - Default is 0 (integer). Whether to show link name if
+ * 'show_name' - Default is 1 (integer). Whether to show link name if
* available.
* 'before' - Default is '
' (string). The html or text to prepend to each
Index: tags/2.7/wp-includes/canonical.php
===================================================================
--- tags/2.7.1/wp-includes/canonical.php (revision 10539)
+++ tags/2.7/wp-includes/canonical.php (revision 10539)
@@ -120,5 +120,5 @@
if ( $redirect_url = get_year_link(get_query_var('year')) )
$redirect['query'] = remove_query_arg('year', $redirect['query']);
- } elseif ( is_category() && !empty($_GET['cat']) && preg_match( '|^[0-9]+$|', $_GET['cat'] ) ) {
+ } elseif ( is_category() && !empty($_GET['cat']) ) {
if ( $redirect_url = get_category_link(get_query_var('cat')) )
$redirect['query'] = remove_query_arg('cat', $redirect['query']);
@@ -137,5 +137,5 @@
// Strip off paging and feed
$paged_redirect['path'] = preg_replace('#/page/[0-9]+?(/+)?$#', '/', $paged_redirect['path']); // strip off any existing paging
- $paged_redirect['path'] = preg_replace('#/(comments/?)?(feed|rss2?|rdf|atom)(/+|$)#', '/', $paged_redirect['path']); // strip off feed endings
+ $paged_redirect['path'] = preg_replace('#/(comments/?)?(feed|rss2?|rdf|atom)(/+)?$#', '/', $paged_redirect['path']); // strip off feed endings
$paged_redirect['path'] = preg_replace('#/comment-page-[0-9]+?(/+)?$#', '/', $paged_redirect['path']); // strip off any existing comment paging
}
Index: tags/2.7/wp-includes/capabilities.php
===================================================================
--- tags/2.7.1/wp-includes/capabilities.php (revision 10539)
+++ tags/2.7/wp-includes/capabilities.php (revision 10539)
@@ -534,5 +534,5 @@
$this->allcaps = array();
foreach ( (array) $this->roles as $role ) {
- $role =& $wp_roles->get_role( $role );
+ $role = $wp_roles->get_role( $role );
$this->allcaps = array_merge( $this->allcaps, $role->capabilities );
}
Index: tags/2.7/wp-includes/category-template.php
===================================================================
--- tags/2.7.1/wp-includes/category-template.php (revision 10539)
+++ tags/2.7/wp-includes/category-template.php (revision 10539)
@@ -398,12 +398,10 @@
if ( $show_option_all ) {
$show_option_all = apply_filters( 'list_cats', $show_option_all );
- $selected = ( '0' === strval($r['selected']) ) ? " selected='selected'" : '';
- $output .= "\t\n";
+ $output .= "\t\n";
}
if ( $show_option_none ) {
$show_option_none = apply_filters( 'list_cats', $show_option_none );
- $selected = ( '-1' === strval($r['selected']) ) ? " selected='selected'" : '';
- $output .= "\t\n";
+ $output .= "\t\n";
}
@@ -446,5 +444,4 @@
* 'child_of' (int) default is 0 - See {@link get_categories()}.
* 'exclude' (string) - See {@link get_categories()}.
- * 'exclude_tree' (string) - See {@link get_categories()}.
* 'echo' (bool|int) default is 1 - Whether to display or retrieve content.
* 'current_category' (int) - See {@link get_categories()}.
@@ -465,5 +462,5 @@
'hide_empty' => 1, 'use_desc_for_title' => 1,
'child_of' => 0, 'feed' => '', 'feed_type' => '',
- 'feed_image' => '', 'exclude' => '', 'exclude_tree' => '', 'current_category' => 0,
+ 'feed_image' => '', 'exclude' => '', 'current_category' => 0,
'hierarchical' => true, 'title_li' => __( 'Categories' ),
'echo' => 1, 'depth' => 0
@@ -478,9 +475,4 @@
if ( isset( $r['show_date'] ) ) {
$r['include_last_update_time'] = $r['show_date'];
- }
-
- if ( true == $r['hierarchical'] ) {
- $r['exclude_tree'] = $r['exclude'];
- $r['exclude'] = '';
}
@@ -545,6 +537,7 @@
* be to return the top 45 tags in the tag cloud list.
*
- * The 'topic_count_text_callback' argument is a function, which, given the count
+* The 'topic_count_text_callback' argument is a function, which, given the count
* of the posts with that tag, returns a text for the tooltip of the tag link.
+ * @see default_topic_count_text
*
* The 'exclude' and 'include' arguments are used for the {@link get_tags()}
@@ -621,4 +614,6 @@
* The 'topic_count_text_callback' argument is a function, which given the count
* of the posts with that tag returns a text for the tooltip of the tag link.
+ * @see default_topic_count_text
+ *
*
* @todo Complete functionality.
@@ -655,5 +650,5 @@
uasort( $tags, create_function('$a, $b', 'return strnatcasecmp($a->name, $b->name);') );
else
- uasort( $tags, create_function('$a, $b', 'return ($a->count > $b->count);') );
+ uasort( $tags, create_function('$a, $b', 'return ($a->count < $b->count);') );
if ( 'DESC' == $order )
@@ -726,11 +721,6 @@
*/
function walk_category_tree() {
+ $walker = new Walker_Category;
$args = func_get_args();
- // the user's options are the third parameter
- if ( empty($args[2]['walker']) || !is_a($args[2]['walker'], 'Walker') )
- $walker = new Walker_Category;
- else
- $walker = $args[2]['walker'];
-
return call_user_func_array(array( &$walker, 'walk' ), $args );
}
@@ -744,11 +734,6 @@
*/
function walk_category_dropdown_tree() {
+ $walker = new Walker_CategoryDropdown;
$args = func_get_args();
- // the user's options are the third parameter
- if ( empty($args[2]['walker']) || !is_a($args[2]['walker'], 'Walker') )
- $walker = new Walker_CategoryDropdown;
- else
- $walker = $args[2]['walker'];
-
return call_user_func_array(array( &$walker, 'walk' ), $args );
}
Index: tags/2.7/wp-includes/class-phpmailer.php
===================================================================
--- tags/2.7.1/wp-includes/class-phpmailer.php (revision 10539)
+++ tags/2.7/wp-includes/class-phpmailer.php (revision 10539)
@@ -1410,5 +1410,5 @@
function EncodeQ ($str, $position = 'text') {
/* There should not be any EOL in the string */
- $encoded = preg_replace("/[\r\n]/", '', $str);
+ $encoded = preg_replace("[\r\n]", '', $str);
switch (strtolower($position)) {
Index: tags/2.7/wp-includes/comment-template.php
===================================================================
--- tags/2.7.1/wp-includes/comment-template.php (revision 10539)
+++ tags/2.7/wp-includes/comment-template.php (revision 10539)
@@ -834,6 +834,6 @@
$overridden_cpage = FALSE;
- if ( '' == get_query_var('cpage') && get_option('page_comments') ) {
- set_query_var( 'cpage', 'newest' == get_option('default_comments_page') ? get_comment_pages_count() : 1 );
+ if ( '' == get_query_var('cpage') && get_option('page_comments') && 'newest' == get_option('default_comments_page') ) {
+ set_query_var( 'cpage', get_comment_pages_count() );
$overridden_cpage = TRUE;
}
@@ -987,5 +987,5 @@
$link = '' . $login_text . '';
else
- $link = "";
+ $link = "comment_ID ) ) . "#" . $respond_id . "' onclick='return addComment.moveForm(\"$add_below-$comment->comment_ID\", \"$comment->comment_ID\", \"$respond_id\", \"$post->ID\")'>$reply_text";
return apply_filters('comment_reply_link', $before . $link . $after, $args, $comment, $post);
}
@@ -1038,5 +1038,5 @@
$link = '' . $login_text . '';
} else {
- $link = "";
+ $link = "$reply_text";
}
return apply_filters('post_comments_link', $before . $link . $after, $post);
Index: tags/2.7/wp-includes/comment.php
===================================================================
--- tags/2.7.1/wp-includes/comment.php (revision 10539)
+++ tags/2.7/wp-includes/comment.php (revision 10539)
@@ -46,5 +46,5 @@
return false; // If moderation is set to manual
- if ( get_option('comment_max_links') && preg_match_all("/<[Aa][^>]*[Hh][Rr][Ee][Ff]=['\"]([^\"'>]+)[^>]*>/", apply_filters('comment_text',$comment), $out) >= get_option('comment_max_links') )
+ if ( get_option('comment_max_links') && preg_match_all("|(href\t*?=\t*?['\"]?)?(https?:)?//|i", apply_filters('comment_text', $comment), $out) >= get_option('comment_max_links') )
return false; // Check # of external links
@@ -593,5 +593,5 @@
// Count comments older than this one
- $oldercoms = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(comment_ID) FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_parent = 0 AND comment_approved = '1' AND comment_date_gmt < '%s'" . $comtypewhere, $comment->comment_post_ID, $comment->comment_date_gmt ) );
+ $oldercoms = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(comment_ID) FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_parent = 0 AND comment_date_gmt < '%s'" . $comtypewhere, $comment->comment_post_ID, $comment->comment_date_gmt ) );
// No older comments? Then it's page #1.
@@ -1581,5 +1581,5 @@
*/
function _close_comments_for_old_posts( $posts ) {
- if ( empty($posts) || !is_singular() || !get_option('close_comments_for_old_posts') )
+ if ( empty($posts) || !is_single() || !get_option('close_comments_for_old_posts') )
return $posts;
Index: tags/2.7/wp-includes/compat.php
===================================================================
--- tags/2.7.1/wp-includes/compat.php (revision 10539)
+++ tags/2.7/wp-includes/compat.php (revision 10539)
@@ -97,22 +97,3 @@
}
-if ( !function_exists( 'htmlspecialchars_decode' ) ) {
- // Added in PHP 5.1.0
- // Error checks from PEAR::PHP_Compat
- function htmlspecialchars_decode( $str, $quote_style = ENT_COMPAT )
- {
- if ( !is_scalar( $string ) ) {
- trigger_error( 'htmlspecialchars_decode() expects parameter 1 to be string, ' . gettype( $string ) . ' given', E_USER_WARNING );
- return;
- }
-
- if ( !is_int( $quote_style ) && $quote_style !== null ) {
- trigger_error( 'htmlspecialchars_decode() expects parameter 2 to be integer, ' . gettype( $quote_style ) . ' given', E_USER_WARNING );
- return;
- }
-
- return wp_specialchars_decode( $str, $quote_style );
- }
-}
-
?>
Index: tags/2.7/wp-includes/cron.php
===================================================================
--- tags/2.7.1/wp-includes/cron.php (revision 10539)
+++ tags/2.7/wp-includes/cron.php (revision 10539)
@@ -17,6 +17,6 @@
*
* @param int $timestamp Timestamp for when to run the event.
- * @param string $hook Action hook to execute when cron is run.
- * @param array $args Optional. Arguments to pass to the hook's callback function.
+ * @param callback $hook Function or method to call, when cron is run.
+ * @param array $args Optional. Arguments to pass to the hook function.
*/
function wp_schedule_single_event( $timestamp, $hook, $args = array()) {
@@ -44,6 +44,6 @@
* @param int $timestamp Timestamp for when to run the event.
* @param string $recurrence How often the event should recur.
- * @param string $hook Action hook to execute when cron is run.
- * @param array $args Optional. Arguments to pass to the hook's callback function.
+ * @param callback $hook Function or method to call, when cron is run.
+ * @param array $args Optional. Arguments to pass to the hook function.
* @return bool|null False on failure, null when complete with scheduling event.
*/
@@ -66,6 +66,6 @@
* @param int $timestamp Timestamp for when to run the event.
* @param string $recurrence How often the event should recur.
- * @param string $hook Action hook to execute when cron is run.
- * @param array $args Optional. Arguments to pass to the hook's callback function.
+ * @param callback $hook Function or method to call, when cron is run.
+ * @param array $args Optional. Arguments to pass to the hook function.
* @return bool|null False on failure. Null when event is rescheduled.
*/
@@ -101,9 +101,6 @@
*
* @param int $timestamp Timestamp for when to run the event.
- * @param string $hook Action hook, the execution of which will be unscheduled.
- * @param array $args Arguments to pass to the hook's callback function.
- * Although not passed to a callback function, these arguments are used
- * to uniquely identify the scheduled event, so they should be the same
- * as those used when originally scheduling the event.
+ * @param callback $hook Function or method to call, when cron is run.
+ * @param array $args Optional. Arguments to pass to the hook function.
*/
function wp_unschedule_event( $timestamp, $hook, $args = array() ) {
@@ -123,5 +120,5 @@
* @since 2.1.0
*
- * @param string $hook Action hook, the execution of which will be unscheduled.
+ * @param callback $hook Function or method to call, when cron is run.
* @param mixed $args,... Optional. Event arguments.
*/
@@ -138,6 +135,6 @@
* @since 2.1.0
*
- * @param string $hook Action hook to execute when cron is run.
- * @param array $args Optional. Arguments to pass to the hook's callback function.
+ * @param callback $hook Function or method to call, when cron is run.
+ * @param array $args Optional. Arguments to pass to the hook function.
* @return bool|int The UNIX timestamp of the next time the scheduled event will occur.
*/
@@ -284,6 +281,6 @@
* @since 2.1.0
*
- * @param string $hook Action hook to execute when cron is run.
- * @param array $args Optional. Arguments to pass to the hook's callback function.
+ * @param callback $hook Function or method to call, when cron is run.
+ * @param array $args Optional. Arguments to pass to the hook function.
* @return string|bool False, if no schedule. Schedule on success.
*/
Index: tags/2.7/wp-includes/feed-atom-comments.php
===================================================================
--- tags/2.7.1/wp-includes/feed-atom-comments.php (revision 10539)
+++ tags/2.7/wp-includes/feed-atom-comments.php (revision 10539)
@@ -12,5 +12,4 @@
xmlns="http://www.w3.org/2005/Atom"
xml:lang=""
- xmlns:thr="http://purl.org/syndication/thread/1.0"
>
@@ -65,5 +64,5 @@
-
+
@@ -80,5 +79,5 @@
// The rel attribute below and the id tag above should be GUIDs, but WP doesn't create them for comments (unlike posts). Either way, its more important that they both use the same system
?>
-
+
comment_ID, $comment_post->ID);
Index: tags/2.7/wp-includes/feed.php
===================================================================
--- tags/2.7.1/wp-includes/feed.php (revision 10539)
+++ tags/2.7/wp-includes/feed.php (revision 10539)
@@ -224,9 +224,7 @@
* @subpackage Feed
* @since unknown
- *
- * @param int|object $comment_id Optional comment object or id. Defaults to global comment object.
- */
-function comment_guid($comment_id = null) {
- echo get_comment_guid($comment_id);
+ */
+function comment_guid() {
+ echo get_comment_guid();
}
@@ -238,9 +236,8 @@
* @since unknown
*
- * @param int|object $comment_id Optional comment object or id. Defaults to global comment object.
* @return bool|string false on failure or guid for comment on success.
*/
-function get_comment_guid($comment_id = null) {
- $comment = get_comment($comment_id);
+function get_comment_guid() {
+ global $comment;
if ( !is_object($comment) )
@@ -256,5 +253,5 @@
*/
function comment_link() {
- echo clean_url( get_comment_link() );
+ echo get_comment_link();
}
Index: tags/2.7/wp-includes/formatting.php
===================================================================
--- tags/2.7.1/wp-includes/formatting.php (revision 10539)
+++ tags/2.7/wp-includes/formatting.php (revision 10539)
@@ -187,190 +187,32 @@
* Converts a number of special characters into their HTML entities.
*
- * Specifically deals with: &, <, >, ", and '.
- *
- * $quote_style can be set to ENT_COMPAT to encode " to
- * ", or ENT_QUOTES to do both. Default is ENT_NOQUOTES where no quotes are encoded.
+ * Differs from htmlspecialchars as existing HTML entities will not be encoded.
+ * Specifically changes: & to &, < to < and > to >.
+ *
+ * $quotes can be set to 'single' to encode ' to ', 'double' to encode " to
+ * ", or '1' to do both. Default is 0 where no quotes are encoded.
*
* @since 1.2.2
*
- * @param string $string The text which is to be encoded.
- * @param mixed $quote_style Optional. Converts double quotes if set to ENT_COMPAT, both single and double if set to ENT_QUOTES or none if set to ENT_NOQUOTES. Also compatible with old values; converting single quotes if set to 'single', double if set to 'double' or both if otherwise set. Default is ENT_NOQUOTES.
- * @param string $charset Optional. The character encoding of the string. Default is false.
- * @param boolean $double_encode Optional. Whether or not to encode existing html entities. Default is false.
+ * @param string $text The text which is to be encoded.
+ * @param mixed $quotes Optional. Converts single quotes if set to 'single', double if set to 'double' or both if otherwise set. Default 0.
* @return string The encoded text with HTML entities.
*/
-function wp_specialchars( $string, $quote_style = ENT_NOQUOTES, $charset = false, $double_encode = false )
-{
- $string = (string) $string;
-
- if ( 0 === strlen( $string ) ) {
- return '';
- }
-
- // Don't bother if there are no specialchars - saves some processing
- if ( !preg_match( '/[&<>"\']/', $string ) ) {
- return $string;
- }
-
- // Account for the previous behaviour of the function when the $quote_style is not an accepted value
- if ( empty( $quote_style ) ) {
- $quote_style = ENT_NOQUOTES;
- } elseif ( !in_array( $quote_style, array( 0, 2, 3, 'single', 'double' ), true ) ) {
- $quote_style = ENT_QUOTES;
- }
-
- // Store the site charset as a static to avoid multiple calls to wp_load_alloptions()
- if ( !$charset ) {
- static $_charset;
- if ( !isset( $_charset ) ) {
- $alloptions = wp_load_alloptions();
- $_charset = isset( $alloptions['blog_charset'] ) ? $alloptions['blog_charset'] : '';
- }
- $charset = $_charset;
- }
- if ( in_array( $charset, array( 'utf8', 'utf-8', 'UTF8' ) ) ) {
- $charset = 'UTF-8';
- }
-
- $_quote_style = $quote_style;
-
- if ( $quote_style === 'double' ) {
- $quote_style = ENT_COMPAT;
- $_quote_style = ENT_COMPAT;
- } elseif ( $quote_style === 'single' ) {
- $quote_style = ENT_NOQUOTES;
- }
-
- // Handle double encoding ourselves
- if ( !$double_encode ) {
- $string = wp_specialchars_decode( $string, $_quote_style );
- $string = preg_replace( '/&(#?x?[0-9]+|[a-z]+);/i', '|wp_entity|$1|/wp_entity|', $string );
- }
-
- $string = @htmlspecialchars( $string, $quote_style, $charset );
-
- // Handle double encoding ourselves
- if ( !$double_encode ) {
- $string = str_replace( array( '|wp_entity|', '|/wp_entity|' ), array( '&', ';' ), $string );
- }
-
- // Backwards compatibility
- if ( 'single' === $_quote_style ) {
- $string = str_replace( "'", ''', $string );
- }
-
- return $string;
-}
-
-/**
- * Converts a number of HTML entities into their special characters.
- *
- * Specifically deals with: &, <, >, ", and '.
- *
- * $quote_style can be set to ENT_COMPAT to decode " entities,
- * or ENT_QUOTES to do both " and '. Default is ENT_NOQUOTES where no quotes are decoded.
- *
- * @since 2.8
- *
- * @param string $string The text which is to be decoded.
- * @param mixed $quote_style Optional. Converts double quotes if set to ENT_COMPAT, both single and double if set to ENT_QUOTES or none if set to ENT_NOQUOTES. Also compatible with old wp_specialchars() values; converting single quotes if set to 'single', double if set to 'double' or both if otherwise set. Default is ENT_NOQUOTES.
- * @return string The decoded text without HTML entities.
- */
-function wp_specialchars_decode( $string, $quote_style = ENT_NOQUOTES )
-{
- $string = (string) $string;
-
- if ( 0 === strlen( $string ) ) {
- return '';
- }
-
- // Don't bother if there are no entities - saves a lot of processing
- if ( strpos( $string, '&' ) === false ) {
- return $string;
- }
-
- // Match the previous behaviour of wp_specialchars() when the $quote_style is not an accepted value
- if ( empty( $quote_style ) ) {
- $quote_style = ENT_NOQUOTES;
- } elseif ( !in_array( $quote_style, array( 0, 2, 3, 'single', 'double' ), true ) ) {
- $quote_style = ENT_QUOTES;
- }
-
- // More complete than get_html_translation_table( HTML_SPECIALCHARS )
- $single = array( ''' => '\'', ''' => '\'' );
- $single_preg = array( '/*39;/' => ''', '/*27;/i' => ''' );
- $double = array( '"' => '"', '"' => '"', '"' => '"' );
- $double_preg = array( '/*34;/' => '"', '/*22;/i' => '"' );
- $others = array( '<' => '<', '<' => '<', '>' => '>', '>' => '>', '&' => '&', '&' => '&', '&' => '&' );
- $others_preg = array( '/*60;/' => '<', '/*62;/' => '>', '/*38;/' => '&', '/*26;/i' => '&' );
-
- if ( $quote_style === ENT_QUOTES ) {
- $translation = array_merge( $single, $double, $others );
- $translation_preg = array_merge( $single_preg, $double_preg, $others_preg );
- } elseif ( $quote_style === ENT_COMPAT || $quote_style === 'double' ) {
- $translation = array_merge( $double, $others );
- $translation_preg = array_merge( $double_preg, $others_preg );
- } elseif ( $quote_style === 'single' ) {
- $translation = array_merge( $single, $others );
- $translation_preg = array_merge( $single_preg, $others_preg );
- } elseif ( $quote_style === ENT_NOQUOTES ) {
- $translation = $others;
- $translation_preg = $others_preg;
- }
-
- // Remove zero padding on numeric entities
- $string = preg_replace( array_keys( $translation_preg ), array_values( $translation_preg ), $string );
-
- // Replace characters according to translation table
- return strtr( $string, $translation );
-}
-
-/**
- * Checks for invalid UTF8 in a string.
- *
- * @since 2.8
- *
- * @param string $string The text which is to be checked.
- * @param boolean $strip Optional. Whether to attempt to strip out invalid UTF8. Default is false.
- * @return string The checked text.
- */
-function wp_check_invalid_utf8( $string, $strip = false )
-{
- $string = (string) $string;
-
- if ( 0 === strlen( $string ) ) {
- return '';
- }
-
- // Store the site charset as a static to avoid multiple calls to get_option()
- static $is_utf8;
- if ( !isset( $is_utf8 ) ) {
- $is_utf8 = in_array( get_option( 'blog_charset' ), array( 'utf8', 'utf-8', 'UTF8', 'UTF-8' ) );
- }
- if ( !$is_utf8 ) {
- return $string;
- }
-
- // Check for support for utf8 in the installed PCRE library once and store the result in a static
- static $utf8_pcre;
- if ( !isset( $utf8_pcre ) ) {
- $utf8_pcre = @preg_match( '/^./u', 'a' );
- }
- // We can't demand utf8 in the PCRE installation, so just return the string in those cases
- if ( !$utf8_pcre ) {
- return $string;
- }
-
- // preg_match fails when it encounters invalid UTF8 in $string
- if ( 1 === @preg_match( '/^./us', $string ) ) {
- return $string;
- }
-
- // Attempt to strip the bad chars if requested (not recommended)
- if ( $strip && function_exists( 'iconv' ) ) {
- return iconv( 'utf-8', 'utf-8', $string );
- }
-
- return '';
+function wp_specialchars( $text, $quotes = 0 ) {
+ // Like htmlspecialchars except don't double-encode HTML entities
+ $text = str_replace('&&', '&&', $text);
+ $text = str_replace('&&', '&&', $text);
+ $text = preg_replace('/&(?:$|([^#])(?![a-z1-4]{1,8};))/', '&$1', $text);
+ $text = str_replace('<', '<', $text);
+ $text = str_replace('>', '>', $text);
+ if ( 'double' === $quotes ) {
+ $text = str_replace('"', '"', $text);
+ } elseif ( 'single' === $quotes ) {
+ $text = str_replace("'", ''', $text);
+ } elseif ( $quotes ) {
+ $text = str_replace('"', '"', $text);
+ $text = str_replace("'", ''', $text);
+ }
+ return $text;
}
@@ -1306,5 +1148,6 @@
} else {
$subject = str_replace('_', ' ', $matches[2]);
- $subject = preg_replace_callback('#\=([0-9a-f]{2})#i', create_function('$match', 'return chr(hexdec(strtolower($match[1])));'), $subject);
+ /** @todo use preg_replace_callback() */
+ $subject = preg_replace('#\=([0-9a-f]{2})#ei', "chr(hexdec(strtolower('$1')))", $subject);
return $subject;
}
@@ -1315,9 +1158,8 @@
*
* Requires and returns a date in the Y-m-d H:i:s format. Simply subtracts the
- * value of the 'gmt_offset' option.
+ * value of gmt_offset.
*
* @since 1.2.0
*
- * @uses get_option() to retrieve the the value of 'gmt_offset'.
* @param string $string The date to be converted.
* @return string GMT version of the date provided.
@@ -1901,9 +1743,8 @@
*/
function js_escape($text) {
- $safe_text = wp_check_invalid_utf8( $text );
- $safe_text = wp_specialchars( $safe_text, ENT_COMPAT );
- $safe_text = preg_replace( '/(x)?0*(?(1)27|39);?/i', "'", stripslashes( $safe_text ) );
- $safe_text = preg_replace( "/\r?\n/", "\\n", addslashes( $safe_text ) );
- return apply_filters( 'js_escape', $safe_text, $text );
+ $safe_text = wp_specialchars($text, 'double');
+ $safe_text = preg_replace('/(x)?0*(?(1)27|39);?/i', "'", stripslashes($safe_text));
+ $safe_text = preg_replace("/\r?\n/", "\\n", addslashes($safe_text));
+ return apply_filters('js_escape', $safe_text, $text);
}
@@ -1916,8 +1757,7 @@
* @return string
*/
-function attribute_escape( $text ) {
- $safe_text = wp_check_invalid_utf8( $text );
- $safe_text = wp_specialchars( $safe_text, ENT_QUOTES );
- return apply_filters( 'attribute_escape', $safe_text, $text );
+function attribute_escape($text) {
+ $safe_text = wp_specialchars($text, true);
+ return apply_filters('attribute_escape', $safe_text, $text);
}
@@ -1931,5 +1771,5 @@
*/
function tag_escape($tag_name) {
- $safe_tag = strtolower( preg_replace('/[^a-zA-Z_:]/', '', $tag_name) );
+ $safe_tag = strtolower( preg_replace('[^a-zA-Z_:]', '', $tag_name) );
return apply_filters('tag_escape', $safe_tag, $tag_name);
}
Index: tags/2.7/wp-includes/functions.php
===================================================================
--- tags/2.7.1/wp-includes/functions.php (revision 10539)
+++ tags/2.7/wp-includes/functions.php (revision 10539)
@@ -80,11 +80,11 @@
* The 'timestamp' type will return the current timestamp.
*
- * If $gmt is set to either '1' or 'true', then both types will use GMT time.
- * if $gmt is false, the output is adjusted with the GMT offset in the WordPress option.
+ * If the $gmt is set to either '1' or 'true', then both types will use the
+ * GMT offset in the WordPress option to add the GMT offset to the time.
*
* @since 1.0.0
*
* @param string $type Either 'mysql' or 'timestamp'.
- * @param int|bool $gmt Optional. Whether to use GMT timezone. Default is false.
+ * @param int|bool $gmt Optional. Whether to use $gmt offset. Default is false.
* @return int|string String if $type is 'gmt', int if $type is 'timestamp'.
*/
@@ -2805,13 +2805,5 @@
*/
function is_ssl() {
- if ( isset($_SERVER['HTTPS']) ) {
- if ( 'on' == strtolower($_SERVER['HTTPS']) )
- return true;
- if ( '1' == $_SERVER['HTTPS'] )
- return true;
- } elseif ( isset($_SERVER['SERVER_PORT']) && ( '443' == $_SERVER['SERVER_PORT'] ) ) {
- return true;
- }
- return false;
+ return ( isset($_SERVER['HTTPS']) && 'on' == strtolower($_SERVER['HTTPS']) ) ? true : false;
}
@@ -2906,10 +2898,6 @@
* @return object The cloned object
*/
-function wp_clone( $object ) {
- static $can_clone;
- if ( !isset( $can_clone ) ) {
- $can_clone = version_compare( phpversion(), '5.0', '>=' );
- }
- return $can_clone ? clone( $object ) : $object;
+function wp_clone($object) {
+ return version_compare(phpversion(), '5.0') < 0 ? $object : clone($object);
}
Index: tags/2.7/wp-includes/general-template.php
===================================================================
--- tags/2.7.1/wp-includes/general-template.php (revision 10539)
+++ tags/2.7/wp-includes/general-template.php (revision 10539)
@@ -1593,5 +1593,5 @@
if ( $lang = get_bloginfo('language') ) {
- if ( get_option('html_type') == 'text/html' || $doctype == 'html' )
+ if ( get_option('html_type') == 'text/html' || $doctype == 'xhtml' )
$attributes[] = "lang=\"$lang\"";
Index: tags/2.7/wp-includes/http.php
===================================================================
--- tags/2.7.1/wp-includes/http.php (revision 10539)
+++ tags/2.7/wp-includes/http.php (revision 10539)
@@ -243,7 +243,4 @@
if ( is_null($r['body']) ) {
- // Some servers fail when sending content without the content-length
- // header being set.
- $r['headers']['Content-Length'] = 0;
$transports = WP_Http::_getTransport($r);
} else {
@@ -394,5 +391,5 @@
*
* @param string $body Body content
- * @return string Chunked decoded body on success or raw body on failure.
+ * @return bool|string|WP_Error False if not chunked encoded. WP_Error on failure. Chunked decoded body on success.
*/
function chunkTransferDecode($body) {
@@ -405,10 +402,13 @@
//$parsedHeaders = array(); Unsupported
- while ( true ) {
+ $done = false;
+
+ do {
$hasChunk = (bool) preg_match( '/^([0-9a-f]+)(\s|\n)+/mi', $body, $match );
if ( $hasChunk ) {
- if ( empty($match[1]) )
- return $body;
+ if ( empty($match[1]) ) {
+ return new WP_Error('http_chunked_decode', __('Does not appear to be chunked encoded or body is malformed.') );
+ }
$length = hexdec( $match[1] );
@@ -420,10 +420,13 @@
$body = ltrim(str_replace(array($match[0], $strBody), '', $body), "\n");
- if( "0" == trim($body) )
+ if( "0" == trim($body) ) {
+ $done = true;
return $parsedBody; // Ignore footer headers.
+ break;
+ }
} else {
- return $body;
+ return new WP_Error('http_chunked_decode', __('Does not appear to be chunked encoded or body is malformed.') );
}
- }
+ } while ( false === $done );
}
}
@@ -642,5 +645,5 @@
return new WP_Error('http_request_failed', sprintf(__('Malformed URL: %s'), $url));
- if ( 'http' != $arrURL['scheme'] && 'https' != $arrURL['scheme'] )
+ if ( 'http' != $arrURL['scheme'] || 'https' != $arrURL['scheme'] )
$url = str_replace($arrURL['scheme'], 'http', $url);
@@ -748,5 +751,5 @@
return new WP_Error('http_request_failed', sprintf(__('Malformed URL: %s'), $url));
- if ( 'http' != $arrURL['scheme'] && 'https' != $arrURL['scheme'] )
+ if ( 'http' != $arrURL['scheme'] || 'https' != $arrURL['scheme'] )
$url = str_replace($arrURL['scheme'], 'http', $url);
@@ -775,5 +778,5 @@
$context = stream_context_create($arrContext);
- if ( ! defined('WP_DEBUG') || ( defined('WP_DEBUG') && false === WP_DEBUG ) )
+ if ( !defined('WP_DEBUG') || ( defined('WP_DEBUG') && false === WP_DEBUG ) )
$handle = @fopen($url, 'r', false, $context);
else
@@ -980,6 +983,5 @@
}
- // cURL extension will sometimes fail when the timeout is less than 1 as
- // it may round down to 0, which gives it unlimited timeout.
+ // If timeout is a float less than 1, round it up to 1.
if ( $r['timeout'] > 0 && $r['timeout'] < 1 )
$r['timeout'] = 1;
@@ -988,6 +990,4 @@
curl_setopt( $handle, CURLOPT_URL, $url);
- // The cURL extension requires that the option be set for the HEAD to
- // work properly.
if ( 'HEAD' === $r['method'] ) {
curl_setopt( $handle, CURLOPT_NOBODY, true );
@@ -1008,5 +1008,4 @@
curl_setopt( $handle, CURLOPT_MAXREDIRS, $r['redirection'] );
- // The option doesn't work with safe mode or when open_basedir is set.
if ( !ini_get('safe_mode') && !ini_get('open_basedir') )
curl_setopt( $handle, CURLOPT_FOLLOWLOCATION, true );
@@ -1064,5 +1063,5 @@
*/
function test() {
- if ( function_exists('curl_init') && function_exists('curl_exec') )
+ if ( function_exists('curl_init') )
return true;
Index: tags/2.7/wp-includes/js/autosave.js
===================================================================
--- tags/2.7.1/wp-includes/js/autosave.js (revision 10539)
+++ tags/2.7/wp-includes/js/autosave.js (revision 10539)
@@ -115,9 +115,9 @@
function autosave_enable_buttons() {
- jQuery(".submitbox :button:disabled, .submitbox :submit:disabled").attr('disabled', '');
+ jQuery("#submitpost :button:disabled, #submitpost :submit:disabled").attr('disabled', '');
}
function autosave_disable_buttons() {
- jQuery(".submitbox :button:enabled, .submitbox :submit:enabled").attr('disabled', 'disabled');
+ jQuery("#submitpost :button:enabled, #submitpost :submit:enabled").attr('disabled', 'disabled');
setTimeout(autosave_enable_buttons, 5000); // Re-enable 5 sec later. Just gives autosave a head start to avoid collisions.
}
Index: tags/2.7/wp-includes/js/thickbox/thickbox.css
===================================================================
--- tags/2.7.1/wp-includes/js/thickbox/thickbox.css (revision 10539)
+++ tags/2.7/wp-includes/js/thickbox/thickbox.css (revision 10539)
@@ -34,5 +34,4 @@
.TB_overlayBG {
background-color:#000;
- -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=75)";
filter:alpha(opacity=75);
-moz-opacity: 0.75;
Index: tags/2.7/wp-includes/js/thickbox/thickbox.js
===================================================================
--- tags/2.7.1/wp-includes/js/thickbox/thickbox.js (revision 10539)
+++ tags/2.7/wp-includes/js/thickbox/thickbox.js (revision 10539)
@@ -282,7 +282,6 @@
function tb_position() {
-var isIE6 = typeof document.body.style.maxHeight === "undefined";
jQuery("#TB_window").css({marginLeft: '-' + parseInt((TB_WIDTH / 2),10) + 'px', width: TB_WIDTH + 'px'});
- if ( ! isIE6 ) { // take away IE6
+ if ( !(jQuery.browser.msie && jQuery.browser.version < 7)) { // take away IE6
jQuery("#TB_window").css({marginTop: '-' + parseInt((TB_HEIGHT / 2),10) + 'px'});
}
Index: tags/2.7/wp-includes/js/wp-ajax-response.js
===================================================================
--- tags/2.7.1/wp-includes/js/wp-ajax-response.js (revision 10539)
+++ tags/2.7/wp-includes/js/wp-ajax-response.js (revision 10539)
@@ -1,3 +1,3 @@
-var wpAjax = jQuery.extend( {
+wpAjax = jQuery.extend( {
unserialize: function( s ) {
var r = {}; if ( !s ) { return r; }
Index: tags/2.7/wp-includes/kses.php
===================================================================
--- tags/2.7.1/wp-includes/kses.php (revision 10539)
+++ tags/2.7/wp-includes/kses.php (revision 10539)
@@ -395,9 +395,6 @@
*/
function wp_kses_split($string, $allowed_html, $allowed_protocols) {
- global $pass_allowed_html, $pass_allowed_protocols;
- $pass_allowed_html = $allowed_html;
- $pass_allowed_protocols = $allowed_protocols;
- return preg_replace_callback('%((|$))|(<[^>]*(>|$)|>))%',
- create_function('$match', 'global $pass_allowed_html, $pass_allowed_protocols; return wp_kses_split2($match[1], $pass_allowed_html, $pass_allowed_protocols);'), $string);
+ return preg_replace('%((|$))|(<[^>]*(>|$)|>))%e',
+ "wp_kses_split2('\\1', \$allowed_html, ".'$allowed_protocols)', $string);
}
@@ -1003,6 +1000,6 @@
*/
function wp_kses_decode_entities($string) {
- $string = preg_replace_callback('/([0-9]+);/', create_function('$match', 'return chr($match[1]);'), $string);
- $string = preg_replace_callback('/[Xx]([0-9A-Fa-f]+);/', create_function('$match', 'return chr(hexdec($match[1]));'), $string);
+ $string = preg_replace('/([0-9]+);/e', 'chr("\\1")', $string);
+ $string = preg_replace('/[Xx]([0-9A-Fa-f]+);/e', 'chr(hexdec("\\1"))', $string);
return $string;
Index: tags/2.7/wp-includes/link-template.php
===================================================================
--- tags/2.7.1/wp-includes/link-template.php (revision 10539)
+++ tags/2.7/wp-includes/link-template.php (revision 10539)
@@ -93,8 +93,5 @@
);
- if ( is_object($id) && isset($id->filter) && 'sample' == $id->filter )
- $post = $id;
- else
- $post = &get_post($id);
+ $post = &get_post($id);
if ( empty($post->ID) ) return false;
@@ -726,5 +723,5 @@
}
- $link = '' . $link . '';
+ $link = '' . $link . '';
echo $before . apply_filters( 'edit_post_link', $link, $post->ID ) . $after;
}
@@ -776,5 +773,5 @@
}
- $link = '';
+ $link = '' . $link . '';
echo $before . apply_filters( 'edit_comment_link', $link, $comment->comment_ID ) . $after;
}
@@ -1246,13 +1243,12 @@
/**
- * Return the link to next comments pages.
- *
- * @since 2.7.1
+ * Display link to next comments pages.
+ *
+ * @since 2.7.0
*
* @param string $label Optional. Label for link text.
* @param int $max_page Optional. Max page.
- * @return string|null
- */
-function get_next_comments_link( $label = '', $max_page = 0 ) {
+ */
+function next_comments_link($label='', $max_page = 0) {
global $wp_query;
@@ -1262,4 +1258,7 @@
$page = get_query_var('cpage');
+ if ( !$page )
+ $page = 1;
+
$nextpage = intval($page) + 1;
@@ -1276,28 +1275,18 @@
$label = __('Newer Comments »');
- return ''. preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', $label) .'';
-}
-
-/**
- * Display the link to next comments pages.
+ echo '". preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', $label) .'';
+}
+
+/**
+ * Display the previous comments page link.
*
* @since 2.7.0
*
- * @param string $label Optional. Label for link text.
- * @param int $max_page Optional. Max page.
- */
-function next_comments_link( $label = '', $max_page = 0 ) {
- echo get_next_comments_link( $label, $max_page );
-}
-
-/**
- * Return the previous comments page link.
- *
- * @since 2.7.1
- *
* @param string $label Optional. Label for comments link text.
- * @return string|null
- */
-function get_previous_comments_link( $label = '' ) {
+ */
+function previous_comments_link($label='') {
+
if ( !is_singular() )
return;
@@ -1305,5 +1294,8 @@
$page = get_query_var('cpage');
- if ( intval($page) <= 1 )
+ if ( !$page )
+ $page = 1;
+
+ if ( $page <= 1 )
return;
@@ -1313,16 +1305,7 @@
$label = __('« Older Comments');
- return '' . preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', $label) .'';
-}
-
-/**
- * Display the previous comments page link.
- *
- * @since 2.7.0
- *
- * @param string $label Optional. Label for comments link text.
- */
-function previous_comments_link( $label = '' ) {
- echo get_previous_comments_link( $label );
+ echo '". preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', $label) .'';
}
@@ -1355,5 +1338,5 @@
);
if ( $wp_rewrite->using_permalinks() )
- $defaults['base'] = user_trailingslashit(trailingslashit(get_permalink()) . 'comment-page-%#%', 'commentpaged');
+ $defaults['base'] = user_trailingslashit(get_permalink() . 'comment-page-%#%', 'commentpaged');
$args = wp_parse_args( $args, $defaults );
Index: tags/2.7/wp-includes/pluggable.php
===================================================================
--- tags/2.7.1/wp-includes/pluggable.php (revision 10539)
+++ tags/2.7/wp-includes/pluggable.php (revision 10539)
@@ -1211,5 +1211,5 @@
* You must not copy the below example and paste into your wp-config.php. If you
* need an example, then you can have a
- * {@link https://api.wordpress.org/secret-key/1.1/ secret key created} for you.
+ * {@link http://api.wordpress.org/secret-key/1.0/ secret key created} for you.
*
*
@@ -1222,5 +1222,5 @@
*
* @since 2.5
- * @link https://api.wordpress.org/secret-key/1.1/ Create a Secret Key for wp-config.php
+ * @link http://api.wordpress.org/secret-key/1.0/ Create a Secret Key for wp-config.php
*
* @return string Salt value from either 'SECRET_KEY' or 'secret' option
@@ -1395,6 +1395,4 @@
* @since 2.5
*
- * @param int $length The length of password to generate
- * @param bool $special_chars Whether to include standard special characters
* @return string The random password
**/
@@ -1530,11 +1528,6 @@
}
- if ( is_ssl() )
- $host = 'https://secure.gravatar.com';
- else
- $host = 'http://www.gravatar.com';
-
if ( 'mystery' == $default )
- $default = "$host/avatar/ad516503a11cd5ca435acc9bb6523536?s={$size}"; // ad516503a11cd5ca435acc9bb6523536 == md5('unknown@gravatar.com')
+ $default = "http://www.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s={$size}"; // ad516503a11cd5ca435acc9bb6523536 == md5('unknown@gravatar.com')
elseif ( 'blank' == $default )
$default = includes_url('images/blank.gif');
@@ -1542,12 +1535,12 @@
$default = '';
elseif ( 'gravatar_default' == $default )
- $default = "$host/avatar/s={$size}";
+ $default = "http://www.gravatar.com/avatar/s={$size}";
elseif ( empty($email) )
- $default = "$host/avatar/?d=$default&s={$size}";
+ $default = "http://www.gravatar.com/avatar/?d=$default&s={$size}";
elseif ( strpos($default, 'http://') === 0 )
$default = add_query_arg( 's', $size, $default );
if ( !empty($email) ) {
- $out = "$host/avatar/";
+ $out = 'http://www.gravatar.com/avatar/';
$out .= md5( strtolower( $email ) );
$out .= '?s='.$size;
Index: tags/2.7/wp-includes/post-template.php
===================================================================
--- tags/2.7.1/wp-includes/post-template.php (revision 10539)
+++ tags/2.7/wp-includes/post-template.php (revision 10539)
@@ -224,5 +224,5 @@
}
if ( $preview ) // preview fix for javascript bug with foreign languages
- $output = preg_replace_callback('/\%u([0-9A-F]{4})/', create_function('$match', 'return "" . base_convert($match[1], 16, 10) . ";";'), $output);
+ $output = preg_replace('/\%u([0-9A-F]{4,4})/e', "''.base_convert('\\1',16,10).';'", $output);
return $output;
@@ -608,5 +608,5 @@
// sanitize, mostly to keep spaces out
- $r['exclude'] = preg_replace('/[^0-9,]/', '', $r['exclude']);
+ $r['exclude'] = preg_replace('[^0-9,]', '', $r['exclude']);
// Allow plugins to filter an array of excluded pages
@@ -681,5 +681,5 @@
if ( is_front_page() && !is_paged() )
$class = 'class="current_page_item"';
- $menu .= '' . $args['link_before'] . $text . $args['link_after'] . '';
+ $menu .= '' . $link_before . $text . $link_after . '';
// If the front page is a page, add it to the exclude list
if (get_option('show_on_front') == 'page') {
@@ -1049,5 +1049,5 @@
$currentf = __( '%s [Current Revision]' );
- $date = date_i18n( $datef, strtotime( $revision->post_modified ) );
+ $date = date_i18n( $datef, strtotime( $revision->post_modified_gmt . ' +0000' ) );
if ( $link && current_user_can( 'edit_post', $revision->ID ) && $link = get_edit_post_link( $revision->ID ) )
$date = "$date";
Index: tags/2.7/wp-includes/post.php
===================================================================
--- tags/2.7.1/wp-includes/post.php (revision 10539)
+++ tags/2.7/wp-includes/post.php (revision 10539)
@@ -216,11 +216,9 @@
else
return $null;
- } elseif ( is_object($post) && empty($post->filter) ) {
+ } elseif ( is_object($post) ) {
_get_post_ancestors($post);
wp_cache_add($post->ID, $post, 'posts');
$_post = &$post;
} else {
- if ( is_object($post) )
- $post = $post->ID;
$post = (int) $post;
if ( ! $_post = wp_cache_get($post, 'posts') ) {
@@ -742,5 +740,5 @@
$custom = get_post_custom($post_id);
- return isset($custom[$key]) ? $custom[$key] : null;
+ return $custom[$key];
}
@@ -795,5 +793,4 @@
foreach ( array_keys(get_object_vars($post)) as $field )
$post->$field = sanitize_post_field($field, $post->$field, $post->ID, $context);
- $post->filter = $context;
} else {
if ( !isset($post['ID']) )
@@ -801,7 +798,5 @@
foreach ( array_keys($post) as $field )
$post[$field] = sanitize_post_field($field, $post[$field], $post['ID'], $context);
- $post['filter'] = $context;
- }
-
+ }
return $post;
}
@@ -2541,8 +2536,4 @@
if ( 0 === strpos($file, $uploads['basedir']) ) //Check that the upload base exists in the file location
$url = str_replace($uploads['basedir'], $uploads['baseurl'], $file); //replace file location with url location
- elseif ( false !== strpos($file, 'wp-content/uploads') )
- $url = $uploads['baseurl'] . substr( $file, strpos($file, 'wp-content/uploads') + 18 );
- else
- $url = $uploads['baseurl'] . "/$file"; //Its a newly uploaded file, therefor $file is relative to the basedir.
}
}
Index: tags/2.7/wp-includes/script-loader.php
===================================================================
--- tags/2.7.1/wp-includes/script-loader.php (revision 10539)
+++ tags/2.7/wp-includes/script-loader.php (revision 10539)
@@ -104,5 +104,5 @@
$scripts->add( 'jquery-hotkeys', '/wp-includes/js/jquery/jquery.hotkeys.js', array('jquery'), '0.0.2' );
$scripts->add( 'jquery-table-hotkeys', '/wp-includes/js/jquery/jquery.table-hotkeys.js', array('jquery', 'jquery-hotkeys'), '20081128' );
- $scripts->add( 'thickbox', '/wp-includes/js/thickbox/thickbox.js', array('jquery'), '3.1-20090123');
+ $scripts->add( 'thickbox', '/wp-includes/js/thickbox/thickbox.js', array('jquery'), '3.1-20080430');
$scripts->add( 'swfupload', '/wp-includes/js/swfupload/swfupload.js', false, '2.2.0-20081031');
$scripts->add( 'swfupload-degrade', '/wp-includes/js/swfupload/plugins/swfupload.graceful_degradation.js', array('swfupload'), '2.2.0-20081031');
Index: tags/2.7/wp-includes/taxonomy.php
===================================================================
--- tags/2.7.1/wp-includes/taxonomy.php (revision 10539)
+++ tags/2.7/wp-includes/taxonomy.php (revision 10539)
@@ -535,8 +535,4 @@
* 'exclude' is ignored.
*
- * exclude_tree - A comma- or space-delimited string of term ids to exclude
- * from the return array, along with all of their descendant terms according to
- * the primary taxonomy. If 'include' is non-empty, 'exclude_tree' is ignored.
- *
* include - Default is an empty string. A comma- or space-delimited string
* of term ids to include in the return array.
@@ -609,5 +605,5 @@
$defaults = array('orderby' => 'name', 'order' => 'ASC',
- 'hide_empty' => true, 'exclude' => '', 'exclude_tree' => '', 'include' => '',
+ 'hide_empty' => true, 'exclude' => '', 'include' => '',
'number' => '', 'fields' => 'all', 'slug' => '', 'parent' => '',
'hierarchical' => true, 'child_of' => 0, 'get' => '', 'name__like' => '',
@@ -673,5 +669,4 @@
if ( !empty($include) ) {
$exclude = '';
- $exclude_tree = '';
$interms = preg_split('/[\s,]+/',$include);
if ( count($interms) ) {
@@ -690,23 +685,9 @@
$exclusions = '';
- if ( ! empty( $exclude_tree ) ) {
- $excluded_trunks = preg_split('/[\s,]+/',$exclude_tree);
- foreach( (array) $excluded_trunks as $extrunk ) {
- $excluded_children = (array) get_terms($taxonomies[0], array('child_of' => intval($extrunk), 'fields' => 'ids'));
- $excluded_children[] = $extrunk;
- foreach( (array) $excluded_children as $exterm ) {
- if ( empty($exclusions) )
- $exclusions = ' AND ( t.term_id <> ' . intval($exterm) . ' ';
- else
- $exclusions .= ' AND t.term_id <> ' . intval($exterm) . ' ';
-
- }
- }
- }
if ( !empty($exclude) ) {
$exterms = preg_split('/[\s,]+/',$exclude);
if ( count($exterms) ) {
foreach ( (array) $exterms as $exterm ) {
- if ( empty($exclusions) )
+ if (empty($exclusions))
$exclusions = ' AND ( t.term_id <> ' . intval($exterm) . ' ';
else
@@ -737,13 +718,12 @@
$where .= ' AND tt.count > 0';
- // don't limit the query results when we have to descend the family tree
- if ( ! empty($number) && ! $hierarchical && empty( $child_of ) && '' == $parent ) {
+ if ( !empty($number) ) {
if( $offset )
- $limit = 'LIMIT ' . $offset . ',' . $number;
+ $number = 'LIMIT ' . $offset . ',' . $number;
else
- $limit = 'LIMIT ' . $number;
+ $number = 'LIMIT ' . $number;
} else
- $limit = '';
+ $number = '';
if ( !empty($search) ) {
@@ -760,9 +740,11 @@
$select_this = 't.term_id, tt.parent, tt.count, t.name';
- $query = "SELECT $select_this FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy IN ($in_taxonomies) $where ORDER BY $orderby $order $limit";
-
- $terms = $wpdb->get_results($query);
+ $query = "SELECT $select_this FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy IN ($in_taxonomies) $where ORDER BY $orderby $order $number";
+
if ( 'all' == $fields ) {
+ $terms = $wpdb->get_results($query);
update_term_cache($terms);
+ } else if ( ('ids' == $fields) || ('names' == $fields) ) {
+ $terms = $wpdb->get_results($query);
}
@@ -810,8 +792,4 @@
$_terms[] = $term->name;
$terms = $_terms;
- }
-
- if ( 0 < $number && intval(@count($terms)) > $number ) {
- $terms = array_slice($terms, $offset, $number);
}
Index: tags/2.7/wp-includes/theme.php
===================================================================
--- tags/2.7.1/wp-includes/theme.php (revision 10539)
+++ tags/2.7/wp-includes/theme.php (revision 10539)
@@ -850,5 +850,5 @@
return;
- $_GET['template'] = preg_replace('|[^a-z0-9_.-/]|i', '', $_GET['template']);
+ $_GET['template'] = preg_replace('|[^a-z0-9_.-]|i', '', $_GET['template']);
if ( validate_file($_GET['template']) )
@@ -858,5 +858,5 @@
if ( isset($_GET['stylesheet']) ) {
- $_GET['stylesheet'] = preg_replace('|[^a-z0-9_.-/]|i', '', $_GET['stylesheet']);
+ $_GET['stylesheet'] = preg_replace('|[^a-z0-9_.-]|i', '', $_GET['stylesheet']);
if ( validate_file($_GET['stylesheet']) )
return;
Index: tags/2.7/wp-includes/version.php
===================================================================
--- tags/2.7.1/wp-includes/version.php (revision 10539)
+++ tags/2.7/wp-includes/version.php (revision 10539)
@@ -9,5 +9,5 @@
* @global string $wp_version
*/
-$wp_version = '2.7.1';
+$wp_version = '2.7';
/**
Index: tags/2.7/wp-includes/widgets.php
===================================================================
--- tags/2.7.1/wp-includes/widgets.php (revision 10539)
+++ tags/2.7/wp-includes/widgets.php (revision 10539)
@@ -549,5 +549,5 @@
global $wp_registered_widgets, $wp_registered_sidebars;
- $sidebars_widgets = get_option('sidebars_widgets', array());
+ $sidebars_widgets = get_option('sidebars_widgets');
$_sidebars_widgets = array();
@@ -619,6 +619,5 @@
}
- if ( isset($sidebars_widgets['array_version']) )
- unset($sidebars_widgets['array_version']);
+ unset($sidebars_widgets['array_version']);
$sidebars_widgets = apply_filters('sidebars_widgets', $sidebars_widgets);
@@ -1400,5 +1399,5 @@
';
+ echo '';
endforeach; endif;?>
@@ -2094,5 +2093,5 @@
// This is important
-add_action( 'widgets_init', 'widget_many_register' );
+add_action( 'widgets_init', 'widget_many_register' )
*/
Index: tags/2.7/wp-settings.php
===================================================================
--- tags/2.7.1/wp-settings.php (revision 10539)
+++ tags/2.7/wp-settings.php (revision 10539)
@@ -16,6 +16,4 @@
@ini_set('memory_limit', WP_MEMORY_LIMIT);
-set_magic_quotes_runtime(0);
-@ini_set('magic_quotes_sybase', 0);
/**
@@ -202,11 +200,5 @@
error_reporting(E_ALL);
} else {
- // Unicode Extension is in PHP 6.0 only or do version check when this changes.
- if ( function_exists('unicode_decode') )
- error_reporting( E_ALL ^ E_DEPRECATED ^ E_NOTICE ^ E_USER_NOTICE ^ E_STRICT );
- else if ( defined( 'E_DEPRECATED' ) ) // Introduced in PHP 5.3
- error_reporting( E_ALL ^ E_DEPRECATED ^ E_NOTICE ^ E_USER_NOTICE );
- else
- error_reporting(E_ALL ^ E_NOTICE ^ E_USER_NOTICE);
+ error_reporting(E_ALL ^ E_NOTICE ^ E_USER_NOTICE);
}
Index: tags/2.7/xmlrpc.php
===================================================================
--- tags/2.7.1/xmlrpc.php (revision 10539)
+++ tags/2.7/xmlrpc.php (revision 10539)
@@ -1259,4 +1259,6 @@
$logged_in = true;
set_current_user( 0, $username );
+ if ( !current_user_can( 'moderate_comments' ) )
+ return new IXR_Error( 403, __( 'You are not allowed to moderate comments on this blog.' ) );
}
@@ -1284,13 +1286,10 @@
if ( isset($content_struct['author']) )
$comment['comment_author'] = $content_struct['author'];
-
$comment['comment_author_email'] = '';
- if ( isset($content_struct['author_email']) )
+ if ( isset($content_struct['author']) )
$comment['comment_author_email'] = $content_struct['author_email'];
-
$comment['comment_author_url'] = '';
- if ( isset($content_struct['author_url']) )
+ if ( isset($content_struct['author']) )
$comment['comment_author_url'] = $content_struct['author_url'];
-
$comment['user_ID'] = 0;
@@ -2763,6 +2762,5 @@
$struct['categoryId'] = $cat->term_id;
$struct['parentId'] = $cat->parent;
- $struct['description'] = $cat->name;
- $struct['categoryDescription'] = $cat->description;
+ $struct['description'] = $cat->description;
$struct['categoryName'] = $cat->name;
$struct['htmlUrl'] = wp_specialchars(get_category_link($cat->term_id));