Compare commits

...

20 Commits
3.8.1 ... 3.8.2

Author SHA1 Message Date
Andrew Nacin
5577e024a5 Tag 3.8.2
Built from https://develop.svn.wordpress.org/@28060


git-svn-id: http://core.svn.wordpress.org/tags/3.8.2@27892 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-08 19:17:23 +00:00
Andrew Nacin
bf71d64b32 3.8.2
Built from https://develop.svn.wordpress.org/branches/3.8@28057


git-svn-id: http://core.svn.wordpress.org/branches/3.8@27889 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-08 18:14:12 +00:00
Andrew Nacin
4b48ad6142 Bump Akismet external in the 3.8 branch to 2.6.0.
git-svn-id: http://core.svn.wordpress.org/branches/3.8@27887 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-08 18:11:22 +00:00
Andrew Nacin
78a915e0e5 Harden HMAC verification. props duck_. [28053] for 3.8.
Built from https://develop.svn.wordpress.org/branches/3.8@28054


git-svn-id: http://core.svn.wordpress.org/branches/3.8@27884 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-08 18:07:11 +00:00
Andrew Nacin
ab6a888483 3.8.2-RC1
Built from https://develop.svn.wordpress.org/branches/3.8@27994


git-svn-id: http://core.svn.wordpress.org/branches/3.8@27824 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-07 19:40:20 +00:00
Andrew Nacin
4150ceb4e5 Avoid stomping of bulk postdata inside the bulk_edit_posts() loop.
Merges [27990] to the 3.8 branch.

props kovshenin.
see [27964], see #27452.

Built from https://develop.svn.wordpress.org/branches/3.8@27991


git-svn-id: http://core.svn.wordpress.org/branches/3.8@27821 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-07 19:36:12 +00:00
Andrew Nacin
b514c5b4f7 Better checks for contributors when saving posts.
Merges [27964] and [27975] to the 3.8 branch.

props dd32, kovshenin, plocha.
see #27452.

Built from https://develop.svn.wordpress.org/branches/3.8@27976


git-svn-id: http://core.svn.wordpress.org/branches/3.8@27806 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-06 22:16:12 +00:00
Dion Hulse
9bdfc8debc Background Updates: Fix a PHP Warning caused by a Upgrader instance being passed into the Theme & Plugin $extra_stats parameter.
Background Updates: Fix two variable typos in r27905

Merges [27906], [27928] to the 3.8 branch.
Fixes #27633.

Built from https://develop.svn.wordpress.org/branches/3.8@27929


git-svn-id: http://core.svn.wordpress.org/branches/3.8@27759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-03 05:40:12 +00:00
Andrew Nacin
8126b3edf9 Background Updates: Record plugin & theme update statistics like we do for core updates.
Pass plugin/theme update objects into the Background updater for consistency with core & translations.

Merges [27905] to the 3.8 branch.

props dd32.
fixes #27633.

Built from https://develop.svn.wordpress.org/branches/3.8@27923


git-svn-id: http://core.svn.wordpress.org/branches/3.8@27753 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-03 03:59:11 +00:00
Andrew Nacin
4cd181f75c Update Plupload Silverlight binary to 1.5.8 in the 3.8 branch.
Built from https://develop.svn.wordpress.org/branches/3.8@27920


git-svn-id: http://core.svn.wordpress.org/branches/3.8@27750 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-03 03:34:11 +00:00
Andrew Nacin
7e19af8b0e Remove links_recently_updated_time (hardening).
Merges some of [27916] to the 3.8 branch.

props Tom Adams.
see #27649.

Built from https://develop.svn.wordpress.org/branches/3.8@27917


git-svn-id: http://core.svn.wordpress.org/branches/3.8@27747 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-03 03:15:12 +00:00
Andrew Nacin
1cda6d1e1a Revert [27609] from the 3.8 branch, as it should have been applied to trunk. see #27453.
Built from https://develop.svn.wordpress.org/branches/3.8@27889


git-svn-id: http://core.svn.wordpress.org/branches/3.8@27720 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-01 08:16:11 +00:00
Andrew Nacin
0ccfe99e03 Fix two CSS issues in the 3.8 branch.
* Comments dashboard widget: Use the proper class to avoid stretched "unapproved" red lines. [27564]
 * Fix the tags input in small viewports and make it a more reasonable size. (Was unusable in Firefox.) [27254]

fixes #26910, #27082.

Built from https://develop.svn.wordpress.org/branches/3.8@27877


git-svn-id: http://core.svn.wordpress.org/branches/3.8@27708 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-31 21:22:12 +00:00
Andrew Nacin
f5009dccb2 Themes screen: Use a normal error for WP_Theme errors.
Merges [27760] to the 3.8 branch.

fixes #27235.

Built from https://develop.svn.wordpress.org/branches/3.8@27876


git-svn-id: http://core.svn.wordpress.org/branches/3.8@27707 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-31 21:13:10 +00:00
Andrew Nacin
2cca791a3e Use .screen-reader-text class instead of an alt attribute for overlay button labels on Themes screen.
Merges [27119] to the 3.8 branch.

props bramd.
fixes #26603.

Built from https://develop.svn.wordpress.org/branches/3.8@27875


git-svn-id: http://core.svn.wordpress.org/branches/3.8@27706 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-31 20:52:10 +00:00
Andrew Nacin
236ea231f3 Fix validation issue in get_the_password_form() caused by wpautop().
Merges [27134] to the 3.8 branch.

props andykeith.
fixes #27071.

Built from https://develop.svn.wordpress.org/branches/3.8@27874


git-svn-id: http://core.svn.wordpress.org/branches/3.8@27705 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-31 20:49:10 +00:00
Andrew Nacin
b1aac3577f Forward pingback IP during pingback verification.
Merges [27872] to the 3.8 branch.

props tellyworth, nacin.
fixes #27613.

Built from https://develop.svn.wordpress.org/branches/3.8@27873


git-svn-id: http://core.svn.wordpress.org/branches/3.8@27704 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-31 20:45:12 +00:00
Andrew Nacin
5ca428459f In WP_Query::get_queried_object(), account for pre_get_posts by checking for tag when tag_id isn't present.
Merges [27511] to the 3.8 branch.

props mattonomics, wonderboymusic.
fixes #27362.

Built from https://develop.svn.wordpress.org/branches/3.8@27647


git-svn-id: http://core.svn.wordpress.org/branches/3.8@27490 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-21 17:21:11 +00:00
Andrew Nacin
7db85ec323 Add context to a string new to the admin.
Previously this string was used in TinyMCE on the frontend.

see #27453.

Built from https://develop.svn.wordpress.org/branches/3.8@27609


git-svn-id: http://core.svn.wordpress.org/branches/3.8@27452 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-19 05:38:13 +00:00
Andrew Nacin
53a150cabb Default Themes: Update POT files for the 3.8 branch.
Built from https://develop.svn.wordpress.org/branches/3.8@27591


git-svn-id: http://core.svn.wordpress.org/branches/3.8@27434 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-18 19:20:22 +00:00
19 changed files with 150 additions and 51 deletions

View File

@@ -9,7 +9,7 @@
<body>
<h1 id="logo">
<a href="http://wordpress.org/"><img alt="WordPress" src="wp-admin/images/wordpress-logo.png" /></a>
<br /> Version 3.8.1
<br /> Version 3.8.2
</h1>
<p style="text-align: center">Semantic Personal Publishing Platform</p>

View File

@@ -39,7 +39,11 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
</h2>
<div class="changelog point-releases">
<h3><?php echo _n( 'Maintenance Release', 'Maintenance Releases', 1 ); ?></h3>
<h3><?php echo _n( 'Maintenance and Security Release', 'Maintenance and Security Releases', 2 ); ?></h3>
<p><?php printf( _n( '<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bug.',
'<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bugs.', 9 ), '3.8.2', number_format_i18n( 9 ) ); ?>
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'http://codex.wordpress.org/Version_3.8.2' ); ?>
</p>
<p><?php printf( _n( '<strong>Version %1$s</strong> addressed %2$s bug.',
'<strong>Version %1$s</strong> addressed %2$s bugs.', 31 ), '3.8.1', number_format_i18n( 31 ) ); ?>
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'http://codex.wordpress.org/Version_3.8.1' ); ?>

View File

@@ -839,7 +839,7 @@ class WP_Posts_List_Table extends WP_List_Table {
<?php if ( !$bulk ) echo $authors_dropdown;
endif; // post_type_supports author
if ( !$bulk ) :
if ( !$bulk && $can_publish ) :
?>
<div class="inline-edit-group">

View File

@@ -1871,18 +1871,21 @@ class WP_Automatic_Updater {
if ( ! $this->should_update( $type, $item, $context ) )
return false;
$upgrader_item = $item;
switch ( $type ) {
case 'core':
$skin->feedback( __( 'Updating to WordPress %s' ), $item->version );
$item_name = sprintf( __( 'WordPress %s' ), $item->version );
break;
case 'theme':
$theme = wp_get_theme( $item );
$upgrader_item = $item->theme;
$theme = wp_get_theme( $upgrader_item );
$item_name = $theme->Get( 'Name' );
$skin->feedback( __( 'Updating theme: %s' ), $item_name );
break;
case 'plugin':
$plugin_data = get_plugin_data( $context . '/' . $item );
$upgrader_item = $item->plugin;
$plugin_data = get_plugin_data( $context . '/' . $upgrader_item );
$item_name = $plugin_data['Name'];
$skin->feedback( __( 'Updating plugin: %s' ), $item_name );
break;
@@ -1894,7 +1897,7 @@ class WP_Automatic_Updater {
}
// Boom, This sites about to get a whole new splash of paint!
$upgrade_result = $upgrader->upgrade( $item, array(
$upgrade_result = $upgrader->upgrade( $upgrader_item, array(
'clear_update_cache' => false,
'pre_check_md5' => false, /* always use partial builds if possible for core updates */
'attempt_rollback' => true, /* only available for core updates */
@@ -1968,7 +1971,7 @@ class WP_Automatic_Updater {
wp_update_plugins(); // Check for Plugin updates
$plugin_updates = get_site_transient( 'update_plugins' );
if ( $plugin_updates && !empty( $plugin_updates->response ) ) {
foreach ( array_keys( $plugin_updates->response ) as $plugin ) {
foreach ( $plugin_updates->response as $plugin ) {
$this->update( 'plugin', $plugin );
}
// Force refresh of plugin update information
@@ -1979,8 +1982,8 @@ class WP_Automatic_Updater {
wp_update_themes(); // Check for Theme updates
$theme_updates = get_site_transient( 'update_themes' );
if ( $theme_updates && !empty( $theme_updates->response ) ) {
foreach ( array_keys( $theme_updates->response ) as $theme ) {
$this->update( 'theme', $theme );
foreach ( $theme_updates->response as $theme ) {
$this->update( 'theme', (object) $theme );
}
// Force refresh of theme update information
wp_clean_themes_cache();
@@ -1995,8 +1998,21 @@ class WP_Automatic_Updater {
// Clean up, and check for any pending translations
// (Core_Upgrader checks for core updates)
wp_update_themes(); // Check for Theme updates
wp_update_plugins(); // Check for Plugin updates
$theme_stats = array();
if ( isset( $this->update_results['theme'] ) ) {
foreach ( $this->update_results['theme'] as $upgrade ) {
$theme_stats[ $upgrade->item->theme ] = ( true === $upgrade->result );
}
}
wp_update_themes( $theme_stats ); // Check for Theme updates
$plugin_stats = array();
if ( isset( $this->update_results['plugin'] ) ) {
foreach ( $this->update_results['plugin'] as $upgrade ) {
$plugin_stats[ $upgrade->item->plugin ] = ( true === $upgrade->result );
}
}
wp_update_plugins( $plugin_stats ); // Check for Plugin updates
// Finally, Process any new translations
$language_updates = wp_get_translation_updates();

View File

@@ -100,6 +100,10 @@ function _wp_translate_postdata( $update = false, $post_data = null ) {
$post_id = false;
$previous_status = $post_id ? get_post_field( 'post_status', $post_id ) : false;
if ( isset( $post_data['post_status'] ) && 'private' == $post_data['post_status'] && ! current_user_can( $ptype->cap->publish_posts ) ) {
$post_data['post_status'] = $previous_status ? $previous_status : 'pending';
}
$published_statuses = array( 'publish', 'future' );
// Posts 'submitted for approval' present are submitted to $_POST the same as if they were being published.
@@ -111,6 +115,10 @@ function _wp_translate_postdata( $update = false, $post_data = null ) {
if ( ! isset($post_data['post_status']) )
$post_data['post_status'] = $previous_status;
if ( isset( $post_data['post_password'] ) && ! current_user_can( $ptype->cap->publish_posts ) ) {
unset( $post_data['post_password'] );
}
if (!isset( $post_data['comment_status'] ))
$post_data['comment_status'] = 'closed';
@@ -170,6 +178,14 @@ function edit_post( $post_data = null ) {
$post_data['post_type'] = $post->post_type;
$post_data['post_mime_type'] = $post->post_mime_type;
if ( ! empty( $post_data['post_status'] ) ) {
$post_data['post_status'] = sanitize_key( $post_data['post_status'] );
if ( 'inherit' == $post_data['post_status'] ) {
unset( $post_data['post_status'] );
}
}
$ptype = get_post_type_object($post_data['post_type']);
if ( !current_user_can( 'edit_post', $post_ID ) ) {
if ( 'page' == $post_data['post_type'] )
@@ -187,9 +203,6 @@ function edit_post( $post_data = null ) {
_wp_upgrade_revisions_of_post( $post, wp_get_post_revisions( $post_ID ) );
}
$post_data = _wp_translate_postdata( true, $post_data );
if ( is_wp_error($post_data) )
wp_die( $post_data->get_error_message() );
if ( ( empty( $post_data['action'] ) || 'autosave' != $post_data['action'] ) && 'auto-draft' == $post_data['post_status'] ) {
$post_data['post_status'] = 'draft';
}
@@ -210,6 +223,10 @@ function edit_post( $post_data = null ) {
}
}
$post_data = _wp_translate_postdata( true, $post_data );
if ( is_wp_error($post_data) )
wp_die( $post_data->get_error_message() );
// Post Formats
if ( isset( $post_data['post_format'] ) )
set_post_format( $post_ID, $post_data['post_format'] );
@@ -332,6 +349,14 @@ function bulk_edit_posts( $post_data = null ) {
}
unset($post_data['_status']);
if ( ! empty( $post_data['post_status'] ) ) {
$post_data['post_status'] = sanitize_key( $post_data['post_status'] );
if ( 'inherit' == $post_data['post_status'] ) {
unset( $post_data['post_status'] );
}
}
$post_IDs = array_map( 'intval', (array) $post_data['post'] );
$reset = array(
@@ -422,11 +447,26 @@ function bulk_edit_posts( $post_data = null ) {
unset( $post_data['tax_input']['category'] );
}
$post_data['post_type'] = $post->post_type;
$post_data['post_mime_type'] = $post->post_mime_type;
$post_data['guid'] = $post->guid;
foreach ( array( 'comment_status', 'ping_status', 'post_author' ) as $field ) {
if ( ! isset( $post_data[ $field ] ) ) {
$post_data[ $field ] = $post->$field;
}
}
$post_data['ID'] = $post_ID;
$updated[] = wp_update_post( $post_data );
$post_data['post_ID'] = $post_ID;
$translated_post_data = _wp_translate_postdata( true, $post_data );
if ( is_wp_error( $translated_post_data ) ) {
$skipped[] = $post_ID;
continue;
}
$updated[] = wp_update_post( $translated_post_data );
if ( isset( $post_data['sticky'] ) && current_user_can( $ptype->cap->edit_others_posts ) ) {
if ( 'sticky' == $post_data['sticky'] )
@@ -569,10 +609,6 @@ function wp_write_post() {
if ( isset( $_POST['post_ID'] ) )
return edit_post();
$translated = _wp_translate_postdata( false );
if ( is_wp_error($translated) )
return $translated;
if ( isset($_POST['visibility']) ) {
switch ( $_POST['visibility'] ) {
case 'public' :
@@ -589,6 +625,10 @@ function wp_write_post() {
}
}
$translated = _wp_translate_postdata( false );
if ( is_wp_error($translated) )
return $translated;
// Create the post.
$post_ID = wp_insert_post( $_POST );
if ( is_wp_error( $post_ID ) )

View File

@@ -142,7 +142,7 @@ endif;
$ct = wp_get_theme();
if ( $ct->errors() && ( ! is_multisite() || current_user_can( 'manage_network_themes' ) ) ) {
echo '<p class="error-message">' . sprintf( __( 'ERROR: %s' ), $ct->errors()->get_error_message() ) . '</p>';
echo '<div class="error"><p>' . sprintf( __( 'ERROR: %s' ), $ct->errors()->get_error_message() ) . '</p></div>';
}
/*
@@ -312,9 +312,9 @@ if ( ! is_multisite() && current_user_can('edit_themes') && $broken_themes = wp_
<div class="theme-backdrop"></div>
<div class="theme-wrap">
<div class="theme-header">
<button alt="<?php _e( 'Show previous theme' ); ?>" class="left dashicons dashicons-no"></button>
<button alt="<?php _e( 'Show next theme' ); ?>" class="right dashicons dashicons-no"></button>
<button alt="<?php _e( 'Close overlay' ); ?>" class="close dashicons dashicons-no"></button>
<button class="left dashicons dashicons-no"><span class="screen-reader-text"><?php _e( 'Show previous theme' ); ?></span></button>
<button class="right dashicons dashicons-no"><span class="screen-reader-text"><?php _e( 'Show next theme' ); ?></span></button>
<button class="close dashicons dashicons-no"><span class="screen-reader-text"><?php _e( 'Close overlay' ); ?></span></button>
</div>
<div class="theme-about">
<div class="theme-screenshots">

View File

@@ -1,14 +1,14 @@
# Copyright (C) 2013 the WordPress team
# Copyright (C) 2014 the WordPress team
# This file is distributed under the GNU General Public License v2 or later.
msgid ""
msgstr ""
"Project-Id-Version: Twenty Eleven 1.7\n"
"Report-Msgid-Bugs-To: http://wordpress.org/tags/twentyeleven\n"
"POT-Creation-Date: 2013-10-24 19:42:42+00:00\n"
"POT-Creation-Date: 2014-03-18 19:16:25+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2013-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: 2014-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View File

@@ -1,14 +1,14 @@
# Copyright (C) 2013 the WordPress team
# Copyright (C) 2014 the WordPress team
# This file is distributed under the GNU General Public License v2 or later.
msgid ""
msgstr ""
"Project-Id-Version: Twenty Fourteen 1.0\n"
"Report-Msgid-Bugs-To: http://wordpress.org/tags/twentyfourteen\n"
"POT-Creation-Date: 2013-12-12 05:25:07+00:00\n"
"POT-Creation-Date: 2014-03-18 19:16:26+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2013-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: 2014-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View File

@@ -1,14 +1,14 @@
# Copyright (C) 2013 the WordPress team
# Copyright (C) 2014 the WordPress team
# This file is distributed under the GNU General Public License v2 or later.
msgid ""
msgstr ""
"Project-Id-Version: Twenty Ten 1.6\n"
"Report-Msgid-Bugs-To: http://wordpress.org/tags/twentyten\n"
"POT-Creation-Date: 2013-10-24 19:42:39+00:00\n"
"POT-Creation-Date: 2014-03-18 19:16:24+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2013-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: 2014-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View File

@@ -1,14 +1,14 @@
# Copyright (C) 2013 the WordPress team
# Copyright (C) 2014 the WordPress team
# This file is distributed under the GNU General Public License v2 or later.
msgid ""
msgstr ""
"Project-Id-Version: Twenty Thirteen 1.1\n"
"Report-Msgid-Bugs-To: http://wordpress.org/tags/twentythirteen\n"
"POT-Creation-Date: 2013-10-24 20:32:06+00:00\n"
"POT-Creation-Date: 2014-03-18 19:16:26+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2013-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: 2014-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View File

@@ -1,14 +1,14 @@
# Copyright (C) 2013 the WordPress team
# Copyright (C) 2014 the WordPress team
# This file is distributed under the GNU General Public License v2 or later.
msgid ""
msgstr ""
"Project-Id-Version: Twenty Twelve 1.3\n"
"Report-Msgid-Bugs-To: http://wordpress.org/tags/twentytwelve\n"
"POT-Creation-Date: 2013-10-24 20:32:05+00:00\n"
"POT-Creation-Date: 2014-03-18 19:16:25+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2013-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: 2014-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View File

@@ -226,8 +226,8 @@ function get_bookmarks($args = '') {
$join = " INNER JOIN $wpdb->term_relationships AS tr ON ($wpdb->links.link_id = tr.object_id) INNER JOIN $wpdb->term_taxonomy as tt ON tt.term_taxonomy_id = tr.term_taxonomy_id";
}
if ( $show_updated && get_option('links_recently_updated_time') ) {
$recently_updated_test = ", IF (DATE_ADD(link_updated, INTERVAL " . get_option('links_recently_updated_time') . " MINUTE) >= NOW(), 1,0) as recently_updated ";
if ( $show_updated ) {
$recently_updated_test = ", IF (DATE_ADD(link_updated, INTERVAL 120 MINUTE) >= NOW(), 1,0) as recently_updated ";
} else {
$recently_updated_test = '';
}

View File

@@ -5390,11 +5390,18 @@ class wp_xmlrpc_server extends IXR_Server {
// very stupid, but gives time to the 'from' server to publish !
sleep(1);
$remote_ip = preg_replace( '/[^0-9a-fA-F:., ]/', '', $_SERVER['REMOTE_ADDR'] );
$user_agent = apply_filters( 'http_headers_useragent', 'WordPress/' . $GLOBALS['wp_version'] . '; ' . get_bloginfo( 'url' ) );
// Let's check the remote site
$http_api_args = array(
'timeout' => 10,
'redirection' => 0,
'limit_response_size' => 153600, // 150 KB
'user-agent' => "$user_agent; verifying pingback from $remote_ip",
'headers' => array(
'X-Pingback-Forwarded-For' => $remote_ip,
),
);
$linea = wp_remote_retrieve_body( wp_safe_remote_get( $pagelinkedfrom, $http_api_args ) );

View File

@@ -543,7 +543,7 @@ function wp_validate_auth_cookie($cookie = '', $scheme = '') {
$key = wp_hash($username . $pass_frag . '|' . $expiration, $scheme);
$hash = hash_hmac('md5', $username . '|' . $expiration, $key);
if ( $hmac != $hash ) {
if ( hash_hmac( 'md5', $hmac, $key ) !== hash_hmac( 'md5', $hash, $key ) ) {
do_action('auth_cookie_bad_hash', $cookie_elements);
return false;
}

View File

@@ -1248,8 +1248,7 @@ function get_the_password_form( $post = 0 ) {
$label = 'pwbox-' . ( empty($post->ID) ? rand() : $post->ID );
$output = '<form action="' . esc_url( site_url( 'wp-login.php?action=postpass', 'login_post' ) ) . '" class="post-password-form" method="post">
<p>' . __( 'This content is password protected. To view it please enter your password below:' ) . '</p>
<p><label for="' . $label . '">' . __( 'Password:' ) . ' <input name="post_password" id="' . $label . '" type="password" size="20" /></label> <input type="submit" name="Submit" value="' . esc_attr__( 'Submit' ) . '" /></p>
</form>
<p><label for="' . $label . '">' . __( 'Password:' ) . ' <input name="post_password" id="' . $label . '" type="password" size="20" /></label> <input type="submit" name="Submit" value="' . esc_attr__( 'Submit' ) . '" /></p></form>
';
return apply_filters( 'the_password_form', $output );
}
@@ -1443,3 +1442,22 @@ function wp_list_post_revisions( $post_id = 0, $type = 'all' ) {
echo $rows;
echo "</ul>";
}
/**
* Dashboard CSS fixes for 3.8.2.
*
* This function cheaply fixes #WP27082 and #WP26910 in lieu of
* changing the massive wp-admin.css file in a point release.
* This lucky includes file was already receiving an update.
*
* @since 3.8.2
* @access private
*/
function wp_382_css_hotfix() {
echo '<style type="text/css">
#activity-widget #the-comment-list .comment-item { position: relative; }
.tagsdiv .newtag { padding: 6px 10px; height: auto; }
</style>
';
}
add_action( 'admin_print_styles', 'wp_382_css_hotfix', 30 );

View File

@@ -3273,7 +3273,11 @@ class WP_Query {
$term = get_term_by( 'slug', $this->get( 'category_name' ), 'category' );
}
} elseif ( $this->is_tag ) {
$term = get_term( $this->get( 'tag_id' ), 'post_tag' );
if ( $this->get( 'tag_id' ) ) {
$term = get_term( $this->get( 'tag_id' ), 'post_tag' );
} elseif ( $this->get( 'tag' ) ) {
$term = get_term_by( 'slug', $this->get( 'tag' ), 'post_tag' );
}
} else {
$tax_query_in_and = wp_list_filter( $this->tax_query->queries, array( 'operator' => 'NOT IN' ), 'NOT' );
$query = reset( $tax_query_in_and );

View File

@@ -168,9 +168,10 @@ function wp_version_check( $extra_stats = array(), $force_check = false ) {
* @since 2.3.0
* @uses $wp_version Used to notify the WordPress version.
*
* @param array $extra_stats Extra statistics to report to the WordPress.org API.
* @return mixed Returns null if update is unsupported. Returns false if check is too soon.
*/
function wp_update_plugins() {
function wp_update_plugins( $extra_stats = array() ) {
include ABSPATH . WPINC . '/version.php'; // include an unmodified $wp_version
if ( defined('WP_INSTALLING') )
@@ -209,7 +210,7 @@ function wp_update_plugins() {
$time_not_changed = isset( $current->last_checked ) && $timeout > ( time() - $current->last_checked );
if ( $time_not_changed ) {
if ( $time_not_changed && ! $extra_stats ) {
$plugin_changed = false;
foreach ( $plugins as $file => $p ) {
$new_option->checked[ $file ] = $p['Version'];
@@ -258,6 +259,10 @@ function wp_update_plugins() {
'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' )
);
if ( $extra_stats ) {
$options['body']['update_stats'] = json_encode( $extra_stats );
}
$url = $http_url = 'http://api.wordpress.org/plugins/update-check/1.1/';
if ( $ssl = wp_http_supports( array( 'ssl' ) ) )
$url = set_url_scheme( $url, 'https' );
@@ -299,9 +304,10 @@ function wp_update_plugins() {
* @since 2.7.0
* @uses $wp_version Used to notify the WordPress version.
*
* @param array $extra_stats Extra statistics to report to the WordPress.org API.
* @return mixed Returns null if update is unsupported. Returns false if check is too soon.
*/
function wp_update_themes() {
function wp_update_themes( $extra_stats = array() ) {
include ABSPATH . WPINC . '/version.php'; // include an unmodified $wp_version
if ( defined( 'WP_INSTALLING' ) )
@@ -351,7 +357,7 @@ function wp_update_themes() {
$time_not_changed = isset( $last_update->last_checked ) && $timeout > ( time() - $last_update->last_checked );
if ( $time_not_changed ) {
if ( $time_not_changed && ! $extra_stats ) {
$theme_changed = false;
foreach ( $checked as $slug => $v ) {
if ( !isset( $last_update->checked[ $slug ] ) || strval($last_update->checked[ $slug ]) !== strval($v) )
@@ -398,6 +404,10 @@ function wp_update_themes() {
'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' )
);
if ( $extra_stats ) {
$options['body']['update_stats'] = json_encode( $extra_stats );
}
$url = $http_url = 'http://api.wordpress.org/themes/update-check/1.1/';
if ( $ssl = wp_http_supports( array( 'ssl' ) ) )
$url = set_url_scheme( $url, 'https' );
@@ -610,14 +620,14 @@ add_action( 'load-update.php', 'wp_update_plugins' );
add_action( 'load-update-core.php', 'wp_update_plugins' );
add_action( 'admin_init', '_maybe_update_plugins' );
add_action( 'wp_update_plugins', 'wp_update_plugins' );
add_action( 'upgrader_process_complete', 'wp_update_plugins' );
add_action( 'upgrader_process_complete', 'wp_update_plugins', 10, 0 );
add_action( 'load-themes.php', 'wp_update_themes' );
add_action( 'load-update.php', 'wp_update_themes' );
add_action( 'load-update-core.php', 'wp_update_themes' );
add_action( 'admin_init', '_maybe_update_themes' );
add_action( 'wp_update_themes', 'wp_update_themes' );
add_action( 'upgrader_process_complete', 'wp_update_themes' );
add_action( 'upgrader_process_complete', 'wp_update_themes', 10, 0 );
add_action( 'wp_maybe_auto_update', 'wp_maybe_auto_update' );

View File

@@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '3.8.1';
$wp_version = '3.8.2';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.