PluginProbe
ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO / 2.8.0
ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO v2.8.0
2.8.0 2.7.0 2.6.0 2.5.0 2.4.0 2.3.0 2.2.0 2.1.1 2.1.0 2.0.2 2.0.1 2.0.0 1.32.0 1.31.0 1.30.0 1.29.0 1.28.0 1.27.0 1.26.0 1.25.0 trunk 1.0.0 1.0.1 1.0.2 1.1.0 All 49 releases
thinkrank / includes / config / email-report-settings-config.php

email-report-settings-config.php in ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO 2.8.0, at includes/config/email-report-settings-config.php

76 lines 2.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Email Report Settings Configuration
4 *
5 * Default stored state and section catalog for the Email Reporting feature.
6 *
7 * The free report is fixed: every 30 days, to the site admin email, with every
8 * section. Only the on/off switch and the schedule timestamps are stored.
9 * Schedule, recipients and branding settings belong to ThinkRank Pro, which
10 * supplies them through the `thinkrank_email_report_config`,
11 * `thinkrank_email_report_subject_template` and `thinkrank_email_report_payload`
12 * filters (#673).
13 *
14 * @package ThinkRank
15 * @subpackage Config
16 * @since 1.9.0
17 */
18
19 declare(strict_types=1);
20
21 if (!defined('ABSPATH')) {
22 exit;
23 }
24
25 /**
26 * Default stored Email Reporting state.
27 *
28 * @return array{enabled: bool, next_scheduled_at: ?string, last_sent_at: ?string}
29 */
30 function thinkrank_get_default_email_report_config(): array {
31 return [
32 'enabled' => false,
33 'next_scheduled_at' => null,
34 'last_sent_at' => null,
35 ];
36 }
37
38 /**
39 * Built-in sections, in render order.
40 *
41 * Keys here are the section identifiers used everywhere — in the
42 * sections_enabled list of the resolved config, in the Section_Registry, and
43 * in template paths. `site_traffic` and `ai_search` render only when their
44 * source (a GA4 property, the AI traffic tracker) has something to show.
45 *
46 * @return array<string,array{label:string}>
47 */
48 function thinkrank_get_email_report_default_sections(): array {
49 return [
50 'key_metrics' => [
51 'label' => __('Search performance', 'thinkrank'),
52 ],
53 'top_winning_posts' => [
54 'label' => __('Top growing pages', 'thinkrank'),
55 ],
56 'top_winning_keywords' => [
57 'label' => __('Top growing queries', 'thinkrank'),
58 ],
59 'top_losing_posts' => [
60 'label' => __('Pages losing ground', 'thinkrank'),
61 ],
62 'top_losing_keywords' => [
63 'label' => __('Queries losing ground', 'thinkrank'),
64 ],
65 'position_summary' => [
66 'label' => __('Where your keywords rank', 'thinkrank'),
67 ],
68 'site_traffic' => [
69 'label' => __('Site traffic (Google Analytics 4)', 'thinkrank'),
70 ],
71 'ai_search' => [
72 'label' => __('Traffic from AI assistants', 'thinkrank'),
73 ],
74 ];
75 }
76