Plugin Directory

Changeset 2676217


Ignore:
Timestamp:
02/10/2022 09:33:49 AM (4 years ago)
Author:
contentstudio
Message:

tagging version 1.1.5

Location:
contentstudio
Files:
2 edited
1 copied

Legend:

Unmodified
Added
Removed
  • contentstudio/tags/1.1.5/contentstudio-plugin.php

    r2629801 r2676217  
    33Plugin Name: ContentStudio
    44Description: ContentStudio provides you with powerful blogging & social media tools to keep your audience hooked by streamlining the process for you to discover and share engaging content on multiple blogging & social media networks
    5 Version: 1.1.4
     5Version: 1.1.5
    66Author: ContentStudio
    77Author URI: http://contentstudio.io/
     
    4040        protected $assets = 'https://contentstudio.io/img';
    4141
    42         private $version = "1.1.4";
     42        private $version = "1.1.5";
    4343
    4444        protected $contentstudio_id = '';
     
    473473                        if ($user && $user->ID != 0) {
    474474                            if (wp_check_password($_REQUEST['password'], $user->data->user_pass, $user->ID)) {
    475                                 if (in_array('administrator', $user->roles) || in_array('editor', $user->roles) || in_array('author', $user->roles)) {
     475                                if ($user->has_cap('publish_posts') && $user->has_cap('edit_posts')) {
    476476                                    echo json_encode(['status' => true, 'message' => 'User verification completed successfully!']);
    477477                                    die();
    478478                                } else {
    479                                     echo json_encode(['status' => false, 'message' => 'Your WordPress user role should be administrator, editor or author.']);
     479                                    echo json_encode(['status' => false, 'message' => "You don't have permissions or the capabilities to publish or edit posts."]);
    480480                                    die();
    481481                                }
     
    647647                $valid = $this->do_validate_cstu_token($_REQUEST['token']);
    648648                if ($valid) {
    649                     $authors = get_users(['role__in' => ['editor', 'administrator', 'author']]);
     649                    $authors = get_users();
    650650                    $return_authors = [];
    651651                    foreach ($authors as $author) {
     652                        if (!$author->has_cap('publish_posts') || !$author->has_cap('edit_posts')) {
     653                            continue;
     654                        }
    652655                        $return_authors[] = [
    653656                            "display_name" => $author->data->display_name,
  • contentstudio/trunk/contentstudio-plugin.php

    r2629801 r2676217  
    33Plugin Name: ContentStudio
    44Description: ContentStudio provides you with powerful blogging & social media tools to keep your audience hooked by streamlining the process for you to discover and share engaging content on multiple blogging & social media networks
    5 Version: 1.1.4
     5Version: 1.1.5
    66Author: ContentStudio
    77Author URI: http://contentstudio.io/
     
    4040        protected $assets = 'https://contentstudio.io/img';
    4141
    42         private $version = "1.1.4";
     42        private $version = "1.1.5";
    4343
    4444        protected $contentstudio_id = '';
     
    473473                        if ($user && $user->ID != 0) {
    474474                            if (wp_check_password($_REQUEST['password'], $user->data->user_pass, $user->ID)) {
    475                                 if (in_array('administrator', $user->roles) || in_array('editor', $user->roles) || in_array('author', $user->roles)) {
     475                                if ($user->has_cap('publish_posts') && $user->has_cap('edit_posts')) {
    476476                                    echo json_encode(['status' => true, 'message' => 'User verification completed successfully!']);
    477477                                    die();
    478478                                } else {
    479                                     echo json_encode(['status' => false, 'message' => 'Your WordPress user role should be administrator, editor or author.']);
     479                                    echo json_encode(['status' => false, 'message' => "You don't have permissions or the capabilities to publish or edit posts."]);
    480480                                    die();
    481481                                }
     
    647647                $valid = $this->do_validate_cstu_token($_REQUEST['token']);
    648648                if ($valid) {
    649                     $authors = get_users(['role__in' => ['editor', 'administrator', 'author']]);
     649                    $authors = get_users();
    650650                    $return_authors = [];
    651651                    foreach ($authors as $author) {
     652                        if (!$author->has_cap('publish_posts') || !$author->has_cap('edit_posts')) {
     653                            continue;
     654                        }
    652655                        $return_authors[] = [
    653656                            "display_name" => $author->data->display_name,
Note: See TracChangeset for help on using the changeset viewer.