Update WP and plugins

This commit is contained in:
Oliver Davies 2019-04-16 20:56:22 +01:00
parent 10a4713229
commit 1fb77fc4ff
864 changed files with 101724 additions and 78262 deletions

View file

@ -50,7 +50,6 @@ class Automatic_Upgrader_Skin extends WP_Upgrader_Skin {
}
/**
*
* @return array
*/
public function get_upgrade_messages() {
@ -58,7 +57,6 @@ class Automatic_Upgrader_Skin extends WP_Upgrader_Skin {
}
/**
*
* @param string|array|WP_Error $data
*/
public function feedback( $data ) {
@ -69,30 +67,36 @@ class Automatic_Upgrader_Skin extends WP_Upgrader_Skin {
} else {
$string = $data;
}
if ( ! empty( $this->upgrader->strings[ $string ] ) )
if ( ! empty( $this->upgrader->strings[ $string ] ) ) {
$string = $this->upgrader->strings[ $string ];
}
if ( strpos( $string, '%' ) !== false ) {
$args = func_get_args();
$args = array_splice( $args, 1 );
if ( ! empty( $args ) )
if ( ! empty( $args ) ) {
$string = vsprintf( $string, $args );
}
}
$string = trim( $string );
// Only allow basic HTML in the messages, as it'll be used in emails/logs rather than direct browser output.
$string = wp_kses( $string, array(
'a' => array(
'href' => true
),
'br' => true,
'em' => true,
'strong' => true,
) );
$string = wp_kses(
$string,
array(
'a' => array(
'href' => true,
),
'br' => true,
'em' => true,
'strong' => true,
)
);
if ( empty( $string ) )
if ( empty( $string ) ) {
return;
}
$this->messages[] = $string;
}
@ -107,7 +111,8 @@ class Automatic_Upgrader_Skin extends WP_Upgrader_Skin {
*/
public function footer() {
$output = ob_get_clean();
if ( ! empty( $output ) )
if ( ! empty( $output ) ) {
$this->feedback( $output );
}
}
}