| @@ -99,12 +99,13 @@ | ||
| 99 | 99 | * @param string $target_keyword Target keyword |
| 100 | 100 | * @param string $content_type Type of content |
| 101 | 101 | * @param string $tone Desired tone |
| 102 | 102 | * @param string $provider AI provider |
| 103 | + * @param string $language Target output language (empty = infer from content) | |
| 103 | 104 | * @return string Formatted prompt |
| 104 | 105 | */ |
| 105 | - public function build_seo_prompt(string $content, string $target_keyword, string $content_type, string $tone, string $provider = 'openai'): string { | |
| 106 | - return $this->get_seo_prompts()->build_seo_prompt($content, $target_keyword, $content_type, $tone, $provider); | |
| 106 | + public function build_seo_prompt(string $content, string $target_keyword, string $content_type, string $tone, string $provider = 'openai', string $language = ''): string { | |
| 107 | + return $this->get_seo_prompts()->build_seo_prompt($content, $target_keyword, $content_type, $tone, $provider, $language); | |
| 107 | 108 | } |
| 108 | 109 | |
| 109 | 110 | /** |
| 110 | 111 | * Build a focused SEO title improvement prompt. |
| @@ -119,12 +120,13 @@ | ||
| 119 | 120 | * @param string $suggestion The suggestion the new title must address. |
| 120 | 121 | * @param string $provider AI provider. |
| 121 | 122 | * @param array $sentiment_words Emotion/sentiment words the title check rewards. |
| 122 | 123 | * @param array $power_words Power words the title check rewards. |
| 124 | + * @param string $language Target output language (empty = infer from content) | |
| 123 | 125 | * @return string Formatted prompt |
| 124 | 126 | */ |
| 125 | - public function build_title_improvement_prompt(string $content, string $current_title, string $target_keyword, string $content_type, string $tone, string $suggestion, string $provider = 'openai', array $sentiment_words = [], array $power_words = []): string { | |
| 126 | - return $this->get_seo_prompts()->build_title_improvement_prompt($content, $current_title, $target_keyword, $content_type, $tone, $suggestion, $provider, $sentiment_words, $power_words); | |
| 127 | + public function build_title_improvement_prompt(string $content, string $current_title, string $target_keyword, string $content_type, string $tone, string $suggestion, string $provider = 'openai', array $sentiment_words = [], array $power_words = [], string $language = ''): string { | |
| 128 | + return $this->get_seo_prompts()->build_title_improvement_prompt($content, $current_title, $target_keyword, $content_type, $tone, $suggestion, $provider, $sentiment_words, $power_words, $language); | |
| 127 | 129 | } |
| 128 | 130 | |
| 129 | 131 | /** |
| 130 | 132 | * Build a focused meta-description improvement prompt. |
| @@ -137,12 +139,13 @@ | ||
| 137 | 139 | * @param string $content_type Type of content. |
| 138 | 140 | * @param string $tone Desired tone. |
| 139 | 141 | * @param string $suggestion The suggestion the description must address. |
| 140 | 142 | * @param string $provider AI provider. |
| 143 | + * @param string $language Target output language (empty = infer from content) | |
| 141 | 144 | * @return string Formatted prompt |
| 142 | 145 | */ |
| 143 | - public function build_meta_description_improvement_prompt(string $content, string $current_desc, string $target_keyword, string $content_type, string $tone, string $suggestion, string $provider = 'openai'): string { | |
| 144 | - return $this->get_seo_prompts()->build_meta_description_improvement_prompt($content, $current_desc, $target_keyword, $content_type, $tone, $suggestion, $provider); | |
| 146 | + public function build_meta_description_improvement_prompt(string $content, string $current_desc, string $target_keyword, string $content_type, string $tone, string $suggestion, string $provider = 'openai', string $language = ''): string { | |
| 147 | + return $this->get_seo_prompts()->build_meta_description_improvement_prompt($content, $current_desc, $target_keyword, $content_type, $tone, $suggestion, $provider, $language); | |
| 145 | 148 | } |
| 146 | 149 | |
| 147 | 150 | /** |
| 148 | 151 | * Build a prompt that explains why a specific SEO suggestion matters for a |
| @@ -280,9 +283,10 @@ | ||
| 280 | 283 | string $content_length, |
| 281 | 284 | string $tone, |
| 282 | 285 | string $competitor_analysis, |
| 283 | 286 | string $additional_context, |
| 284 | - string $provider = 'openai' | |
| 287 | + string $provider = 'openai', | |
| 288 | + string $language = '' | |
| 285 | 289 | ): string { |
| 286 | 290 | return $this->get_content_brief_prompts()->build_content_brief_prompt( |
| 287 | 291 | $target_keywords, |
| 288 | 292 | $content_type, |
| @@ -290,9 +294,10 @@ | ||
| 290 | 294 | $content_length, |
| 291 | 295 | $tone, |
| 292 | 296 | $competitor_analysis, |
| 293 | 297 | $additional_context, |
| 294 | - $provider | |
| 298 | + $provider, | |
| 299 | + $language | |
| 295 | 300 | ); |
| 296 | 301 | } |
| 297 | 302 | |
| 298 | 303 | /** |