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.../public_h.../wp-conte.../plugins/wordpres.../src/integrat.../admin
File: migration-error-integration.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace Yoast\WP\SEO\Integrations\Admin;
[2] Fix | Delete
[3] Fix | Delete
use Yoast\WP\SEO\Conditionals\Admin_Conditional;
[4] Fix | Delete
use Yoast\WP\SEO\Config\Migration_Status;
[5] Fix | Delete
use Yoast\WP\SEO\Integrations\Integration_Interface;
[6] Fix | Delete
use Yoast\WP\SEO\Presenters\Admin\Migration_Error_Presenter;
[7] Fix | Delete
[8] Fix | Delete
/**
[9] Fix | Delete
* Migration_Error_Integration class.
[10] Fix | Delete
*/
[11] Fix | Delete
class Migration_Error_Integration implements Integration_Interface {
[12] Fix | Delete
[13] Fix | Delete
/**
[14] Fix | Delete
* The migration status object.
[15] Fix | Delete
*
[16] Fix | Delete
* @var Migration_Status
[17] Fix | Delete
*/
[18] Fix | Delete
protected $migration_status;
[19] Fix | Delete
[20] Fix | Delete
/**
[21] Fix | Delete
* {@inheritDoc}
[22] Fix | Delete
*/
[23] Fix | Delete
public static function get_conditionals() {
[24] Fix | Delete
return [ Admin_Conditional::class ];
[25] Fix | Delete
}
[26] Fix | Delete
[27] Fix | Delete
/**
[28] Fix | Delete
* Migration_Error_Integration constructor.
[29] Fix | Delete
*
[30] Fix | Delete
* @param Migration_Status $migration_status The migration status object.
[31] Fix | Delete
*/
[32] Fix | Delete
public function __construct( Migration_Status $migration_status ) {
[33] Fix | Delete
$this->migration_status = $migration_status;
[34] Fix | Delete
}
[35] Fix | Delete
[36] Fix | Delete
/**
[37] Fix | Delete
* {@inheritDoc}
[38] Fix | Delete
*/
[39] Fix | Delete
public function register_hooks() {
[40] Fix | Delete
if ( $this->migration_status->get_error( 'free' ) === false ) {
[41] Fix | Delete
return;
[42] Fix | Delete
}
[43] Fix | Delete
[44] Fix | Delete
\add_action( 'admin_notices', [ $this, 'render_migration_error' ] );
[45] Fix | Delete
}
[46] Fix | Delete
[47] Fix | Delete
/**
[48] Fix | Delete
* Renders the migration error.
[49] Fix | Delete
*
[50] Fix | Delete
* @return void
[51] Fix | Delete
*/
[52] Fix | Delete
public function render_migration_error() {
[53] Fix | Delete
// phpcs:ignore WordPress.Security.EscapeOutput -- The Migration_Error_Presenter already escapes it's output.
[54] Fix | Delete
echo new Migration_Error_Presenter( $this->migration_status->get_error( 'free' ) );
[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