Yoast\WP\SEO\Helpers

Import_Cursor_Helper::set_cursor()publicYoast 1.0

Stores the current cursor value.

Метод класса: Import_Cursor_Helper{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$Import_Cursor_Helper = new Import_Cursor_Helper();
$Import_Cursor_Helper->set_cursor( $cursor_id, $last_imported_id );
$cursor_id(строка) (обязательный)
The cursor id.
$last_imported_id(int) (обязательный)
The id of the lastly imported entry.

Код Import_Cursor_Helper::set_cursor() Yoast 22.4

public function set_cursor( $cursor_id, $last_imported_id ) {
	$current_cursors = $this->options->get( 'import_cursors', [] );

	if ( ! isset( $current_cursors[ $cursor_id ] ) || $current_cursors[ $cursor_id ] < $last_imported_id ) {
		$current_cursors[ $cursor_id ] = $last_imported_id;
		$this->options->set( 'import_cursors', $current_cursors );
	}
}