Plugin Directory

Changeset 3102248


Ignore:
Timestamp:
06/13/2024 10:45:53 AM (22 months ago)
Author:
seowriting
Message:

New version of plugin: 1.6.2

Location:
seowriting
Files:
4 edited
10 copied

Legend:

Unmodified
Added
Removed
  • seowriting/tags/1.6.2/classes/post-meta.php

    r3056072 r3102248  
    1616
    1717    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';
    1819    const PLUGIN_ELEMENTOR = 'elementor/elementor.php';
    1920    const PLUGIN_RANK_MATH = 'seo-by-rank-math/rank-math.php';
     
    2223    const PLUGIN_SQUIRRLY_SEO = 'squirrly-seo/squirrly.php';
    2324    const PLUGIN_YOAST = 'wordpress-seo/wp-seo.php';
     25    const PLUGIN_YOAST_PRO = 'wordpress-seo-premium/wp-seo-premium.php';
    2426
    2527    public function __construct($post_id)
     
    6163        $description = isset($data['description']) ? $data['description'] : '';
    6264        $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;
    6367
    6468        if (
     
    140144        }
    141145
    142         if (is_plugin_active(self::PLUGIN_YOAST)) {
     146        if (is_plugin_active(self::PLUGIN_YOAST) || is_plugin_active(self::PLUGIN_YOAST_PRO)) {
    143147            $this->setValue('_yoast_wpseo_title', $title);
    144148            $this->setValue('_yoast_wpseo_metadesc', $description);
    145149            $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)) {
    149161            $this->setValue('_aioseo_title', $title);
    150162            $this->setValue('_aioseo_description', $description);
     
    154166
    155167            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);
    157169                include_once($path);
     170                $list = [];
     171                foreach(array_slice($keywords, 1) as $item) {
     172                    $list[] = [
     173                        'keyphrase' => $item,
     174                        'analysis' => [],
     175                    ];
     176                }
    158177                // @phpstan-ignore-next-line
    159178                \AIOSEO\Plugin\Common\Models\Post::savePost($this->post_id, [
     
    166185                            'analysis' => [],
    167186                        ],
    168                         'additional' => [],
     187                        'additional' => $list,
    169188                    ],
    170189                    'og_title' => $title,
     
    179198            $this->setValue('rank_math_title', $title);
    180199            $this->setValue('rank_math_description', $description);
    181             $this->setValue('rank_math_focus_keyword', $main_keyword);
     200            $this->setValue('rank_math_focus_keyword', $all_keywords);
    182201        }
    183202
     
    185204            $this->setValue('_seopress_titles_title', $title);
    186205            $this->setValue('_seopress_titles_desc', $description);
    187             $this->setValue('_seopress_analysis_target_kw', $main_keyword);
     206            $this->setValue('_seopress_analysis_target_kw', $all_keywords);
    188207            $this->setValue('_seopress_social_fb_title', $title);
    189208            $this->setValue('_seopress_social_fb_desc', $description);
  • seowriting/tags/1.6.2/readme.txt

    r3091686 r3102248  
    55Requires at least: 4.9
    66Requires PHP: 5.6.20
    7 Stable tag: 1.6.1
     7Stable tag: 1.6.2
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    2222
    2323== Changelog ==
     24
     25= 1.6.2 (2024/06/13) =
     26
     27Feature: Multiple keyword support in some plugins.
    2428
    2529= 1.6.1 (2024/05/23) =
  • seowriting/tags/1.6.2/seowriting.php

    r3091686 r3102248  
    99 * Plugin Name:       SEOWriting
    1010 * Description:       SEOWriting - AI Writing Tool Plugin For Text Generation
    11  * Version:           1.6.1
     11 * Version:           1.6.2
    1212 * Author:            SEOWriting
    1313 * Author URI:        https://seowriting.ai/?utm_source=wp_plugin
     
    2828        public $plugin_slug;
    2929        public $plugin_path;
    30         public $version = '1.6.1';
     30        public $version = '1.6.2';
    3131        /**
    3232         * @var \SEOWriting\APIClient|null
  • seowriting/trunk/classes/post-meta.php

    r3056072 r3102248  
    1616
    1717    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';
    1819    const PLUGIN_ELEMENTOR = 'elementor/elementor.php';
    1920    const PLUGIN_RANK_MATH = 'seo-by-rank-math/rank-math.php';
     
    2223    const PLUGIN_SQUIRRLY_SEO = 'squirrly-seo/squirrly.php';
    2324    const PLUGIN_YOAST = 'wordpress-seo/wp-seo.php';
     25    const PLUGIN_YOAST_PRO = 'wordpress-seo-premium/wp-seo-premium.php';
    2426
    2527    public function __construct($post_id)
     
    6163        $description = isset($data['description']) ? $data['description'] : '';
    6264        $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;
    6367
    6468        if (
     
    140144        }
    141145
    142         if (is_plugin_active(self::PLUGIN_YOAST)) {
     146        if (is_plugin_active(self::PLUGIN_YOAST) || is_plugin_active(self::PLUGIN_YOAST_PRO)) {
    143147            $this->setValue('_yoast_wpseo_title', $title);
    144148            $this->setValue('_yoast_wpseo_metadesc', $description);
    145149            $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)) {
    149161            $this->setValue('_aioseo_title', $title);
    150162            $this->setValue('_aioseo_description', $description);
     
    154166
    155167            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);
    157169                include_once($path);
     170                $list = [];
     171                foreach(array_slice($keywords, 1) as $item) {
     172                    $list[] = [
     173                        'keyphrase' => $item,
     174                        'analysis' => [],
     175                    ];
     176                }
    158177                // @phpstan-ignore-next-line
    159178                \AIOSEO\Plugin\Common\Models\Post::savePost($this->post_id, [
     
    166185                            'analysis' => [],
    167186                        ],
    168                         'additional' => [],
     187                        'additional' => $list,
    169188                    ],
    170189                    'og_title' => $title,
     
    179198            $this->setValue('rank_math_title', $title);
    180199            $this->setValue('rank_math_description', $description);
    181             $this->setValue('rank_math_focus_keyword', $main_keyword);
     200            $this->setValue('rank_math_focus_keyword', $all_keywords);
    182201        }
    183202
     
    185204            $this->setValue('_seopress_titles_title', $title);
    186205            $this->setValue('_seopress_titles_desc', $description);
    187             $this->setValue('_seopress_analysis_target_kw', $main_keyword);
     206            $this->setValue('_seopress_analysis_target_kw', $all_keywords);
    188207            $this->setValue('_seopress_social_fb_title', $title);
    189208            $this->setValue('_seopress_social_fb_desc', $description);
  • seowriting/trunk/readme.txt

    r3091686 r3102248  
    55Requires at least: 4.9
    66Requires PHP: 5.6.20
    7 Stable tag: 1.6.1
     7Stable tag: 1.6.2
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    2222
    2323== Changelog ==
     24
     25= 1.6.2 (2024/06/13) =
     26
     27Feature: Multiple keyword support in some plugins.
    2428
    2529= 1.6.1 (2024/05/23) =
  • seowriting/trunk/seowriting.php

    r3091686 r3102248  
    99 * Plugin Name:       SEOWriting
    1010 * Description:       SEOWriting - AI Writing Tool Plugin For Text Generation
    11  * Version:           1.6.1
     11 * Version:           1.6.2
    1212 * Author:            SEOWriting
    1313 * Author URI:        https://seowriting.ai/?utm_source=wp_plugin
     
    2828        public $plugin_slug;
    2929        public $plugin_path;
    30         public $version = '1.6.1';
     30        public $version = '1.6.2';
    3131        /**
    3232         * @var \SEOWriting\APIClient|null
Note: See TracChangeset for help on using the changeset viewer.