: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
'<strong>{{{ data.name }}}</strong>'
/* translators: %s: Theme name. */
_x( '%s was successfully deleted.', 'theme' ),
'<strong>{{{ data.name }}}</strong>'
* Displays a notice when the user is in recovery mode.
function wp_recovery_mode_nag() {
if ( ! wp_is_recovery_mode() ) {
$url = add_query_arg( 'action', WP_Recovery_Mode::EXIT_ACTION, $url );
$url = wp_nonce_url( $url, WP_Recovery_Mode::EXIT_ACTION );
/* translators: %s: Recovery Mode exit link. */
__( 'You are in recovery mode. This means there may be an error with a theme or plugin. To exit recovery mode, log out or use the Exit button. <a href="%s">Exit Recovery Mode</a>' ),
wp_admin_notice( $message, array( 'type' => 'info' ) );
* Checks whether auto-updates are enabled.
* @param string $type The type of update being checked: Either 'theme' or 'plugin'.
* @return bool True if auto-updates are enabled for `$type`, false otherwise.
function wp_is_auto_update_enabled_for_type( $type ) {
if ( ! class_exists( 'WP_Automatic_Updater' ) ) {
require_once ABSPATH . 'wp-admin/includes/class-wp-automatic-updater.php';
$updater = new WP_Automatic_Updater();
$enabled = ! $updater->is_disabled();
* Filters whether plugins auto-update is enabled.
* @param bool $enabled True if plugins auto-update is enabled, false otherwise.
return apply_filters( 'plugins_auto_update_enabled', $enabled );
* Filters whether themes auto-update is enabled.
* @param bool $enabled True if themes auto-update is enabled, false otherwise.
return apply_filters( 'themes_auto_update_enabled', $enabled );
* Checks whether auto-updates are forced for an item.
* @param string $type The type of update being checked: Either 'theme' or 'plugin'.
* @param bool|null $update Whether to update. The value of null is internally used
* to detect whether nothing has hooked into this filter.
* @param object $item The update offer.
* @return bool True if auto-updates are forced for `$item`, false otherwise.
function wp_is_auto_update_forced_for_item( $type, $update, $item ) {
/** This filter is documented in wp-admin/includes/class-wp-automatic-updater.php */
return apply_filters( "auto_update_{$type}", $update, $item );
* Determines the appropriate auto-update message to be displayed.
* @return string The update message to be shown.
function wp_get_auto_update_message() {
$next_update_time = wp_next_scheduled( 'wp_version_check' );
// Check if the event exists.
if ( false === $next_update_time ) {
$message = __( 'Automatic update not scheduled. There may be a problem with WP-Cron.' );
$time_to_next_update = human_time_diff( (int) $next_update_time );
// See if cron is overdue.
$overdue = ( time() - $next_update_time ) > 0;
/* translators: %s: Duration that WP-Cron has been overdue. */
__( 'Automatic update overdue by %s. There may be a problem with WP-Cron.' ),
/* translators: %s: Time until the next update. */
__( 'Automatic update scheduled in %s.' ),