| @@ -26,8 +26,10 @@ | ||
| 26 | 26 | use ThinkRank\SEO\Email_Report_Sections\Top_Winning_Posts_Section; |
| 27 | 27 | use ThinkRank\SEO\Email_Report_Sections\Top_Losing_Posts_Section; |
| 28 | 28 | use ThinkRank\SEO\Email_Report_Sections\Top_Winning_Keywords_Section; |
| 29 | 29 | use ThinkRank\SEO\Email_Report_Sections\Top_Losing_Keywords_Section; |
| 30 | +use ThinkRank\SEO\Email_Report_Sections\Site_Traffic_Section; | |
| 31 | +use ThinkRank\SEO\Email_Report_Sections\Ai_Search_Section; | |
| 30 | 32 | |
| 31 | 33 | if (!defined('ABSPATH')) { |
| 32 | 34 | exit; |
| 33 | 35 | } |
| @@ -68,8 +70,9 @@ | ||
| 68 | 70 | */ |
| 69 | 71 | private function require_files(): void { |
| 70 | 72 | $base = THINKRANK_PLUGIN_DIR . 'includes/seo/email-report-sections/'; |
| 71 | 73 | require_once $base . 'interface-email-report-section.php'; |
| 74 | + require_once $base . 'class-email-report-html.php'; | |
| 72 | 75 | require_once $base . 'class-top-posts-renderer.php'; |
| 73 | 76 | require_once $base . 'class-key-metrics-section.php'; |
| 74 | 77 | require_once $base . 'class-position-summary-section.php'; |
| 75 | 78 | require_once $base . 'class-top-winning-posts-section.php'; |
| @@ -75,8 +78,10 @@ | ||
| 75 | 78 | require_once $base . 'class-top-winning-posts-section.php'; |
| 76 | 79 | require_once $base . 'class-top-losing-posts-section.php'; |
| 77 | 80 | require_once $base . 'class-top-winning-keywords-section.php'; |
| 78 | 81 | require_once $base . 'class-top-losing-keywords-section.php'; |
| 82 | + require_once $base . 'class-site-traffic-section.php'; | |
| 83 | + require_once $base . 'class-ai-search-section.php'; | |
| 79 | 84 | |
| 80 | 85 | // Defaults config is procedural — load eagerly. |
| 81 | 86 | require_once THINKRANK_PLUGIN_DIR . 'includes/config/email-report-settings-config.php'; |
| 82 | 87 | } |
| @@ -96,14 +101,18 @@ | ||
| 96 | 101 | $this->scheduler = new Email_Report_Scheduler($this->config, $this->generator); |
| 97 | 102 | } |
| 98 | 103 | |
| 99 | 104 | private function register_default_sections(): void { |
| 105 | + // Registration order is render order: the hero, what grew, what | |
| 106 | + // fell, where things rank, then the optional GA4 and AI cards. | |
| 100 | 107 | $this->registry->register(new Key_Metrics_Section()); |
| 101 | - $this->registry->register(new Position_Summary_Section()); | |
| 102 | 108 | $this->registry->register(new Top_Winning_Posts_Section()); |
| 109 | + $this->registry->register(new Top_Winning_Keywords_Section()); | |
| 103 | 110 | $this->registry->register(new Top_Losing_Posts_Section()); |
| 104 | - $this->registry->register(new Top_Winning_Keywords_Section()); | |
| 105 | 111 | $this->registry->register(new Top_Losing_Keywords_Section()); |
| 112 | + $this->registry->register(new Position_Summary_Section()); | |
| 113 | + $this->registry->register(new Site_Traffic_Section()); | |
| 114 | + $this->registry->register(new Ai_Search_Section()); | |
| 106 | 115 | } |
| 107 | 116 | |
| 108 | 117 | private function register_extension_sections(): void { |
| 109 | 118 | /** |
| @@ -133,6 +142,10 @@ | ||
| 133 | 142 | } |
| 134 | 143 | |
| 135 | 144 | public function scheduler(): Email_Report_Scheduler { |
| 136 | 145 | return $this->scheduler; |
| 146 | + } | |
| 147 | + | |
| 148 | + public function data_provider(): Email_Report_Data_Provider { | |
| 149 | + return $this->data_provider; | |
| 137 | 150 | } |
| 138 | 151 | } |