Yoast\WP\SEO\Config
Badge_Group_Names::is_still_eligible_for_new_badge()
Check whether a group of badges is still eligible for a "new" badge.
Метод класса: Badge_Group_Names{}
Хуков нет.
Возвращает
true|false
. Whether a group of badges is still eligible for a "new" badge.
Использование
$Badge_Group_Names = new Badge_Group_Names(); $Badge_Group_Names->is_still_eligible_for_new_badge( $group, $current_version );
- $group(строка) (обязательный)
- One of the GROUP_* constants.
- $current_version(строка|null)
- The current version of the plugin that's being checked.
По умолчанию: null
Код Badge_Group_Names::is_still_eligible_for_new_badge() Badge Group Names::is still eligible for new badge Yoast 24.6
public function is_still_eligible_for_new_badge( $group, $current_version = null ) { if ( ! \array_key_exists( $group, $this::GROUP_NAMES ) ) { return false; } $group_version = $this::GROUP_NAMES[ $group ]; if ( \is_null( $current_version ) ) { $current_version = $this->version; } return (bool) \version_compare( $group_version, $current_version, '>' ); }