'Free', 'pro' => 'Pro', 'business' => 'Business', 'agency' => 'Agency', ); /** * Label + benefit per feature, as literal translatable strings so makepot * extracts them. A method (not a const) precisely so the __() calls are * real literals; the order here is the order the UI lists them. * * @return array */ public static function metadata(): array { return array( ABDS_SEO_Feature_Map::FEATURE_AI => array( 'label' => __( 'AI assistant (BYOK)', 'abds-seo' ), 'benefit' => __( 'Generate and improve titles, descriptions, and content with your own AI provider key.', 'abds-seo' ), ), ABDS_SEO_Feature_Map::FEATURE_RANK_TRACKING => array( 'label' => __( 'Position tracking', 'abds-seo' ), 'benefit' => __( 'Track keyword positions in Google and see how they change over time.', 'abds-seo' ), ), ABDS_SEO_Feature_Map::FEATURE_SERP => array( 'label' => __( 'Search results analysis (SERP)', 'abds-seo' ), 'benefit' => __( 'Analyze competitors in the search results and find content gaps.', 'abds-seo' ), ), ABDS_SEO_Feature_Map::FEATURE_GSC => array( 'label' => __( 'Google Search Console', 'abds-seo' ), 'benefit' => __( 'Real Google data — clicks, impressions, CTR — for traffic-based decisions.', 'abds-seo' ), ), ABDS_SEO_Feature_Map::FEATURE_DATAFORSEO => array( 'label' => __( 'Backlinks and keywords', 'abds-seo' ), 'benefit' => __( 'Backlink data and keyword volume and difficulty (DataForSEO).', 'abds-seo' ), ), ABDS_SEO_Feature_Map::FEATURE_CONTENT_DECAY => array( 'label' => __( 'Content at risk', 'abds-seo' ), 'benefit' => __( 'Spot pages losing traffic or positions while it can still be fixed.', 'abds-seo' ), ), ABDS_SEO_Feature_Map::FEATURE_INTERNAL_LINKS => array( 'label' => __( 'Internal links', 'abds-seo' ), 'benefit' => __( 'Find orphan pages and get internal-link suggestions.', 'abds-seo' ), ), ABDS_SEO_Feature_Map::FEATURE_CONTENT_GAPS => array( 'label' => __( 'Content gaps', 'abds-seo' ), 'benefit' => __( 'Find topics competitors cover in search results that your site does not.', 'abds-seo' ), ), ABDS_SEO_Feature_Map::FEATURE_MONTHLY_REPORT => array( 'label' => __( 'Monthly report', 'abds-seo' ), 'benefit' => __( 'A consolidated monthly report with period-over-period comparison, ready to print or export.', 'abds-seo' ), ), ABDS_SEO_Feature_Map::FEATURE_CRO => array( 'label' => __( 'Behavioral analytics (CRO)', 'abds-seo' ), 'benefit' => __( 'Click and scroll heatmaps and rage clicks — without cookies or personal data.', 'abds-seo' ), ), ABDS_SEO_Feature_Map::FEATURE_CTR_TEST => array( 'label' => __( 'Search-results CTR tests', 'abds-seo' ), 'benefit' => __( 'Test snippet variants sequentially and compare CTR using GSC data.', 'abds-seo' ), ), ABDS_SEO_Feature_Map::FEATURE_MULTI_KEYWORD => array( 'label' => __( 'Multiple keywords', 'abds-seo' ), 'benefit' => __( 'Score and track up to 5 keywords per page, not just one.', 'abds-seo' ), ), ABDS_SEO_Feature_Map::FEATURE_POPUPS => array( 'label' => __( 'Popup builder', 'abds-seo' ), 'benefit' => __( 'Collect leads with popups that have safeguards against SEO harm.', 'abds-seo' ), ), ABDS_SEO_Feature_Map::FEATURE_LOCAL_SEO => array( 'label' => __( 'Local SEO', 'abds-seo' ), 'benefit' => __( 'NAP consistency checking and LocalBusiness markup for local search.', 'abds-seo' ), ), ABDS_SEO_Feature_Map::FEATURE_WHITE_LABEL => array( 'label' => __( 'White-label reports', 'abds-seo' ), 'benefit' => __( 'Reports under your brand — logo, colors, and agency name.', 'abds-seo' ), ), ABDS_SEO_Feature_Map::FEATURE_AGENT_CABINET => array( 'label' => __( 'Agency cabinet', 'abds-seo' ), 'benefit' => __( 'A single cloud dashboard with an overview of all client sites.', 'abds-seo' ), ), ABDS_SEO_Feature_Map::FEATURE_TEAM_ACCESS => array( 'label' => __( 'Team access', 'abds-seo' ), 'benefit' => __( 'Invite team members and give clients view-only access.', 'abds-seo' ), ), ABDS_SEO_Feature_Map::FEATURE_ALERTS => array( 'label' => __( 'Alerts', 'abds-seo' ), 'benefit' => __( 'Automatic warnings about ranking drops and critical issues.', 'abds-seo' ), ), ); } /** * Label + benefit for what the FREE tier already includes — no gating * involved (every entry is always available), so this exists purely to * give the Settings screen's feature catalog (Stage 9.6, Block 3.3) * something to show alongside the locked Pro features: "here's * everything this plugin does," not just a wall of upsells with no * context for what's already unlocked. Order matches readme.txt's own * "Free features" list. * * @return array */ public static function free_metadata(): array { return array( array( 'label' => __( 'Technical SEO audit', 'abds-seo' ), 'benefit' => __( 'A background scanner checks every page — no external crawler required.', 'abds-seo' ), ), array( 'label' => __( 'Content analysis', 'abds-seo' ), 'benefit' => __( 'Focus-keyword density and placement, readability, and block-level recommendations right in the editor.', 'abds-seo' ), ), array( 'label' => __( 'Google snippet preview', 'abds-seo' ), 'benefit' => __( 'A pixel-accurate preview of how your title and description look in search results.', 'abds-seo' ), ), array( 'label' => __( 'Meta title, description and focus keyword', 'abds-seo' ), 'benefit' => __( 'One editor for the fields this plugin owns, with a change history and one-click undo.', 'abds-seo' ), ), array( 'label' => __( 'Schema (JSON-LD) validation', 'abds-seo' ), 'benefit' => __( 'Checked automatically during every scan.', 'abds-seo' ), ), array( 'label' => __( 'Migration from other SEO plugins', 'abds-seo' ), 'benefit' => __( 'Import your existing data from Yoast SEO, Rank Math, or All in One SEO — nothing is deleted without confirmation.', 'abds-seo' ), ), ); } /** * Same shape as describe() (key/label/benefit/required_tier/ * required_tier_label/allowed) so the Settings-page catalog can render * free and Pro features with one component — but every entry is * trivially "allowed" and "required_tier" is always 'free', since * there's no gate to describe. * * @return array */ public static function describe_free(): array { $out = array(); foreach ( self::free_metadata() as $index => $meta ) { $out[] = array( 'key' => 'free_' . $index, 'label' => $meta['label'], 'benefit' => $meta['benefit'], 'required_tier' => 'free', 'required_tier_label' => self::tier_label( 'free' ), 'allowed' => true, ); } return $out; } /** * Display label for a tier (brand name; unknown falls back to the raw key). * * @param string $tier Tier key. * @return string */ public static function tier_label( string $tier ): string { return self::TIER_LABELS[ $tier ] ?? $tier; } /** * Describes every gated feature relative to an effective tier: label, * benefit, the tier it needs, and whether the current tier already has it. * The gate decision comes from Feature_Map (single source of truth); this * only decorates it with copy. * * @param string $effective_tier The site's resolved tier. * @return array */ public static function describe( string $effective_tier ): array { $out = array(); foreach ( self::metadata() as $key => $meta ) { $required = ABDS_SEO_Feature_Map::required_tier( $key ); $out[] = array( 'key' => $key, 'label' => $meta['label'], 'benefit' => $meta['benefit'], 'required_tier' => $required, 'required_tier_label' => self::tier_label( $required ), 'allowed' => ABDS_SEO_Feature_Map::allows( $effective_tier, $key ), ); } return $out; } }