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/clone/wp-conte.../plugins/wordpres.../src/analytic.../user-int...
File: last-completed-indexation-integration.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace Yoast\WP\SEO\Analytics\User_Interface;
[2] Fix | Delete
[3] Fix | Delete
use Yoast\WP\SEO\Conditionals\No_Conditionals;
[4] Fix | Delete
use Yoast\WP\SEO\Helpers\Options_Helper;
[5] Fix | Delete
use Yoast\WP\SEO\Integrations\Integration_Interface;
[6] Fix | Delete
[7] Fix | Delete
/**
[8] Fix | Delete
* Handles setting a timestamp when the indexation of a specific indexation action is completed.
[9] Fix | Delete
*/
[10] Fix | Delete
class Last_Completed_Indexation_Integration implements Integration_Interface {
[11] Fix | Delete
[12] Fix | Delete
use No_Conditionals;
[13] Fix | Delete
[14] Fix | Delete
/**
[15] Fix | Delete
* The options helper.
[16] Fix | Delete
*
[17] Fix | Delete
* @var Options_Helper The options helper.
[18] Fix | Delete
*/
[19] Fix | Delete
private $options_helper;
[20] Fix | Delete
[21] Fix | Delete
/**
[22] Fix | Delete
* The constructor.
[23] Fix | Delete
*
[24] Fix | Delete
* @param Options_Helper $options_helper The options helper.
[25] Fix | Delete
*/
[26] Fix | Delete
public function __construct( Options_Helper $options_helper ) {
[27] Fix | Delete
$this->options_helper = $options_helper;
[28] Fix | Delete
}
[29] Fix | Delete
[30] Fix | Delete
/**
[31] Fix | Delete
* Registers action hook to maybe save an option.
[32] Fix | Delete
*
[33] Fix | Delete
* @return void
[34] Fix | Delete
*/
[35] Fix | Delete
public function register_hooks(): void {
[36] Fix | Delete
\add_action(
[37] Fix | Delete
'wpseo_indexables_unindexed_calculated',
[38] Fix | Delete
[
[39] Fix | Delete
$this,
[40] Fix | Delete
'maybe_set_indexables_unindexed_calculated',
[41] Fix | Delete
],
[42] Fix | Delete
10,
[43] Fix | Delete
2
[44] Fix | Delete
);
[45] Fix | Delete
}
[46] Fix | Delete
[47] Fix | Delete
/**
[48] Fix | Delete
* Saves a timestamp option when there are no unindexed indexables.
[49] Fix | Delete
*
[50] Fix | Delete
* @param string $indexable_name The name of the indexable that is being checked.
[51] Fix | Delete
* @param int $count The amount of missing indexables.
[52] Fix | Delete
*
[53] Fix | Delete
* @return void
[54] Fix | Delete
*/
[55] Fix | Delete
public function maybe_set_indexables_unindexed_calculated( string $indexable_name, int $count ): void {
[56] Fix | Delete
if ( $count === 0 ) {
[57] Fix | Delete
$no_index = $this->options_helper->get( 'last_known_no_unindexed', [] );
[58] Fix | Delete
$no_index[ $indexable_name ] = \time();
[59] Fix | Delete
$this->options_helper->set( 'last_known_no_unindexed', $no_index );
[60] Fix | Delete
}
[61] Fix | Delete
}
[62] Fix | Delete
}
[63] Fix | Delete
[64] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function