Changeset 3102248
- Timestamp:
- 06/13/2024 10:45:53 AM (22 months ago)
- Location:
- seowriting
- Files:
-
- 4 edited
- 10 copied
-
tags/1.6.2 (copied) (copied from seowriting/trunk)
-
tags/1.6.2/assets (copied) (copied from seowriting/trunk/assets)
-
tags/1.6.2/classes (copied) (copied from seowriting/trunk/classes)
-
tags/1.6.2/classes/api-client.php (copied) (copied from seowriting/trunk/classes/api-client.php)
-
tags/1.6.2/classes/post-meta.php (modified) (8 diffs)
-
tags/1.6.2/readme.txt (copied) (copied from seowriting/trunk/readme.txt) (2 diffs)
-
tags/1.6.2/seowriting.php (copied) (copied from seowriting/trunk/seowriting.php) (2 diffs)
-
tags/1.6.2/tpl (copied) (copied from seowriting/trunk/tpl)
-
tags/1.6.2/tpl/settings/settings.tpl.php (copied) (copied from seowriting/trunk/tpl/settings/settings.tpl.php)
-
tags/1.6.2/uninstall.php (copied) (copied from seowriting/trunk/uninstall.php)
-
tags/1.6.2/utils.php (copied) (copied from seowriting/trunk/utils.php)
-
trunk/classes/post-meta.php (modified) (8 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/seowriting.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
seowriting/tags/1.6.2/classes/post-meta.php
r3056072 r3102248 16 16 17 17 const PLUGIN_ALL_IN_ONE = 'all-in-one-seo-pack/all_in_one_seo_pack.php'; 18 const PLUGIN_ALL_IN_ONE_PRO = 'all-in-one-seo-pack-pro/all_in_one_seo_pack.php'; 18 19 const PLUGIN_ELEMENTOR = 'elementor/elementor.php'; 19 20 const PLUGIN_RANK_MATH = 'seo-by-rank-math/rank-math.php'; … … 22 23 const PLUGIN_SQUIRRLY_SEO = 'squirrly-seo/squirrly.php'; 23 24 const PLUGIN_YOAST = 'wordpress-seo/wp-seo.php'; 25 const PLUGIN_YOAST_PRO = 'wordpress-seo-premium/wp-seo-premium.php'; 24 26 25 27 public function __construct($post_id) … … 61 63 $description = isset($data['description']) ? $data['description'] : ''; 62 64 $main_keyword = isset($data['main_keyword']) ? $data['main_keyword'] : ''; 65 $keywords = isset($data['keywords']) ? $data['keywords'] : []; 66 $all_keywords = count($keywords) > 0 ? implode(',', $keywords) : $main_keyword; 63 67 64 68 if ( … … 140 144 } 141 145 142 if (is_plugin_active(self::PLUGIN_YOAST) ) {146 if (is_plugin_active(self::PLUGIN_YOAST) || is_plugin_active(self::PLUGIN_YOAST_PRO)) { 143 147 $this->setValue('_yoast_wpseo_title', $title); 144 148 $this->setValue('_yoast_wpseo_metadesc', $description); 145 149 $this->setValue('_yoast_wpseo_focuskw', $main_keyword); 146 } 147 148 if (is_plugin_active(self::PLUGIN_ALL_IN_ONE)) { 150 $list = []; 151 foreach(array_slice($keywords, 1) as $item) { 152 $list[] = [ 153 'keyword' => $item, 154 'score' => 0, 155 ]; 156 } 157 $this->setValue('_yoast_wpseo_focuskeywords', seowriting_json_encode_unescaped($list)); 158 } 159 160 if (is_plugin_active(self::PLUGIN_ALL_IN_ONE) || is_plugin_active(self::PLUGIN_ALL_IN_ONE_PRO)) { 149 161 $this->setValue('_aioseo_title', $title); 150 162 $this->setValue('_aioseo_description', $description); … … 154 166 155 167 try { 156 $path = WP_PLUGIN_DIR . '/' . self::PLUGIN_ALL_IN_ONE;168 $path = WP_PLUGIN_DIR . '/' . (is_plugin_active(self::PLUGIN_ALL_IN_ONE) ? self::PLUGIN_ALL_IN_ONE : self::PLUGIN_ALL_IN_ONE_PRO); 157 169 include_once($path); 170 $list = []; 171 foreach(array_slice($keywords, 1) as $item) { 172 $list[] = [ 173 'keyphrase' => $item, 174 'analysis' => [], 175 ]; 176 } 158 177 // @phpstan-ignore-next-line 159 178 \AIOSEO\Plugin\Common\Models\Post::savePost($this->post_id, [ … … 166 185 'analysis' => [], 167 186 ], 168 'additional' => [],187 'additional' => $list, 169 188 ], 170 189 'og_title' => $title, … … 179 198 $this->setValue('rank_math_title', $title); 180 199 $this->setValue('rank_math_description', $description); 181 $this->setValue('rank_math_focus_keyword', $ main_keyword);200 $this->setValue('rank_math_focus_keyword', $all_keywords); 182 201 } 183 202 … … 185 204 $this->setValue('_seopress_titles_title', $title); 186 205 $this->setValue('_seopress_titles_desc', $description); 187 $this->setValue('_seopress_analysis_target_kw', $ main_keyword);206 $this->setValue('_seopress_analysis_target_kw', $all_keywords); 188 207 $this->setValue('_seopress_social_fb_title', $title); 189 208 $this->setValue('_seopress_social_fb_desc', $description); -
seowriting/tags/1.6.2/readme.txt
r3091686 r3102248 5 5 Requires at least: 4.9 6 6 Requires PHP: 5.6.20 7 Stable tag: 1.6. 17 Stable tag: 1.6.2 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 22 22 23 23 == Changelog == 24 25 = 1.6.2 (2024/06/13) = 26 27 Feature: Multiple keyword support in some plugins. 24 28 25 29 = 1.6.1 (2024/05/23) = -
seowriting/tags/1.6.2/seowriting.php
r3091686 r3102248 9 9 * Plugin Name: SEOWriting 10 10 * Description: SEOWriting - AI Writing Tool Plugin For Text Generation 11 * Version: 1.6. 111 * Version: 1.6.2 12 12 * Author: SEOWriting 13 13 * Author URI: https://seowriting.ai/?utm_source=wp_plugin … … 28 28 public $plugin_slug; 29 29 public $plugin_path; 30 public $version = '1.6. 1';30 public $version = '1.6.2'; 31 31 /** 32 32 * @var \SEOWriting\APIClient|null -
seowriting/trunk/classes/post-meta.php
r3056072 r3102248 16 16 17 17 const PLUGIN_ALL_IN_ONE = 'all-in-one-seo-pack/all_in_one_seo_pack.php'; 18 const PLUGIN_ALL_IN_ONE_PRO = 'all-in-one-seo-pack-pro/all_in_one_seo_pack.php'; 18 19 const PLUGIN_ELEMENTOR = 'elementor/elementor.php'; 19 20 const PLUGIN_RANK_MATH = 'seo-by-rank-math/rank-math.php'; … … 22 23 const PLUGIN_SQUIRRLY_SEO = 'squirrly-seo/squirrly.php'; 23 24 const PLUGIN_YOAST = 'wordpress-seo/wp-seo.php'; 25 const PLUGIN_YOAST_PRO = 'wordpress-seo-premium/wp-seo-premium.php'; 24 26 25 27 public function __construct($post_id) … … 61 63 $description = isset($data['description']) ? $data['description'] : ''; 62 64 $main_keyword = isset($data['main_keyword']) ? $data['main_keyword'] : ''; 65 $keywords = isset($data['keywords']) ? $data['keywords'] : []; 66 $all_keywords = count($keywords) > 0 ? implode(',', $keywords) : $main_keyword; 63 67 64 68 if ( … … 140 144 } 141 145 142 if (is_plugin_active(self::PLUGIN_YOAST) ) {146 if (is_plugin_active(self::PLUGIN_YOAST) || is_plugin_active(self::PLUGIN_YOAST_PRO)) { 143 147 $this->setValue('_yoast_wpseo_title', $title); 144 148 $this->setValue('_yoast_wpseo_metadesc', $description); 145 149 $this->setValue('_yoast_wpseo_focuskw', $main_keyword); 146 } 147 148 if (is_plugin_active(self::PLUGIN_ALL_IN_ONE)) { 150 $list = []; 151 foreach(array_slice($keywords, 1) as $item) { 152 $list[] = [ 153 'keyword' => $item, 154 'score' => 0, 155 ]; 156 } 157 $this->setValue('_yoast_wpseo_focuskeywords', seowriting_json_encode_unescaped($list)); 158 } 159 160 if (is_plugin_active(self::PLUGIN_ALL_IN_ONE) || is_plugin_active(self::PLUGIN_ALL_IN_ONE_PRO)) { 149 161 $this->setValue('_aioseo_title', $title); 150 162 $this->setValue('_aioseo_description', $description); … … 154 166 155 167 try { 156 $path = WP_PLUGIN_DIR . '/' . self::PLUGIN_ALL_IN_ONE;168 $path = WP_PLUGIN_DIR . '/' . (is_plugin_active(self::PLUGIN_ALL_IN_ONE) ? self::PLUGIN_ALL_IN_ONE : self::PLUGIN_ALL_IN_ONE_PRO); 157 169 include_once($path); 170 $list = []; 171 foreach(array_slice($keywords, 1) as $item) { 172 $list[] = [ 173 'keyphrase' => $item, 174 'analysis' => [], 175 ]; 176 } 158 177 // @phpstan-ignore-next-line 159 178 \AIOSEO\Plugin\Common\Models\Post::savePost($this->post_id, [ … … 166 185 'analysis' => [], 167 186 ], 168 'additional' => [],187 'additional' => $list, 169 188 ], 170 189 'og_title' => $title, … … 179 198 $this->setValue('rank_math_title', $title); 180 199 $this->setValue('rank_math_description', $description); 181 $this->setValue('rank_math_focus_keyword', $ main_keyword);200 $this->setValue('rank_math_focus_keyword', $all_keywords); 182 201 } 183 202 … … 185 204 $this->setValue('_seopress_titles_title', $title); 186 205 $this->setValue('_seopress_titles_desc', $description); 187 $this->setValue('_seopress_analysis_target_kw', $ main_keyword);206 $this->setValue('_seopress_analysis_target_kw', $all_keywords); 188 207 $this->setValue('_seopress_social_fb_title', $title); 189 208 $this->setValue('_seopress_social_fb_desc', $description); -
seowriting/trunk/readme.txt
r3091686 r3102248 5 5 Requires at least: 4.9 6 6 Requires PHP: 5.6.20 7 Stable tag: 1.6. 17 Stable tag: 1.6.2 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 22 22 23 23 == Changelog == 24 25 = 1.6.2 (2024/06/13) = 26 27 Feature: Multiple keyword support in some plugins. 24 28 25 29 = 1.6.1 (2024/05/23) = -
seowriting/trunk/seowriting.php
r3091686 r3102248 9 9 * Plugin Name: SEOWriting 10 10 * Description: SEOWriting - AI Writing Tool Plugin For Text Generation 11 * Version: 1.6. 111 * Version: 1.6.2 12 12 * Author: SEOWriting 13 13 * Author URI: https://seowriting.ai/?utm_source=wp_plugin … … 28 28 public $plugin_slug; 29 29 public $plugin_path; 30 public $version = '1.6. 1';30 public $version = '1.6.2'; 31 31 /** 32 32 * @var \SEOWriting\APIClient|null
Note: See TracChangeset
for help on using the changeset viewer.