Compare commits

...

31 Commits

Author SHA1 Message Date
Dion Hulse
9d4f26a514 Update Akismet externals
git-svn-id: http://core.svn.wordpress.org/branches/3.6@35107 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-13 17:19:01 +00:00
Andrew Nacin
ee3487220b Return false from wp_get_referer() and wp_get_original_referer() if called before wp_validate_redirect() is defined.
Merges [25399] and [25400] to the 3.6 branch.
see #25294.

Built from https://develop.svn.wordpress.org/branches/3.6@25401


git-svn-id: http://core.svn.wordpress.org/branches/3.6@25332 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-12 13:39:02 +00:00
Andrew Nacin
4dfa2da172 The 3.6 branch is now 3.6.2-alpha.
Built from https://develop.svn.wordpress.org/branches/3.6@25398


git-svn-id: http://core.svn.wordpress.org/branches/3.6@25329 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-12 13:32:04 +00:00
Andrew Nacin
9c9324a364 Compress common.js for the 3.6 branch.
Built from https://develop.svn.wordpress.org/branches/3.6@25360


git-svn-id: http://core.svn.wordpress.org/branches/3.6@25318 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-11 23:17:41 +00:00
Andrew Nacin
96532bc309 3.6.1.
Built from https://develop.svn.wordpress.org/branches/3.6@25358


git-svn-id: http://core.svn.wordpress.org/branches/3.6@25315 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-11 19:13:02 +00:00
Andrew Nacin
6a018de1e2 Readme for 3.6.1.
Built from https://develop.svn.wordpress.org/branches/3.6@25357


git-svn-id: http://core.svn.wordpress.org/branches/3.6@25314 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-11 19:08:03 +00:00
Andrew Nacin
1f06608a5e Avoid error in ms-files.php after [25317] (merged as [25322]). Merges [25344] to 3.6.
Built from https://develop.svn.wordpress.org/branches/3.6@25345


git-svn-id: http://core.svn.wordpress.org/branches/3.6@25307 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-11 04:50:02 +00:00
Andrew Nacin
18dba66bfb Avoid string offset notices in [25319] (merged as [25324]). Merges [25340] to 3.6.
Built from https://develop.svn.wordpress.org/branches/3.6@25341


git-svn-id: http://core.svn.wordpress.org/branches/3.6@25303 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-11 04:00:03 +00:00
Andrew Nacin
a2b1caaaee Improve clarity and speed of [25320] (merged as [25325]). Merges [25338] to 3.6.
Built from https://develop.svn.wordpress.org/branches/3.6@25339


git-svn-id: http://core.svn.wordpress.org/branches/3.6@25301 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-11 03:29:02 +00:00
Andrew Nacin
5ea0b8ae86 Update TinyMCE for [25187]. see #25131.
Built from https://develop.svn.wordpress.org/branches/3.6@25336


git-svn-id: http://core.svn.wordpress.org/branches/3.6@25298 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-11 02:41:04 +00:00
Andrew Nacin
e933603003 3.6.1-RC1
Built from https://develop.svn.wordpress.org/branches/3.6@25326


git-svn-id: http://core.svn.wordpress.org/branches/3.6@25288 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-10 18:45:02 +00:00
Andrew Nacin
102e8f6257 Loose validation for is_serialized() in maybe_serialize(). Merges [25320] to 3.6.
Built from https://develop.svn.wordpress.org/branches/3.6@25325


git-svn-id: http://core.svn.wordpress.org/branches/3.6@25287 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-10 18:44:04 +00:00
Andrew Nacin
f6d01839a2 Better protocol validation in set_url_scheme(). Merges [25319] to 3.6.
Built from https://develop.svn.wordpress.org/branches/3.6@25324


git-svn-id: http://core.svn.wordpress.org/branches/3.6@25286 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-10 18:44:02 +00:00
Andrew Nacin
0b4b9bfa2b Validate referrers to prevent off-domain redirects. Merges [25318] to 3.6.
Built from https://develop.svn.wordpress.org/branches/3.6@25323


git-svn-id: http://core.svn.wordpress.org/branches/3.6@25285 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-10 18:43:03 +00:00
Andrew Nacin
85da1c49a1 Tighten allowed upload file types. Merges [25317] to 3.6.
Built from https://develop.svn.wordpress.org/branches/3.6@25322


git-svn-id: http://core.svn.wordpress.org/branches/3.6@25284 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-10 18:42:04 +00:00
Andrew Nacin
3fe4481673 Ignore user ID post data. Merges [25316] to 3.6.
Built from https://develop.svn.wordpress.org/branches/3.6@25321


git-svn-id: http://core.svn.wordpress.org/branches/3.6@25283 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-10 18:42:03 +00:00
Andrew Nacin
1272cebae4 3.6.1-beta1.
Built from https://develop.svn.wordpress.org/branches/3.6@25247


git-svn-id: http://core.svn.wordpress.org/branches/3.6@25215 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-04 21:28:02 +00:00
Andrew Nacin
3b4e94c1ac Fix 'html5' theme support.
* Merge, rather than replace, on second add.
 * Make current_theme_supports() work when two arguments are passed.
 * Require the second argument to be an array.

Merges [25193] and [25235] to the 3.6 branch.
fixes #24932.

Built from https://develop.svn.wordpress.org/branches/3.6@25236


git-svn-id: http://core.svn.wordpress.org/branches/3.6@25206 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-04 17:47:03 +00:00
Andrew Nacin
54d986e028 Remove display of 'Previously restored by' in the revisions meta box as it is busted.
Fixes invalid markup (missing closing ul tag) when there was no previously restored revision.

Merges [25194] to the 3.6 branch.
fixes #25051.


Built from https://develop.svn.wordpress.org/branches/3.6@25233


git-svn-id: http://core.svn.wordpress.org/branches/3.6@25203 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-04 17:40:02 +00:00
Andrew Nacin
716fa8d64c Nav menus: Allow assigning a new menu to an existing location when no theme setting is currently saved.
Merges [25195] to the 3.6 branch.

props ocean90.
fixes #25064.

Built from https://develop.svn.wordpress.org/branches/3.6@25232


git-svn-id: http://core.svn.wordpress.org/branches/3.6@25202 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-04 17:39:03 +00:00
Andrew Nacin
a09b555bec Case sensitivity for is_email_address_unsafe().
Merges [25197] to the 3.6 branch.

props jkudish.
fixes #25046.

Built from https://develop.svn.wordpress.org/branches/3.6@25198


git-svn-id: http://core.svn.wordpress.org/branches/3.6@25170 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-31 04:37:03 +00:00
Andrew Nacin
17068d7e86 Hide 'Database Upgrade Required' on admin/network/upgrade.php when you are not being asked to upgrade, to prevent confusion.
Merges [25191] to the 3.6 branch.

props duck_.
fixes #24845.


Built from https://develop.svn.wordpress.org/branches/3.6@25192


git-svn-id: http://core.svn.wordpress.org/branches/3.6@25164 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-31 00:59:03 +00:00
Andrew Ozz
f29ed573de TinyMCE: fix editor focus issues after ontouchstart event on the parent document in iOS Safari. Fixes #25131 for 3.6.
Built from https://develop.svn.wordpress.org/branches/3.6@25187


git-svn-id: http://core.svn.wordpress.org/branches/3.6@25159 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-30 17:44:03 +00:00
Sergey Biryukov
06114cd25f Fix menu folding on new installs. fixes #24921 for 3.6.
Built from https://develop.svn.wordpress.org/branches/3.6@25185


git-svn-id: http://core.svn.wordpress.org/branches/3.6@25157 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-30 17:06:04 +00:00
Andrew Nacin
dd5de4133d Revert [23307] so new users in multisite are not automatically subscribers on the main site.
Merges [25183] to the 3.6 branch.

props duck_.
fixes #25166.
see #15627.


Built from https://develop.svn.wordpress.org/branches/3.6@25184


git-svn-id: http://core.svn.wordpress.org/branches/3.6@25156 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-30 16:33:03 +00:00
Sergey Biryukov
d9dc2ddbed Make sure $args is an array before treating it as such. fixes #25151 for 3.6.
Built from https://develop.svn.wordpress.org/branches/3.6@25152


git-svn-id: http://core.svn.wordpress.org/branches/3.6@25131 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-28 05:28:12 +00:00
Sergey Biryukov
db8fe9a291 Avoid displaying multiple instances of the same feature pointers on a single screen. props nacin. fixes #25022 for 3.6.
Built from https://develop.svn.wordpress.org/branches/3.6@25118


git-svn-id: http://core.svn.wordpress.org/branches/3.6@25098 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-24 22:37:04 +00:00
Andrew Nacin
861f928256 The 3.6 branch is 3.6.1-alpha.
Built from https://develop.svn.wordpress.org/branches/3.6@25074


git-svn-id: http://core.svn.wordpress.org/branches/3.6@25059 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-21 18:18:03 +00:00
Andrew Nacin
fa09261d26 Remove sourceMappingURL from jquery.min.js.
Merges [25072] to the 3.6 branch.

props Jayjdk.
fixes #24994.


Built from https://develop.svn.wordpress.org/branches/3.6@25073


git-svn-id: http://core.svn.wordpress.org/branches/3.6@25058 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-21 18:17:04 +00:00
Dion Hulse
5f7f39240d WP_HTTP: Curl: When using Stream-to-file on servers using mbstring.func_overload ensure that the file is written out correctly. Props DrProtocols. See #25061 for 3.6
Built from https://develop.svn.wordpress.org/branches/3.6@25052


git-svn-id: http://core.svn.wordpress.org/branches/3.6@25039 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-18 08:22:03 +00:00
Andrew Nacin
c20fb5af65 Remove zero-byte files that were meant to be deleted in [23446]. see #23486.
Merges [25013] to the 3.6 branch.

Built from https://develop.svn.wordpress.org/branches/3.6@25014


git-svn-id: http://core.svn.wordpress.org/branches/3.6@25007 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-07 18:05:02 +00:00
26 changed files with 136 additions and 69 deletions

View File

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

View File

@@ -33,6 +33,14 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
</a>
</h2>
<div class="changelog point-releases">
<h3><?php echo _n( 'Maintenance and Security Release', 'Maintenance and Security Releases', 1 ); ?></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.', 13 ), '3.6.1', number_format_i18n( 13 ) ); ?>
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'http://codex.wordpress.org/Version_3.6.1' ); ?>
</p>
</div>
<div class="changelog">
<h3><?php _e( 'Colorful New Theme' ); ?></h3>

View File

@@ -52,8 +52,7 @@ function _wp_translate_postdata( $update = false, $post_data = null ) {
if ( isset($post_data['trackback_url']) )
$post_data['to_ping'] = $post_data['trackback_url'];
if ( !isset($post_data['user_ID']) )
$post_data['user_ID'] = $GLOBALS['user_ID'];
$post_data['user_ID'] = $GLOBALS['user_ID'];
if (!empty ( $post_data['post_author_override'] ) ) {
$post_data['post_author'] = (int) $post_data['post_author_override'];

View File

@@ -1811,7 +1811,7 @@ final class WP_Internal_Pointers {
});
setup = function() {
$('<?php echo $selector; ?>').pointer( options ).pointer('open');
$('<?php echo $selector; ?>').first().pointer( options ).pointer('open');
};
if ( options.position && options.position.defer_loading )

View File

@@ -554,6 +554,10 @@ $_old_files = array(
// 3.6
'wp-admin/js/revisions-js.php',
'wp-admin/images/screenshots',
'wp-admin/js/categories.js',
'wp-admin/js/categories.min.js',
'wp-admin/js/custom-fields.js',
'wp-admin/js/custom-fields.min.js',
);
/**

View File

View File

@@ -185,15 +185,15 @@ $(document).ready( function() {
if ( body.hasClass('auto-fold') ) {
body.removeClass('auto-fold').removeClass('folded');
setUserSetting('unfold', 1);
deleteUserSetting('mfold');
setUserSetting('mfold', 'o');
} else {
body.addClass('auto-fold');
deleteUserSetting('unfold');
setUserSetting('unfold', 0);
}
} else {
if ( body.hasClass('folded') ) {
body.removeClass('folded');
deleteUserSetting('mfold');
setUserSetting('mfold', 'o');
} else {
body.addClass('folded');
setUserSetting('mfold', 'f');

File diff suppressed because one or more lines are too long

View File

View File

@@ -300,18 +300,19 @@ switch ( $action ) {
// If there are menu items, add them
wp_nav_menu_update_menu_items( $nav_menu_selected_id, $nav_menu_selected_title );
// Auto-save nav_menu_locations
$locations = get_theme_mod( 'nav_menu_locations' );
foreach ( (array) $locations as $location => $menu_id ) {
$locations = get_nav_menu_locations();
foreach ( $locations as $location => $menu_id ) {
$locations[ $location ] = $nav_menu_selected_id;
break; // There should only be 1
}
set_theme_mod( 'nav_menu_locations', $locations );
}
if ( isset( $_REQUEST['use-location'] ) ) {
$locations = get_theme_mod( 'nav_menu_locations' );
if ( isset( $locations[$_REQUEST['use-location']] ) )
$locations[$_REQUEST['use-location']] = $nav_menu_selected_id;
set_theme_mod( 'nav_menu_locations', $locations );
$locations = get_registered_nav_menus();
$menu_locations = get_nav_menu_locations();
if ( isset( $locations[ $_REQUEST['use-location'] ] ) )
$menu_locations[ $_REQUEST['use-location'] ] = $nav_menu_selected_id;
set_theme_mod( 'nav_menu_locations', $menu_locations );
}
// $messages[] = '<div id="message" class="updated"><p>' . sprintf( __( '<strong>%s</strong> has been created.' ), $nav_menu_selected_title ) . '</p></div>';
wp_redirect( admin_url( 'nav-menus.php?menu=' . $_nav_menu_selected_id ) );

View File

@@ -84,9 +84,12 @@ switch ( $action ) {
break;
case 'show':
default:
if ( get_site_option( 'wpmu_upgrade_site' ) != $GLOBALS['wp_db_version'] ) :
?>
<h3><?php _e( 'Database Upgrade Required' ); ?></h3>
<p><?php _e( 'WordPress has been updated! Before we send you on your way, we need to individually upgrade the sites in your network.' ); ?></p>
<?php endif; ?>
<p><?php _e( 'The upgrade process may take a little while, so please be patient.' ); ?></p>
<p><a class="button" href="upgrade.php?action=upgrade"><?php _e( 'Upgrade Network' ); ?></a></p>
<?php

View File

@@ -1302,6 +1302,11 @@ class WP_Http_Curl {
* @return int
*/
private function stream_body( $handle, $data ) {
if ( function_exists( 'ini_get' ) && ( ini_get( 'mbstring.func_overload' ) & 2 ) && function_exists( 'mb_internal_encoding' ) ) {
$mb_encoding = mb_internal_encoding();
mb_internal_encoding( 'ISO-8859-1' );
}
if ( $this->max_body_length && ( strlen( $this->body ) + strlen( $data ) ) > $this->max_body_length )
$data = substr( $data, 0, ( $this->max_body_length - strlen( $this->body ) ) );
@@ -1310,7 +1315,12 @@ class WP_Http_Curl {
else
$this->body .= $data;
return strlen( $data );
$data_length = strlen( $data );
if ( isset( $mb_encoding ) )
mb_internal_encoding( $mb_encoding );
return $data_length;
}
/**

View File

@@ -1606,6 +1606,7 @@ function comment_form( $args = array(), $post_id = null ) {
$user = wp_get_current_user();
$user_identity = $user->exists() ? $user->display_name : '';
$args = wp_parse_args( $args );
if ( ! isset( $args['format'] ) )
$args['format'] = current_theme_supports( 'html5', 'comment-form' ) ? 'html5' : 'xhtml';

View File

@@ -242,9 +242,10 @@ function maybe_unserialize( $original ) {
* @since 2.0.5
*
* @param mixed $data Value to check to see if was serialized.
* @param bool $strict Optional. Whether to be strict about the end of the string. Defaults true.
* @return bool False if not serialized and true if it was.
*/
function is_serialized( $data ) {
function is_serialized( $data, $strict = true ) {
// if it isn't a string, it isn't serialized
if ( ! is_string( $data ) )
return false;
@@ -256,21 +257,39 @@ function is_serialized( $data ) {
return false;
if ( ':' !== $data[1] )
return false;
$lastc = $data[$length-1];
if ( ';' !== $lastc && '}' !== $lastc )
return false;
if ( $strict ) {
$lastc = $data[ $length - 1 ];
if ( ';' !== $lastc && '}' !== $lastc )
return false;
} else {
$semicolon = strpos( $data, ';' );
$brace = strpos( $data, '}' );
// Either ; or } must exist.
if ( false === $semicolon && false === $brace )
return false;
// But neither must be in the first X characters.
if ( false !== $semicolon && $semicolon < 3 )
return false;
if ( false !== $brace && $brace < 4 )
return false;
}
$token = $data[0];
switch ( $token ) {
case 's' :
if ( '"' !== $data[$length-2] )
if ( $strict ) {
if ( '"' !== $data[ $length - 2 ] )
return false;
} elseif ( false === strpos( $data, '"' ) ) {
return false;
}
case 'a' :
case 'O' :
return (bool) preg_match( "/^{$token}:[0-9]+:/s", $data );
case 'b' :
case 'i' :
case 'd' :
return (bool) preg_match( "/^{$token}:[0-9.E-]+;\$/", $data );
$end = $strict ? '$' : '';
return (bool) preg_match( "/^{$token}:[0-9.E-]+;$end/", $data );
}
return false;
}
@@ -317,7 +336,7 @@ function maybe_serialize( $data ) {
// Double serialization is required for backward compatibility.
// See http://core.trac.wordpress.org/ticket/12930
if ( is_serialized( $data ) )
if ( is_serialized( $data, false ) )
return serialize( $data );
return $data;
@@ -1276,6 +1295,8 @@ function wp_original_referer_field( $echo = true, $jump_back_to = 'current' ) {
* @return string|bool False on failure. Referer URL on success.
*/
function wp_get_referer() {
if ( ! function_exists( 'wp_validate_redirect' ) )
return false;
$ref = false;
if ( ! empty( $_REQUEST['_wp_http_referer'] ) )
$ref = wp_unslash( $_REQUEST['_wp_http_referer'] );
@@ -1283,7 +1304,7 @@ function wp_get_referer() {
$ref = wp_unslash( $_SERVER['HTTP_REFERER'] );
if ( $ref && $ref !== wp_unslash( $_SERVER['REQUEST_URI'] ) )
return wp_unslash( $ref );
return wp_validate_redirect( $ref, false );
return false;
}
@@ -1297,8 +1318,8 @@ function wp_get_referer() {
* @return string|bool False if no original referer or original referer if set.
*/
function wp_get_original_referer() {
if ( !empty( $_REQUEST['_wp_original_http_referer'] ) )
return wp_unslash( $_REQUEST['_wp_original_http_referer'] );
if ( ! empty( $_REQUEST['_wp_original_http_referer'] ) && function_exists( 'wp_validate_redirect' ) )
return wp_validate_redirect( wp_unslash( $_REQUEST['_wp_original_http_referer'] ), false );
return false;
}
@@ -2006,10 +2027,20 @@ function wp_get_mime_types() {
* @uses apply_filters() Calls 'upload_mimes' on returned array
* @uses wp_get_upload_mime_types() to fetch the list of mime types
*
* @param int|WP_User $user Optional. User to check. Defaults to current user.
* @return array Array of mime types keyed by the file extension regex corresponding to those types.
*/
function get_allowed_mime_types() {
return apply_filters( 'upload_mimes', wp_get_mime_types() );
function get_allowed_mime_types( $user = null ) {
$t = wp_get_mime_types();
unset( $t['swf'], $t['exe'] );
if ( function_exists( 'current_user_can' ) )
$unfiltered = $user ? user_can( $user, 'unfiltered_html' ) : current_user_can( 'unfiltered_html' );
if ( empty( $unfiltered ) )
unset( $t['htm|html'] );
return apply_filters( 'upload_mimes', $t, $user );
}
/**

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -228,6 +228,16 @@
o.content = o.content.replace(/<p>(<br ?\/?>|\u00a0|\uFEFF)?<\/p>/g, '<p>&nbsp;</p>');
});
// Fix bug in iOS Safari where it's impossible to type after a touchstart event on the parent document.
// Happens after zooming in or out while the keyboard is open. See #25131.
if ( tinymce.isIOS5 ) {
ed.onKeyDown.add( function() {
if ( document.activeElement == document.body ) {
ed.getWin().focus();
}
});
}
ed.onSaveContent.add(function(ed, o) {
// If editor is hidden, we just want the textarea's value to be saved
if ( ed.isHidden() )

View File

@@ -2238,10 +2238,17 @@ function set_url_scheme( $url, $scheme = null ) {
$scheme = ( is_ssl() ? 'https' : 'http' );
}
if ( 'relative' == $scheme )
$url = preg_replace( '#^.+://[^/]*#', '', $url );
else
$url = preg_replace( '#^.+://#', $scheme . '://', $url );
$url = trim( $url );
if ( substr( $url, 0, 2 ) === '//' )
$url = 'http:' . $url;
if ( 'relative' == $scheme ) {
$url = ltrim( preg_replace( '#^\w+://[^/]*#', '', $url ) );
if ( $url !== '' && $url[0] === '/' )
$url = '/' . ltrim($url , "/ \t\n\r\0\x0B" );
} else {
$url = preg_replace( '#^\w+://#', $scheme . '://', $url );
}
return apply_filters( 'set_url_scheme', $url, $scheme, $orig_scheme );
}

View File

@@ -378,7 +378,10 @@ function is_email_address_unsafe( $user_email ) {
$is_email_address_unsafe = false;
if ( $banned_names && is_array( $banned_names ) ) {
list( $email_local_part, $email_domain ) = explode( '@', $user_email );
$banned_names = array_map( 'strtolower', $banned_names );
$normalized_email = strtolower( $user_email );
list( $email_local_part, $email_domain ) = explode( '@', $normalized_email );
foreach ( $banned_names as $banned_domain ) {
if ( ! $banned_domain )
@@ -390,7 +393,7 @@ function is_email_address_unsafe( $user_email ) {
}
$dotted_domain = ".$banned_domain";
if ( $dotted_domain === substr( $user_email, -strlen( $dotted_domain ) ) ) {
if ( $dotted_domain === substr( $normalized_email, -strlen( $dotted_domain ) ) ) {
$is_email_address_unsafe = true;
break;
}
@@ -898,10 +901,8 @@ function wpmu_create_user( $user_name, $password, $email ) {
if ( is_wp_error( $user_id ) )
return false;
$user = new WP_User( $user_id );
// Newly created users have no roles or caps until they are added to a blog.
delete_user_option( $user_id, $user->cap_key );
delete_user_option( $user_id, 'capabilities' );
delete_user_option( $user_id, 'user_level' );
do_action( 'wpmu_new_user', $user_id );

View File

@@ -942,6 +942,7 @@ if ( !function_exists('wp_validate_redirect') ) :
* @return string redirect-sanitized URL
**/
function wp_validate_redirect($location, $default = '') {
$location = trim( $location );
// browsers will assume 'http' is your protocol, and will obey a redirect to a URL starting with '//'
if ( substr($location, 0, 2) == '//' )
$location = 'http:' . $location;

View File

@@ -1428,31 +1428,5 @@ function wp_list_post_revisions( $post_id = 0, $type = 'all' ) {
echo "<ul class='post-revisions hide-if-no-js'>\n";
echo $rows;
// if the post was previously restored from a revision
// show the restore event details
if ( $restored_from_meta = get_post_meta( $post->ID, '_post_restored_from', true ) ) {
$author = get_user_by( 'id', $restored_from_meta[ 'restored_by_user' ] );
/* translators: revision date format, see http://php.net/date */
$datef = _x( 'j F, Y @ G:i:s', 'revision date format');
$date = date_i18n( $datef, strtotime( $restored_from_meta[ 'restored_time' ] ) );
$time_diff = human_time_diff( $restored_from_meta[ 'restored_time' ] ) ;
?>
<hr />
<div id="revisions-meta-restored">
<?php
printf(
/* translators: restored revision details: 1: gravatar image, 2: author name, 3: time ago, 4: date */
__( 'Previously restored by %1$s %2$s, %3$s ago (%4$s)' ),
get_avatar( $author->ID, 24 ),
$author->display_name,
$time_diff,
$date
);
?>
</div>
<?php
echo "</ul>";
}
echo "</ul>";
}

View File

@@ -1264,6 +1264,20 @@ function add_theme_support( $feature ) {
$args[0] = array_intersect( $args[0], array_keys( get_post_format_slugs() ) );
break;
case 'html5' :
// You can't just pass 'html5', you need to pass an array of types.
if ( empty( $args[0] ) ) {
$args = array( 0 => array( 'comment-list', 'comment-form', 'search-form' ) );
} elseif ( ! is_array( $args[0] ) ) {
_doing_it_wrong( "add_theme_support( 'html5' )", 'You need to pass an array of types.', '3.6.1' );
return false;
}
// Calling 'html5' again merges, rather than overwrites.
if ( isset( $_wp_theme_features['html5'] ) )
$args[0] = array_merge( $_wp_theme_features['html5'][0], $args[0] );
break;
case 'custom-header-uploads' :
return add_theme_support( 'custom-header', array( 'uploads' => true ) );
break;
@@ -1547,11 +1561,15 @@ function current_theme_supports( $feature ) {
return in_array( $content_type, $_wp_theme_features[$feature][0] );
break;
case 'html5':
case 'post-formats':
// specific post formats can be registered by passing an array of types to
// add_theme_support()
$post_format = $args[0];
return in_array( $post_format, $_wp_theme_features[$feature][0] );
// Specific areas of HTML5 support *must* be passed via an array to add_theme_support()
$type = $args[0];
return in_array( $type, $_wp_theme_features[$feature][0] );
break;
case 'custom-header':

View File

@@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '3.6';
$wp_version = '3.6.2-alpha';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
@@ -18,7 +18,7 @@ $wp_db_version = 24448;
*
* @global string $tinymce_version
*/
$tinymce_version = '358-24485';
$tinymce_version = '358-25336';
/**
* Holds the required PHP version