Commit 3c8e48c5 authored by lucha's avatar lucha
Browse files

Wordpress 4.7.1

parent b418a265
WordPress - Web publishing software
Copyright 2011-2016 by the contributors
Copyright 2011-2017 by the contributors
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......
......@@ -43,6 +43,14 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
<a href="freedoms.php" class="nav-tab"><?php _e( 'Freedoms' ); ?></a>
</h2>
<div class="changelog point-releases">
<h3><?php _e( 'Maintenance and Security Release' ); ?></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.', 62 ), '4.7.1', number_format_i18n( 62 ) ); ?>
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.7.1' ); ?>
</p>
</div>
<div class="headline-feature feature-video">
<iframe width="1050" height="591" src="<?php echo esc_url( $video_url ); ?>" frameborder="0" allowfullscreen></iframe>
<script src="https://videopress.com/videopress-iframe.js"></script>
......
......@@ -811,7 +811,6 @@ li.assigned-to-menu-location .add-new-menu-item {
.menu-delete:hover,
.menu-delete:focus {
color: #f00;
text-decoration: none;
}
.menu-item-handle {
......
......@@ -811,7 +811,6 @@ li.assigned-to-menu-location .add-new-menu-item {
.menu-delete:hover,
.menu-delete:focus {
color: #f00;
text-decoration: none;
}
.menu-item-handle {
......
This diff is collapsed.
......@@ -1229,6 +1229,7 @@ table.links-table {
}
.focus-on .wrap > h1,
.focus-on .page-title-action,
.focus-on #wpfooter,
.focus-on .postbox-container > *,
.focus-on div.updated,
......@@ -1252,6 +1253,7 @@ table.links-table {
}
.focus-off .wrap > h1,
.focus-off .page-title-action,
.focus-off #wpfooter,
.focus-off .postbox-container > *,
.focus-off div.updated,
......
This diff is collapsed.
......@@ -1229,6 +1229,7 @@ table.links-table {
}
.focus-on .wrap > h1,
.focus-on .page-title-action,
.focus-on #wpfooter,
.focus-on .postbox-container > *,
.focus-on div.updated,
......@@ -1252,6 +1253,7 @@ table.links-table {
}
.focus-off .wrap > h1,
.focus-off .page-title-action,
.focus-off #wpfooter,
.focus-off .postbox-container > *,
.focus-off div.updated,
......
This diff is collapsed.
......@@ -81,7 +81,7 @@ case 'add-tag':
$ret = wp_insert_term( $_POST['tag-name'], $taxonomy, $_POST );
if ( $ret && !is_wp_error( $ret ) )
$location = add_query_arg( 'message', 1, $location );
$location = add_query_arg( 'message', 1, $referer );
else
$location = add_query_arg( array( 'error' => true, 'message' => 4 ), $referer );
......
......@@ -915,7 +915,8 @@ final class WP_Screen {
switch ( $this->base ) {
case 'widgets':
$this->_screen_settings = '<p><a id="access-on" href="widgets.php?widgets-access=on">' . __('Enable accessibility mode') . '</a><a id="access-off" href="widgets.php?widgets-access=off">' . __('Disable accessibility mode') . "</a></p>\n";
$nonce = wp_create_nonce( 'widgets-access' );
$this->_screen_settings = '<p><a id="access-on" href="widgets.php?widgets-access=on&_wpnonce=' . urlencode( $nonce ) . '">' . __('Enable accessibility mode') . '</a><a id="access-off" href="widgets.php?widgets-access=off&_wpnonce=' . urlencode( $nonce ) . '">' . __('Disable accessibility mode') . "</a></p>\n";
break;
case 'post' :
$expand = '<fieldset class="editor-expand hidden"><legend>' . __( 'Additional settings' ) . '</legend><label for="editor-expand-toggle">';
......
......@@ -221,14 +221,28 @@ function wp_generate_attachment_metadata( $attachment_id, $file ) {
$fallback_sizes = apply_filters( 'fallback_intermediate_image_sizes', $fallback_sizes, $metadata );
$sizes = array();
$_wp_additional_image_sizes = wp_get_additional_image_sizes();
foreach ( $fallback_sizes as $s ) {
$sizes[ $s ]['width'] = get_option( "{$s}_size_w" );
$sizes[ $s ]['height'] = get_option( "{$s}_size_h" );
if ( isset( $_wp_additional_image_sizes[ $s ]['width'] ) ) {
$sizes[ $s ]['width'] = intval( $_wp_additional_image_sizes[ $s ]['width'] );
} else {
$sizes[ $s ]['width'] = get_option( "{$s}_size_w" );
}
if ( isset( $_wp_additional_image_sizes[ $s ]['height'] ) ) {
$sizes[ $s ]['height'] = intval( $_wp_additional_image_sizes[ $s ]['height'] );
} else {
$sizes[ $s ]['height'] = get_option( "{$s}_size_h" );
}
// Force thumbnails to be soft crops.
if ( ! 'thumbnail' === $s ) {
$sizes[ $s ]['crop'] = get_option( "{$s}_crop" );
if ( isset( $_wp_additional_image_sizes[ $s ]['crop'] ) ) {
$sizes[ $s ]['crop'] = $_wp_additional_image_sizes[ $s ]['crop'];
} else {
// Force thumbnails to be soft crops.
if ( ! 'thumbnail' === $s ) {
$sizes[ $s ]['crop'] = get_option( "{$s}_crop" );
}
}
}
......
......@@ -1154,35 +1154,6 @@ function wp_edit_attachments_query_vars( $q = false ) {
return $q;
}
/**
* Filter the SQL clauses of an attachment query to include filenames.
*
* @since 4.7.0
* @access private
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param array $clauses An array including WHERE, GROUP BY, JOIN, ORDER BY,
* DISTINCT, fields (SELECT), and LIMITS clauses.
* @return array The modified clauses.
*/
function _filter_query_attachment_filenames( $clauses ) {
global $wpdb;
remove_filter( 'posts_clauses', __FUNCTION__ );
// Add a LEFT JOIN of the postmeta table so we don't trample existing JOINs.
$clauses['join'] .= " LEFT JOIN {$wpdb->postmeta} AS sq1 ON ( {$wpdb->posts}.ID = sq1.post_id AND sq1.meta_key = '_wp_attached_file' )";
$clauses['groupby'] = "{$wpdb->posts}.ID";
$clauses['where'] = preg_replace(
"/\({$wpdb->posts}.post_content (NOT LIKE|LIKE) (\'[^']+\')\)/",
"$0 OR ( sq1.meta_value $1 $2 )",
$clauses['where'] );
return $clauses;
}
/**
* Executes a query for attachments. An array of WP_Query arguments
* can be passed in, which will override the arguments set by this function.
......
......@@ -5300,7 +5300,7 @@
} );
$textarea.on( 'keydown', function onKeydown( event ) {
var selectionStart, selectionEnd, value, scroll, tabKeyCode = 9, escKeyCode = 27;
var selectionStart, selectionEnd, value, tabKeyCode = 9, escKeyCode = 27;
if ( escKeyCode === event.keyCode ) {
if ( ! $textarea.data( 'next-tab-blurs' ) ) {
......@@ -5325,10 +5325,8 @@
value = textarea.value;
if ( selectionStart >= 0 ) {
scroll = $textarea.scrollTop;
textarea.value = value.substring( 0, selectionStart ).concat( '\t', value.substring( selectionEnd ) );
$textarea.selectionStart = textarea.selectionEnd = selectionStart + 1;
textarea.scrollTop = scroll;
}
event.stopPropagation();
......@@ -5367,16 +5365,20 @@
// Focus on the control that is associated with the given setting.
api.previewer.bind( 'focus-control-for-setting', function( settingId ) {
var matchedControl;
var matchedControls = [];
api.control.each( function( control ) {
var settingIds = _.pluck( control.settings, 'id' );
if ( -1 !== _.indexOf( settingIds, settingId ) ) {
matchedControl = control;
matchedControls.push( control );
}
} );
if ( matchedControl ) {
matchedControl.focus();
// Focus on the matched control with the lowest priority (appearing higher).
if ( matchedControls.length ) {
matchedControls.sort( function( a, b ) {
return a.priority() - b.priority();
} );
matchedControls[0].focus();
}
} );
......
This diff is collapsed.
......@@ -1169,7 +1169,11 @@
// @todo It would be better if this was added directly on the setting itself, as opposed to the control.
control.setting.validate = function( value ) {
return parseInt( value, 10 );
if ( '' === value ) {
return 0;
} else {
return parseInt( value, 10 );
}
};
// Edit menu button.
......
This diff is collapsed.
......@@ -806,7 +806,7 @@ themes.view.Details = wp.Backbone.View.extend({
$( document ).one( 'wp-theme-delete-success', function( event, response ) {
_this.$el.find( '.close' ).trigger( 'click' );
$( '[data-slug="' + response.slug + '"' ).css( { backgroundColor:'#faafaa' } ).fadeOut( 350, function() {
$( '[data-slug="' + response.slug + '"]' ).css( { backgroundColor:'#faafaa' } ).fadeOut( 350, function() {
$( this ).remove();
_themes.data.themes = _.without( _themes.data.themes, _.findWhere( _themes.data.themes, { id: response.slug } ) );
......
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment