Update WordPress to latest.

parent d12f0846
......@@ -1322,7 +1322,7 @@ ul.cat-checklist {
.plugins .paused .error-display code {
font-size: 90%;
font-style: italic;
color: rgb( 0, 0, 0, 0.7 );
color: rgba( 0, 0, 0, 0.7 );
}
.plugins .resume-link {
......
This diff is collapsed.
......@@ -1321,7 +1321,7 @@ ul.cat-checklist {
.plugins .paused .error-display code {
font-size: 90%;
font-style: italic;
color: rgb( 0, 0, 0, 0.7 );
color: rgba( 0, 0, 0, 0.7 );
}
.plugins .resume-link {
......
This diff is collapsed.
......@@ -9,7 +9,7 @@
* Complie libssh2 (Note: Only 0.14 is officaly working with PHP 5.2.6+ right now, But many users have found the latest versions work)
*
* cd /usr/src
* wget http://surfnet.dl.sourceforge.net/sourceforge/libssh2/libssh2-0.14.tar.gz
* wget https://www.libssh2.org/download/libssh2-0.14.tar.gz
* tar -zxvf libssh2-0.14.tar.gz
* cd libssh2-0.14/
* ./configure
......
......@@ -251,7 +251,7 @@ class WP_List_Table {
* @abstract
*/
public function ajax_user_can() {
die( 'function WP_List_Table::ajax_user_can() must be over-ridden in a sub-class.' );
die( 'function WP_List_Table::ajax_user_can() must be overridden in a subclass.' );
}
/**
......@@ -263,7 +263,7 @@ class WP_List_Table {
* @abstract
*/
public function prepare_items() {
die( 'function WP_List_Table::prepare_items() must be over-ridden in a sub-class.' );
die( 'function WP_List_Table::prepare_items() must be overridden in a subclass.' );
}
/**
......@@ -631,12 +631,15 @@ class WP_List_Table {
<div class="view-switch">
<?php
foreach ( $this->modes as $mode => $title ) {
$classes = array( 'view-' . $mode );
$classes = array( 'view-' . $mode );
$aria_current = '';
if ( $current_mode === $mode ) {
$classes[] = 'current';
$classes[] = 'current';
$aria_current = ' aria-current="page"';
}
printf(
"<a href='%s' class='%s' id='view-switch-$mode'><span class='screen-reader-text'>%s</span></a>\n",
"<a href='%s' class='%s' id='view-switch-$mode'$aria_current><span class='screen-reader-text'>%s</span></a>\n",
esc_url( add_query_arg( 'mode', $mode ) ),
implode( ' ', $classes ),
$title
......@@ -931,7 +934,7 @@ class WP_List_Table {
* @return array
*/
public function get_columns() {
die( 'function WP_List_Table::get_columns() must be over-ridden in a sub-class.' );
die( 'function WP_List_Table::get_columns() must be overridden in a subclass.' );
}
/**
......
......@@ -78,7 +78,7 @@ function _wp_credits_build_object_link( &$data ) {
}
/**
* Display a the title for a given group of contributors.
* Displays the title for a given group of contributors.
*
* @since 5.3.0
*
......@@ -106,7 +106,7 @@ function wp_credits_section_title( $group_data = array() ) {
}
/**
* Display a list of contributors for a given group.
* Displays a list of contributors for a given group.
*
* @since 5.3.0
*
......
......@@ -3500,7 +3500,7 @@
control.params = _.extend(
{},
control.defaults,
control.params || {}, // In case sub-class already defines.
control.params || {}, // In case subclass already defines.
options.params || options || {} // The options.params property is deprecated, but it is checked first for back-compat.
);
......
......@@ -417,10 +417,6 @@ wp.mediaWidgets = ( function( $ ) {
}).render();
this.content.set( view );
if ( ! wp.media.isTouchDevice ) {
view.url.focus();
}
}
});
......
This diff is collapsed.
......@@ -86,7 +86,7 @@ $gmt_time = microtime( true );
// The cron lock: a unix timestamp from when the cron was spawned.
$doing_cron_transient = get_transient( 'doing_cron' );
// Use global $doing_wp_cron lock otherwise use the GET lock. If no lock, trying grabbing a new lock.
// Use global $doing_wp_cron lock, otherwise use the GET lock. If no lock, try to grab a new lock.
if ( empty( $doing_wp_cron ) ) {
if ( empty( $_GET['doing_wp_cron'] ) ) {
// Called from external script/job. Try setting a lock.
......
......@@ -550,16 +550,19 @@ class WP_Admin_Bar {
if ( $has_link ) {
$attributes = array( 'onclick', 'target', 'title', 'rel', 'lang', 'dir' );
echo "<a class='ab-item'$aria_attributes href='" . esc_url( $node->href ) . "'";
if ( ! empty( $node->meta['onclick'] ) ) {
echo ' onclick="' . esc_js( $node->meta['onclick'] ) . '"';
}
} else {
$attributes = array( 'onclick', 'target', 'title', 'rel', 'lang', 'dir' );
echo '<div class="ab-item ab-empty-item"' . $aria_attributes;
}
foreach ( $attributes as $attribute ) {
if ( ! empty( $node->meta[ $attribute ] ) ) {
if ( empty( $node->meta[ $attribute ] ) ) {
continue;
}
if ( 'onclick' === $attribute ) {
echo " $attribute='" . esc_js( $node->meta[ $attribute ] ) . "'";
} else {
echo " $attribute='" . esc_attr( $node->meta[ $attribute ] ) . "'";
}
}
......
......@@ -75,7 +75,8 @@ final class _WP_Editors {
* @see _WP_Editors::parse_settings()
*
* @param array $settings Array of editor arguments.
* @param string $editor_id ID for the current editor instance.
* @param string $editor_id ID for the current editor instance. Accepts 'classic-block'
* when called from block editor's Classic block.
*/
$settings = apply_filters( 'wp_editor_settings', $settings, $editor_id );
......@@ -375,11 +376,24 @@ final class _WP_Editors {
* Filters the list of teenyMCE plugins.
*
* @since 2.7.0
* @since 3.3.0 The `$editor_id` parameter was added.
*
* @param array $plugins An array of teenyMCE plugins.
* @param string $editor_id Unique editor identifier, e.g. 'content'.
*/
$plugins = apply_filters( 'teeny_mce_plugins', array( 'colorpicker', 'lists', 'fullscreen', 'image', 'wordpress', 'wpeditimage', 'wplink' ), $editor_id );
$plugins = apply_filters(
'teeny_mce_plugins',
array(
'colorpicker',
'lists',
'fullscreen',
'image',
'wordpress',
'wpeditimage',
'wplink',
),
$editor_id
);
} else {
/**
......@@ -396,10 +410,13 @@ final class _WP_Editors {
* one of the 'mce_buttons' filters.
*
* @since 2.5.0
* @since 5.3.0 The `$editor_id` parameter was added.
*
* @param array $external_plugins An array of external TinyMCE plugins.
* @param array $external_plugins An array of external TinyMCE plugins.
* @param string $editor_id Unique editor identifier, e.g. 'content'. Accepts 'classic-block'
* when called from block editor's Classic block.
*/
$mce_external_plugins = apply_filters( 'mce_external_plugins', array() );
$mce_external_plugins = apply_filters( 'mce_external_plugins', array(), $editor_id );
$plugins = array(
'charmap',
......@@ -433,10 +450,13 @@ final class _WP_Editors {
* in WordPress should be added to the TinyMCE instance.
*
* @since 3.3.0
* @since 5.3.0 The `$editor_id` parameter was added.
*
* @param array $plugins An array of default TinyMCE plugins.
* @param array $plugins An array of default TinyMCE plugins.
* @param string $editor_id Unique editor identifier, e.g. 'content'. Accepts 'classic-block'
* when called from block editor's Classic block.
*/
$plugins = array_unique( apply_filters( 'tiny_mce_plugins', $plugins ) );
$plugins = array_unique( apply_filters( 'tiny_mce_plugins', $plugins, $editor_id ) );
$key = array_search( 'spellchecker', $plugins );
if ( false !== $key ) {
......@@ -457,10 +477,12 @@ final class _WP_Editors {
* and should define a variable ($strings) that holds all translated strings.
*
* @since 2.5.0
* @since 5.3.0 The `$editor_id` parameter was added.
*
* @param array $translations Translations for external TinyMCE plugins.
* @param array $translations Translations for external TinyMCE plugins.
* @param string $editor_id Unique editor identifier, e.g. 'content'.
*/
$mce_external_languages = apply_filters( 'mce_external_languages', array() );
$mce_external_languages = apply_filters( 'mce_external_languages', array(), $editor_id );
$loaded_langs = array();
$strings = '';
......@@ -577,12 +599,28 @@ final class _WP_Editors {
}
if ( $set['teeny'] ) {
$mce_buttons = array( 'bold', 'italic', 'underline', 'blockquote', 'strikethrough', 'bullist', 'numlist', 'alignleft', 'aligncenter', 'alignright', 'undo', 'redo', 'link', 'fullscreen' );
$mce_buttons = array(
'bold',
'italic',
'underline',
'blockquote',
'strikethrough',
'bullist',
'numlist',
'alignleft',
'aligncenter',
'alignright',
'undo',
'redo',
'link',
'fullscreen',
);
/**
* Filters the list of teenyMCE buttons (Text tab).
*
* @since 2.7.0
* @since 3.3.0 The `$editor_id` parameter was added.
*
* @param array $mce_buttons An array of teenyMCE buttons.
* @param string $editor_id Unique editor identifier, e.g. 'content'.
......@@ -592,7 +630,20 @@ final class _WP_Editors {
$mce_buttons_3 = array();
$mce_buttons_4 = array();
} else {
$mce_buttons = array( 'formatselect', 'bold', 'italic', 'bullist', 'numlist', 'blockquote', 'alignleft', 'aligncenter', 'alignright', 'link', 'wp_more', 'spellchecker' );
$mce_buttons = array(
'formatselect',
'bold',
'italic',
'bullist',
'numlist',
'blockquote',
'alignleft',
'aligncenter',
'alignright',
'link',
'wp_more',
'spellchecker',
);
if ( ! wp_is_mobile() ) {
if ( $set['_content_editor_dfw'] ) {
......@@ -610,13 +661,26 @@ final class _WP_Editors {
* Filters the first-row list of TinyMCE buttons (Visual tab).
*
* @since 2.0.0
* @since 3.3.0 The `$editor_id` parameter was added.
*
* @param array $mce_buttons First-row list of buttons.
* @param string $editor_id Unique editor identifier, e.g. 'content'.
* @param string $editor_id Unique editor identifier, e.g. 'content'. Accepts 'classic-block'
* when called from block editor's Classic block.
*/
$mce_buttons = apply_filters( 'mce_buttons', $mce_buttons, $editor_id );
$mce_buttons_2 = array( 'strikethrough', 'hr', 'forecolor', 'pastetext', 'removeformat', 'charmap', 'outdent', 'indent', 'undo', 'redo' );
$mce_buttons_2 = array(
'strikethrough',
'hr',
'forecolor',
'pastetext',
'removeformat',
'charmap',
'outdent',
'indent',
'undo',
'redo',
);
if ( ! wp_is_mobile() ) {
$mce_buttons_2[] = 'wp_help';
......@@ -626,9 +690,11 @@ final class _WP_Editors {
* Filters the second-row list of TinyMCE buttons (Visual tab).
*
* @since 2.0.0
* @since 3.3.0 The `$editor_id` parameter was added.
*
* @param array $mce_buttons_2 Second-row list of buttons.
* @param string $editor_id Unique editor identifier, e.g. 'content'.
* @param string $editor_id Unique editor identifier, e.g. 'content'. Accepts 'classic-block'
* when called from block editor's Classic block.
*/
$mce_buttons_2 = apply_filters( 'mce_buttons_2', $mce_buttons_2, $editor_id );
......@@ -636,9 +702,11 @@ final class _WP_Editors {
* Filters the third-row list of TinyMCE buttons (Visual tab).
*
* @since 2.0.0
* @since 3.3.0 The `$editor_id` parameter was added.
*
* @param array $mce_buttons_3 Third-row list of buttons.
* @param string $editor_id Unique editor identifier, e.g. 'content'.
* @param string $editor_id Unique editor identifier, e.g. 'content'. Accepts 'classic-block'
* when called from block editor's Classic block.
*/
$mce_buttons_3 = apply_filters( 'mce_buttons_3', array(), $editor_id );
......@@ -646,9 +714,11 @@ final class _WP_Editors {
* Filters the fourth-row list of TinyMCE buttons (Visual tab).
*
* @since 2.5.0
* @since 3.3.0 The `$editor_id` parameter was added.
*
* @param array $mce_buttons_4 Fourth-row list of buttons.
* @param string $editor_id Unique editor identifier, e.g. 'content'.
* @param string $editor_id Unique editor identifier, e.g. 'content'. Accepts 'classic-block'
* when called from block editor's Classic block.
*/
$mce_buttons_4 = apply_filters( 'mce_buttons_4', array(), $editor_id );
}
......@@ -716,6 +786,7 @@ final class _WP_Editors {
* Filters the teenyMCE config before init.
*
* @since 2.7.0
* @since 3.3.0 The `$editor_id` parameter was added.
*
* @param array $mceInit An array with teenyMCE config.
* @param string $editor_id Unique editor identifier, e.g. 'content'.
......@@ -727,9 +798,11 @@ final class _WP_Editors {
* Filters the TinyMCE config before init.
*
* @since 2.5.0
* @since 3.3.0 The `$editor_id` parameter was added.
*
* @param array $mceInit An array with TinyMCE config.
* @param string $editor_id Unique editor identifier, e.g. 'content'.
* @param string $editor_id Unique editor identifier, e.g. 'content'. Accepts 'classic-block'
* when called from block editor's Classic block.
*/
$mceInit = apply_filters( 'tiny_mce_before_init', $mceInit, $editor_id );
}
......
......@@ -30,7 +30,7 @@ abstract class WP_Image_Editor {
/**
* Checks to see if current environment supports the editor chosen.
* Must be overridden in a sub-class.
* Must be overridden in a subclass.
*
* @since 3.5.0
*
......@@ -45,7 +45,7 @@ abstract class WP_Image_Editor {
/**
* Checks to see if editor supports the mime-type specified.
* Must be overridden in a sub-class.
* Must be overridden in a subclass.
*
* @since 3.5.0
*
......
......@@ -30,12 +30,17 @@ final class WP_Taxonomy {
public $label;
/**
* An array of labels for this taxonomy.
* Labels object for this taxonomy.
*
* If not set, tag labels are inherited for non-hierarchical types
* and category labels for hierarchical ones.
*
* @see get_taxonomy_labels()
*
* @since 4.7.0
* @var object
*/
public $labels = array();
public $labels;
/**
* A short descriptive summary of what the taxonomy is for.
......
......@@ -101,7 +101,7 @@ class WP_Widget {
/**
* Echoes the widget content.
*
* Sub-classes should over-ride this function to generate their widget code.
* Subclasses should override this function to generate their widget code.
*
* @since 2.8.0
*
......@@ -110,7 +110,7 @@ class WP_Widget {
* @param array $instance The settings for the particular instance of the widget.
*/
public function widget( $args, $instance ) {
die( 'function WP_Widget::widget() must be over-ridden in a sub-class.' );
die( 'function WP_Widget::widget() must be overridden in a subclass.' );
}
/**
......
......@@ -6848,7 +6848,7 @@ class wp_xmlrpc_server extends IXR_Server {
$remote_ip = preg_replace( '/[^0-9a-fA-F:., ]/', '', $_SERVER['REMOTE_ADDR'] );
/** This filter is documented in wp-includes/class-http.php */
$user_agent = apply_filters( 'http_headers_useragent', 'WordPress/' . get_bloginfo( 'version' ) . '; ' . get_bloginfo( 'url' ), $url );
$user_agent = apply_filters( 'http_headers_useragent', 'WordPress/' . get_bloginfo( 'version' ) . '; ' . get_bloginfo( 'url' ), $pagelinkedfrom );
// Let's check the remote site
$http_api_args = array(
......
......@@ -7,7 +7,7 @@
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* http://odyniec.net/projects/imgareaselect/
* https://github.com/odyniec/imgareaselect
*
*/
......
......@@ -8758,8 +8758,12 @@ Settings = View.extend(/** @lends wp.media.view.Settings.prototype */{
// Handle button groups.
} else if ( $setting.hasClass('button-group') ) {
$buttons = $setting.find('button').removeClass('active');
$buttons.filter( '[value="' + value + '"]' ).addClass('active');
$buttons = $setting.find( 'button' )
.removeClass( 'active' )
.attr( 'aria-pressed', 'false' );
$buttons.filter( '[value="' + value + '"]' )
.addClass( 'active' )
.attr( 'aria-pressed', 'true' );
// Handle text inputs and textareas.
} else if ( $setting.is('input[type="text"], textarea') ) {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -318,7 +318,7 @@ function wp_print_media_templates() {
<a href="<?php echo esc_url( add_query_arg( 'mode', 'list', $_SERVER['REQUEST_URI'] ) ); ?>" class="view-list">
<span class="screen-reader-text"><?php _e( 'List View' ); ?></span>
</a>
<a href="<?php echo esc_url( add_query_arg( 'mode', 'grid', $_SERVER['REQUEST_URI'] ) ); ?>" class="view-grid current">
<a href="<?php echo esc_url( add_query_arg( 'mode', 'grid', $_SERVER['REQUEST_URI'] ) ); ?>" class="view-grid current" aria-current="page">
<span class="screen-reader-text"><?php _e( 'Grid View' ); ?></span>
</a>
</script>
......
......@@ -113,7 +113,7 @@ if ( ! class_exists( 'Translations', false ) ) :
* Here, in the base Translations class, the common logic for English is implemented:
* 0 if there is one element, 1 otherwise
*
* This function should be overridden by the sub-classes. For example MO/PO can derive the logic
* This function should be overridden by the subclasses. For example MO/PO can derive the logic
* from their headers.
*
* @param integer $count number of items
......
......@@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.4-alpha-46732';
$wp_version = '5.4-alpha-46750';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
......
......@@ -363,7 +363,8 @@ function wp_login_viewport_meta() {
* @return bool|WP_Error True: when finish. WP_Error on error
*/
function retrieve_password() {
$errors = new WP_Error();
$errors = new WP_Error();
$user_data = false;
if ( empty( $_POST['user_login'] ) || ! is_string( $_POST['user_login'] ) ) {
$errors->add( 'empty_username', __( '<strong>ERROR</strong>: Enter a username or email address.' ) );
......@@ -382,11 +383,13 @@ function retrieve_password() {
*
* @since 2.1.0
* @since 4.4.0 Added the `$errors` parameter.
* @since 5.4.0 Added the `$user_data` parameter.
*
* @param WP_Error $errors A WP_Error object containing any errors generated
* by using invalid credentials.
* @param WP_User|false WP_User object if found, false if the user does not exist.
*/
do_action( 'lostpassword_post', $errors );
do_action( 'lostpassword_post', $errors, $user_data );
if ( $errors->has_errors() ) {
return $errors;
......
Markdown is supported
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