Changeset 2676217
- Timestamp:
- 02/10/2022 09:33:49 AM (4 years ago)
- Location:
- contentstudio
- Files:
-
- 2 edited
- 1 copied
-
tags/1.1.5 (copied) (copied from contentstudio/trunk)
-
tags/1.1.5/contentstudio-plugin.php (modified) (4 diffs)
-
trunk/contentstudio-plugin.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
contentstudio/tags/1.1.5/contentstudio-plugin.php
r2629801 r2676217 3 3 Plugin Name: ContentStudio 4 4 Description: 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. 45 Version: 1.1.5 6 6 Author: ContentStudio 7 7 Author URI: http://contentstudio.io/ … … 40 40 protected $assets = 'https://contentstudio.io/img'; 41 41 42 private $version = "1.1. 4";42 private $version = "1.1.5"; 43 43 44 44 protected $contentstudio_id = ''; … … 473 473 if ($user && $user->ID != 0) { 474 474 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')) { 476 476 echo json_encode(['status' => true, 'message' => 'User verification completed successfully!']); 477 477 die(); 478 478 } 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."]); 480 480 die(); 481 481 } … … 647 647 $valid = $this->do_validate_cstu_token($_REQUEST['token']); 648 648 if ($valid) { 649 $authors = get_users( ['role__in' => ['editor', 'administrator', 'author']]);649 $authors = get_users(); 650 650 $return_authors = []; 651 651 foreach ($authors as $author) { 652 if (!$author->has_cap('publish_posts') || !$author->has_cap('edit_posts')) { 653 continue; 654 } 652 655 $return_authors[] = [ 653 656 "display_name" => $author->data->display_name, -
contentstudio/trunk/contentstudio-plugin.php
r2629801 r2676217 3 3 Plugin Name: ContentStudio 4 4 Description: 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. 45 Version: 1.1.5 6 6 Author: ContentStudio 7 7 Author URI: http://contentstudio.io/ … … 40 40 protected $assets = 'https://contentstudio.io/img'; 41 41 42 private $version = "1.1. 4";42 private $version = "1.1.5"; 43 43 44 44 protected $contentstudio_id = ''; … … 473 473 if ($user && $user->ID != 0) { 474 474 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')) { 476 476 echo json_encode(['status' => true, 'message' => 'User verification completed successfully!']); 477 477 die(); 478 478 } 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."]); 480 480 die(); 481 481 } … … 647 647 $valid = $this->do_validate_cstu_token($_REQUEST['token']); 648 648 if ($valid) { 649 $authors = get_users( ['role__in' => ['editor', 'administrator', 'author']]);649 $authors = get_users(); 650 650 $return_authors = []; 651 651 foreach ($authors as $author) { 652 if (!$author->has_cap('publish_posts') || !$author->has_cap('edit_posts')) { 653 continue; 654 } 652 655 $return_authors[] = [ 653 656 "display_name" => $author->data->display_name,
Note: See TracChangeset
for help on using the changeset viewer.