= $cap ) { break; } $text = sanitize_text_field( (string) $item ); $text = trim( $text ); if ( '' === $text ) { continue; } $dedupe_key = function_exists( 'mb_strtolower' ) ? mb_strtolower( $text ) : strtolower( $text ); if ( isset( $seen[ $dedupe_key ] ) ) { continue; } $seen[ $dedupe_key ] = true; $clean[] = $text; } return $clean; } /** * How many secondary keywords the CURRENT site is allowed to write. * Zero on free/unlicensed — existing stored data is untouched by that * (see class docblock), only new writes are capped. * * @return int */ protected static function write_cap(): int { if ( ! ABDS_SEO_License_Accessor::gate()->allows( ABDS_SEO_Feature_Map::FEATURE_MULTI_KEYWORD ) ) { return 0; } return ABDS_SEO_Content_Analyzer::MAX_SECONDARY_KEYWORDS; } }