Yoast\WP\SEO\Introductions\Infrastructure
Introductions_Seen_Repository::is_introduction_seen()
Retrieves whether an introduction is seen.
Метод класса: Introductions_Seen_Repository{}
Хуков нет.
Возвращает
true|false
. Whether the introduction is seen.
Использование
$Introductions_Seen_Repository = new Introductions_Seen_Repository(); $Introductions_Seen_Repository->is_introduction_seen( $user_id, $introduction_id ): bool;
- $user_id(int) (обязательный)
- User ID.
- $introduction_id(строка) (обязательный)
- The introduction ID.
Код Introductions_Seen_Repository::is_introduction_seen() Introductions Seen Repository::is introduction seen Yoast 24.4
public function is_introduction_seen( $user_id, string $introduction_id ): bool { $introductions = $this->get_all_introductions( $user_id ); if ( \array_key_exists( $introduction_id, $introductions ) ) { return (bool) $introductions[ $introduction_id ]; } return false; }