Plugin Directory

Changeset 3066917


Ignore:
Timestamp:
04/08/2024 12:22:15 PM (2 years ago)
Author:
seowriting
Message:

New version of readme.txt

Location:
seowriting/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • seowriting/trunk/readme.txt

    r3056328 r3066917  
    55Requires at least: 4.9
    66Requires PHP: 5.6.20
    7 Stable tag: 1.5.2
     7Stable tag: 1.5.3
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    2222
    2323== Changelog ==
     24
     25= 1.5.3 (2024/04/08) =
     26
     27Feature: Internal changes to get a list of authors who are allowed to publish
    2428
    2529= 1.5.2 (2024/03/21) =
  • seowriting/trunk/seowriting.php

    r3056086 r3066917  
    99 * Plugin Name:       SEOWriting
    1010 * Description:       SEOWriting - AI Writing Tool Plugin For Text Generation
    11  * Version:           1.5.2
     11 * Version:           1.5.3
    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.5.2';
     30        public $version = '1.5.3';
    3131        /**
    3232         * @var \SEOWriting\APIClient|null
     
    349349                        $rs = [
    350350                            'result' => 1,
    351                             'categories' => $this->getCategories()
     351                            'categories' => $this->getCategories(),
     352                            'authors' => $this->getAuthors(),
    352353                        ];
    353354                    } elseif ($action === 'disconnect') {
     
    360361                            'result' => 1,
    361362                            'categories' => $this->getCategories()
     363                        ];
     364                    } elseif ($action === 'get_authors') {
     365                        $rs = [
     366                            'result' => 1,
     367                            'authors' => $this->getAuthors()
    362368                        ];
    363369                    } else {
     
    698704         * @return array<array<string, int|string>>
    699705         */
     706        public function getAuthors()
     707        {
     708            $users = get_users([
     709                'role__in' => ['administrator', 'author', 'editor']
     710            ]);
     711
     712            $result = [];
     713            foreach ($users as $user) {
     714                $result[] = [
     715                    'id' => (int)$user->ID,
     716                    'login' => $user->data->user_login,
     717                ];
     718            }
     719
     720            return $result;
     721        }
     722
     723        /**
     724         * @return array<array<string, int|string>>
     725         */
    700726        public function getCategories()
    701727        {
Note: See TracChangeset for help on using the changeset viewer.