Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/wordpres.../src/integrat.../watchers
File: auto-update-watcher.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace Yoast\WP\SEO\Integrations\Watchers;
[2] Fix | Delete
[3] Fix | Delete
use Yoast\WP\SEO\Conditionals\No_Conditionals;
[4] Fix | Delete
use Yoast\WP\SEO\Integrations\Integration_Interface;
[5] Fix | Delete
use Yoast_Notification_Center;
[6] Fix | Delete
[7] Fix | Delete
/**
[8] Fix | Delete
* Shows a notification for users who have WordPress auto updates enabled but not Yoast SEO auto updates.
[9] Fix | Delete
*/
[10] Fix | Delete
class Auto_Update_Watcher implements Integration_Interface {
[11] Fix | Delete
[12] Fix | Delete
use No_Conditionals;
[13] Fix | Delete
[14] Fix | Delete
/**
[15] Fix | Delete
* The notification ID.
[16] Fix | Delete
*/
[17] Fix | Delete
public const NOTIFICATION_ID = 'wpseo-auto-update';
[18] Fix | Delete
[19] Fix | Delete
/**
[20] Fix | Delete
* The Yoast notification center.
[21] Fix | Delete
*
[22] Fix | Delete
* @var Yoast_Notification_Center
[23] Fix | Delete
*/
[24] Fix | Delete
protected $notification_center;
[25] Fix | Delete
[26] Fix | Delete
/**
[27] Fix | Delete
* Auto_Update constructor.
[28] Fix | Delete
*
[29] Fix | Delete
* @param Yoast_Notification_Center $notification_center The notification center.
[30] Fix | Delete
*/
[31] Fix | Delete
public function __construct( Yoast_Notification_Center $notification_center ) {
[32] Fix | Delete
$this->notification_center = $notification_center;
[33] Fix | Delete
}
[34] Fix | Delete
[35] Fix | Delete
/**
[36] Fix | Delete
* Initializes the integration.
[37] Fix | Delete
*
[38] Fix | Delete
* On admin_init, it is checked whether the notification to auto-update Yoast SEO needs to be shown or removed.
[39] Fix | Delete
* This is also done when major WP core updates are being enabled or disabled,
[40] Fix | Delete
* and when automatic updates for Yoast SEO are being enabled or disabled.
[41] Fix | Delete
*
[42] Fix | Delete
* @return void
[43] Fix | Delete
*/
[44] Fix | Delete
public function register_hooks() {
[45] Fix | Delete
\add_action( 'admin_init', [ $this, 'remove_notification' ] );
[46] Fix | Delete
}
[47] Fix | Delete
[48] Fix | Delete
/**
[49] Fix | Delete
* Removes the notification from the notification center, if it exists.
[50] Fix | Delete
*
[51] Fix | Delete
* @return void
[52] Fix | Delete
*/
[53] Fix | Delete
public function remove_notification() {
[54] Fix | Delete
$this->notification_center->remove_notification_by_id( self::NOTIFICATION_ID );
[55] Fix | Delete
}
[56] Fix | Delete
}
[57] Fix | Delete
[58] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function