Plugin Directory

Changeset 3470167


Ignore:
Timestamp:
02/26/2026 10:43:30 AM (10 days ago)
Author:
israpil
Message:

check if user can edit specific post

Location:
webtexttool/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • webtexttool/trunk/README.txt

    r3454513 r3470167  
    44Requires at least: 3.5 or higher
    55Tested up to: 6.9
    6 Stable tag: 3.6.4
     6Stable tag: 3.6.5
    77License: GPLv2 or later
    88License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    8484
    8585== Changelog ==
     86
     87= 3.6.5 =
     88
     89Release Date: February 26th, 2026
     90
     91* Fix: check if user can edit specific post
    8692
    8793= 3.6.4 =
  • webtexttool/trunk/core/class-webtexttool-core.php

    r3454513 r3470167  
    736736        $action = $this->get_webtexttoolnonce_action(); // text used to generate or check the nonce.
    737737
    738         if (!current_user_can('edit_posts')) {
    739             exit;
    740         }
    741 
    742738        // check if the nonce and data exist, otherwise exit
    743739        if (array_key_exists('nonce', $_POST) && array_key_exists('data', $_POST) && array_key_exists('postId', $_POST)) {
     
    746742                $data = $_POST['data'];
    747743                $pageid = $_POST['postId'];
     744
     745                // Check if user can edit this specific post
     746                if (!current_user_can('edit_post', $pageid)) {
     747                    $output['message'] = 'unauthorized';
     748                    header("Content-Type: application/json");
     749                    echo json_encode($output);
     750                    die();
     751                }
    748752
    749753                $option_key = $data['option'];
  • webtexttool/trunk/webtexttool.php

    r3454513 r3470167  
    77 * Plugin URI:        https://www.textmetrics.com
    88 * Description:       Textmetrics is the easiest way to create SEO proof content to rank higher and get more traffic. Realtime optimization, keyword research and more.
    9  * Version:           3.6.4
     9 * Version:           3.6.5
    1010 * Author:            Textmetrics
    1111 * Author URI:        https://www.textmetrics.com
     
    1616 */
    1717
    18 define('WTT_VERSION', '3.6.4');
     18define('WTT_VERSION', '3.6.5');
    1919define('WTT_SHORT_URL', "api.textmetrics.com");
    2020define('WTT_BASE_API_URL', 'https://api.textmetrics.com/');
Note: See TracChangeset for help on using the changeset viewer.