Yoast\WP\SEO\Actions\Wincher
Wincher_Keyphrases_Action::would_exceed_limits()
Determines whether the amount of keyphrases would mean the user exceeds their account limits.
Метод класса: Wincher_Keyphrases_Action{}
Хуков нет.
Возвращает
true|false
. Whether the limit is exceeded.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->would_exceed_limits( $keyphrases, $limits );
- $keyphrases(строка|массив) (обязательный)
- The keyphrases to be added.
- $limits(объект) (обязательный)
- The current account limits.
Код Wincher_Keyphrases_Action::would_exceed_limits() Wincher Keyphrases Action::would exceed limits Yoast 24.9
protected function would_exceed_limits( $keyphrases, $limits ) { if ( ! \is_array( $keyphrases ) ) { $keyphrases = [ $keyphrases ]; } if ( $limits->limit === null ) { return false; } return ( \count( $keyphrases ) + $limits->usage ) > $limits->limit; }