Plugin Directory

Changeset 2456516


Ignore:
Timestamp:
01/14/2021 07:06:39 PM (5 years ago)
Author:
scottopolis
Message:

v4.0.7

Location:
apppresser
Files:
859 added
4 edited

Legend:

Unmodified
Added
Removed
  • apppresser/trunk/apppresser.php

    r2440838 r2456516  
    66Text Domain: apppresser
    77Domain Path: /languages
    8 Version: 4.0.6
     8Version: 4.0.7
    99Author: AppPresser Team
    1010Author URI: http://apppresser.com
     
    3333class AppPresser {
    3434
    35     const VERSION           = '4.0.6';
     35    const VERSION           = '4.0.7';
    3636    const SETTINGS_NAME     = 'appp_settings';
    3737    public static $settings = 'false';
     
    182182    {
    183183        if (class_exists('Jwt_Auth_Public')) {
    184             if (isset($_REQUEST['appp']) && ((int) $_REQUEST['appp'] === 3) && isset($_REQUEST['token'])) {
     184            $appp3Exists = isset($_REQUEST['appp']) && ((int) $_REQUEST['appp'] === 3);
     185            $restExists = isset($_REQUEST['rest']) && ($_REQUEST['rest'] === 'true');
     186            $tokenExists = isset($_REQUEST['token']);
     187            if (($appp3Exists || $restExists) && $tokenExists) {
    185188                $userId = $this->_getUserIdFromToken($_REQUEST['token']);
    186189                // Login the user that we retrieved from token, if exists
  • apppresser/trunk/inc/AppPresser_Extend_Comments.php

    r2440838 r2456516  
    1111    public function hooks()
    1212    {
     13        add_filter('rest_allow_anonymous_comments', array($this, 'filter_rest_allow_anonymous_comments'));
     14
    1315        if (isset($_REQUEST['children']) && ($_REQUEST['children'] === 'true')) {
    1416            add_action('rest_api_init', array($this, 'add_children_field_to_comment_endpoint'));
    1517        }
     18    }
     19
     20    /**
     21     * Allow adding anonymous comments from API
     22     */
     23    public function filter_rest_allow_anonymous_comments()
     24    {
     25        return true;
    1626    }
    1727
  • apppresser/trunk/inc/AppPresser_Theme_Switcher.php

    r2440838 r2456516  
    124124        if( !wp_is_mobile() && self::get_apv() === 3 && isset( $_COOKIE["AppPresser_Appp3"] ) && !isset( $_COOKIE["AppPresser_Preview"] ) ) {
    125125            setcookie( 'AppPresser_Appp3', '', time()-300, '/' );
    126             header("Refresh:0");
    127126        }
    128127    }
  • apppresser/trunk/readme.txt

    r2440838 r2456516  
    55Requires at least: 4.7.0
    66Tested up to: 5.6
    7 Stable tag: 4.0.6
     7Stable tag: 4.0.7
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4747
    4848== Changelog ==
     49
     50= 4.0.7 =
     51* Fix for adding comments anonymously via API
     52* Refresh bug fix
     53* Support login parameter
    4954
    5055= 4.0.6 =
Note: See TracChangeset for help on using the changeset viewer.