| @@ -37,10 +37,14 @@ | ||
| 37 | 37 | final class Email_Report_Mailer { |
| 38 | 38 | |
| 39 | 39 | /** |
| 40 | 40 | * Subject line when nothing filters it. |
| 41 | + * | |
| 42 | + * `%headline%` is the report's own summary — "12,480 Google clicks | |
| 43 | + * (+12.4%) in the last 30 days" — supplied by the generator (#742). A | |
| 44 | + * subject that carries the number gets opened; a label does not. | |
| 41 | 45 | */ |
| 42 | - public const DEFAULT_SUBJECT = '%site_title% SEO performance report'; | |
| 46 | + public const DEFAULT_SUBJECT = '%site_title%: %headline%'; | |
| 43 | 47 | |
| 44 | 48 | /** |
| 45 | 49 | * Send a rendered email report. |
| 46 | 50 | * |
| @@ -121,12 +125,17 @@ | ||
| 121 | 125 | $template = self::DEFAULT_SUBJECT; |
| 122 | 126 | } |
| 123 | 127 | |
| 124 | 128 | $defaults = [ |
| 125 | - '%site_title%' => (string) get_bloginfo('name'), | |
| 126 | - '%site_url%' => (string) home_url(), | |
| 127 | - '%date%' => wp_date(get_option('date_format', 'Y-m-d')), | |
| 128 | - '%period%' => (string) ($tokens['%period%'] ?? ''), | |
| 129 | + '%site_title%' => (string) get_bloginfo('name'), | |
| 130 | + '%site_url%' => (string) home_url(), | |
| 131 | + '%date%' => wp_date(get_option('date_format', 'Y-m-d')), | |
| 132 | + '%period%' => (string) ($tokens['%period%'] ?? ''), | |
| 133 | + '%headline%' => __('SEO performance report', 'thinkrank'), | |
| 134 | + '%clicks%' => '', | |
| 135 | + '%clicks_change%' => '', | |
| 136 | + '%impressions%' => '', | |
| 137 | + '%period_days%' => '', | |
| 129 | 138 | ]; |
| 130 | 139 | |
| 131 | 140 | $merged = array_merge($defaults, $tokens); |
| 132 | 141 | |