Plugin Directory

Changeset 3290564


Ignore:
Timestamp:
05/09/2025 02:38:52 PM (11 months ago)
Author:
vasyltech
Message:

Official 7.0.1

Location:
advanced-access-manager
Files:
328 added
18 edited

Legend:

Unmodified
Added
Removed
  • advanced-access-manager/trunk/aam.php

    r3286780 r3290564  
    44 * Plugin Name: Advanced Access Manager
    55 * Description: Powerfully robust WordPress plugin designed to help you control every aspect of your website, your way.
    6  * Version: 7.0.0
     6 * Version: 7.0.1
    77 * Author: VasylTech LLC <support@aamplugin.com>
    88 * Author URI: https://aamportal.com
     
    288288    define('AAM_MEDIA', plugins_url('/media', __FILE__));
    289289    define('AAM_KEY', 'advanced-access-manager');
    290     define('AAM_VERSION', '7.0.0');
     290    define('AAM_VERSION', '7.0.1');
    291291    define('AAM_BASEDIR', __DIR__);
    292292
  • advanced-access-manager/trunk/application/Addon/Repository.php

    r3286780 r3290564  
    3434     * @version 7.0.0
    3535     */
    36     const LATEST_PREMIUM_VERSION = '7.0.0';
     36    const LATEST_PREMIUM_VERSION = '7.0.1';
    3737
    3838    /**
  • advanced-access-manager/trunk/application/Backend/Manager.php

    r3286780 r3290564  
    150150
    151151        if (!is_null($premium['version']) && $premium['hasUpdate']) {
    152             AAM_Core_Console::add(
    153                 __('The new version of premium add-on is available. Go to your license page to download the latest release.', 'advanced-access-manager')
    154             );
     152            AAM_Core_Console::add(__(
     153                'The new version of premium add-on is available. Go to your license page to download the latest release.',
     154                'advanced-access-manager'
     155            ));
    155156        }
    156157    }
  • advanced-access-manager/trunk/application/Framework/Manager.php

    r3286780 r3290564  
    292292     *
    293293     * @return void
    294      *
    295294     * @access public
    296      * @version 7.0.0
     295     *
     296     * @version 7.0.1
    297297     */
    298298    public function __call($name, $args)
    299299    {
    300         $result = null;
    301 
    302         if (array_key_exists($name, $this->_services)) {
    303             $acl      = array_shift($args);
    304             $settings = array_shift($args);
    305 
    306             if (!is_array($settings)) {
    307                 $settings = [];
     300        $result   = null;
     301        $acl      = array_shift($args);
     302        $settings = array_shift($args);
     303
     304        if (!is_array($settings)) {
     305            $settings = [];
     306        }
     307
     308        // Prepare settings for the service
     309        $settings = array_replace($this->_default_settings, $settings);
     310
     311        try {
     312            if (array_key_exists($name, $this->_services)) {
     313                // Parse the incoming context and determine correct access level
     314                if (empty($acl)) { // Use default access level
     315                    $acl = $this->_default_access_level;
     316                } elseif (is_string($acl)) {
     317                    $acl = $this->_string_to_access_level($acl);
     318                }
     319
     320                if (!is_a($acl, AAM_Framework_AccessLevel_Interface::class)) {
     321                    throw new InvalidArgumentException(
     322                        'Invalid access level provided'
     323                    );
     324                }
     325
     326                // Work with cache
     327                $cache_key = [ $acl->type, $acl->get_id(), $name, $settings ];
     328                $result    = $this->object_cache->get($cache_key);
     329
     330                if (empty($result)) {
     331                    $result = call_user_func(
     332                        "{$this->_services[$name]}::get_instance",
     333                        $acl,
     334                        $settings
     335                    );
     336
     337                    $this->object_cache->set($cache_key, $result);
     338                }
     339            } else {
     340                throw new BadMethodCallException(sprintf(
     341                    'There is no service %s defined', esc_js($name)
     342                ));
    308343            }
    309 
    310             // Parse the incoming context and determine correct access level
    311             if (empty($acl)) { // Use default access level
    312                 $acl = $this->_default_access_level;
    313             } elseif (is_string($acl)) {
    314                 $acl = $this->_string_to_access_level($acl);
    315             }
    316 
    317             if (!is_a($acl, AAM_Framework_AccessLevel_Interface::class)) {
    318                 throw new InvalidArgumentException(
    319                     'Invalid access level provided'
    320                 );
    321             }
    322 
    323             // Prepare settings for the service
    324             $settings  = array_replace($this->_default_settings, $settings);
    325 
    326             // Work with cache
    327             $cache_key = [ $acl->type, $acl->get_id(), $name, $settings ];
    328             $result    = $this->object_cache->get($cache_key);
    329 
    330             if (empty($result)) {
    331                 $result = call_user_func(
    332                     "{$this->_services[$name]}::get_instance",
    333                     $acl,
    334                     $settings
    335                 );
    336 
    337                 $this->object_cache->set($cache_key, $result);
    338             }
    339         } else {
    340             throw new BadMethodCallException(sprintf(
    341                 'There is no service %s defined', esc_js($name)
    342             ));
     344        } catch (Exception $e) {
     345            $result = $this->_handle_error($e, $settings);
    343346        }
    344347
     
    354357     * @access public
    355358     *
    356      * @version 7.0.0
     359     * @version 7.0.1
    357360     */
    358361    public function __get($name)
    359362    {
    360         if (array_key_exists($name, $this->_utilities)) {
    361             $result = $this->_utilities[$name]::bootstrap();
    362         } else {
    363             throw new BadMethodCallException(sprintf(
    364                 'There is no utility %s defined', esc_js($name)
    365             ));
     363        try {
     364            if (array_key_exists($name, $this->_utilities)) {
     365                $result = $this->_utilities[$name]::bootstrap();
     366            } else {
     367                throw new BadMethodCallException(sprintf(
     368                    'There is no utility %s defined', esc_js($name)
     369                ));
     370            }
     371        } catch (Exception $e) {
     372            $result = $this->_handle_error($e);
    366373        }
    367374
     
    377384     * @access public
    378385     *
    379      * @version 7.0.0
     386     * @version 7.0.1
    380387     */
    381388    public function has_service($name)
    382389    {
    383         return array_key_exists($name, $this->_services);
     390        try {
     391            $result = array_key_exists($name, $this->_services);
     392        } catch (Exception $e) {
     393            $result = $this->_handle_error($e);
     394        }
     395
     396        return $result;
    384397    }
    385398
     
    392405     * @access public
    393406     *
    394      * @version 7.0.0
     407     * @version 7.0.1
    395408     */
    396409    public function has_utility($name)
    397410    {
    398         return array_key_exists($name, $this->_utilities);
     411        try {
     412            $result = array_key_exists($name, $this->_utilities);
     413        } catch (Exception $e) {
     414            $result = $this->_handle_error($e);
     415        }
     416
     417        return $result;
    399418    }
    400419
     
    520539
    521540    /**
     541     * Handle error
     542     *
     543     * @param Exception $exception
     544     * @param array     $settings
     545     *
     546     * @return mixed
     547     * @access private
     548     *
     549     * @version 7.0.1
     550     */
     551    private function _handle_error($exception, $settings = [])
     552    {
     553        return $this->misc->handle_error(
     554            $exception, array_replace($this->_default_settings, $settings)
     555        );
     556    }
     557
     558    /**
    522559     * Get single instance of itself
    523560     *
  • advanced-access-manager/trunk/application/Framework/Service/BaseTrait.php

    r3286780 r3290564  
    257257     * @access private
    258258     *
    259      * @version 7.0.0
     259     * @version 7.0.1
    260260     */
    261261    private function _handle_error($exception)
    262262    {
    263         $response = null;
    264 
    265         // Determine what is the proper error handling strategy to pick
    266         if (!empty($this->_settings['error_handling'])) {
    267             $strategy = $this->_settings['error_handling'];
    268         } else {
    269             // Do not rely on WP_DEBUG as many website owners forget to turn off
    270             // debug mode in production
    271             $strategy = 'wp_trigger_error';
    272         }
    273 
    274         if ($strategy === 'exception') {
    275             throw $exception;
    276         } elseif ($strategy === 'wp_error') {
    277             $response = new WP_Error('error', $exception->getMessage());
    278         } else {
    279             wp_trigger_error(static::class, $exception->getMessage());
    280         }
    281 
    282         return $response;
     263        return $this->misc->handle_error($exception, $this->_settings);
    283264    }
    284265
  • advanced-access-manager/trunk/application/Framework/Utility/Cache.php

    r3286780 r3290564  
    4040     *
    4141     * @var array
     42     * @access protected
    4243     *
    43      * @access protected
    4444     * @version 7.0.0
    4545     */
     
    102102     *
    103103     * @return boolean
     104     * @access public
    104105     *
    105      * @access public
    106106     * @version 7.0.0
    107107     */
     
    134134     *
    135135     * @return boolean
     136     * @access public
    136137     *
    137      * @access public
    138138     * @version 7.0.0
    139139     */
     
    156156     *
    157157     * @return bool
     158     * @access public
    158159     *
    159      * @access public
    160160     * @version 7.0.0
    161161     */
     
    186186     *
    187187     * @return bool
     188     * @access private
    188189     *
    189      * @access private
    190      * @version 7.0.0
     190     * @version 7.0.1
    191191     */
    192192    private function _update($data)
    193193    {
    194         return AAM_Framework_Manager::_()->db->write(self::DB_OPTION, $data);
     194        return AAM_Framework_Manager::_()->db->write(self::DB_OPTION, $data, false);
    195195    }
    196196
  • advanced-access-manager/trunk/application/Framework/Utility/Capabilities.php

    r3286780 r3290564  
    7171        // Also get the list of all capabilities assigned directly to user
    7272        if (is_numeric($user)) {
    73             $user = get_user($user);
     73            $user = get_user_by('id', $user);
    7474        }
    7575
  • advanced-access-manager/trunk/application/Framework/Utility/Jwt.php

    r3286780 r3290564  
    6060     *
    6161     * @return array
    62      *
    6362     * @access public
     63     *
    6464     * @version 7.0.0
    6565     */
  • advanced-access-manager/trunk/application/Framework/Utility/Misc.php

    r3286780 r3290564  
    1919
    2020    use AAM_Framework_Utility_BaseTrait;
     21
     22    /**
     23     * Handle framework error
     24     *
     25     * @param Exception $exception
     26     * @param array     $settings
     27     *
     28     * @return mixed
     29     * @access private
     30     *
     31     * @version 7.0.1
     32     */
     33    public function handle_error($exception, $settings = [])
     34    {
     35        $response = null;
     36
     37        // Determine what is the proper error handling strategy to pick
     38        if (!empty($settings['error_handling'])) {
     39            $strategy = $settings['error_handling'];
     40        } else {
     41            // Do not rely on WP_DEBUG as many website owners forget to turn off
     42            // debug mode in production
     43            $strategy = 'wp_trigger_error';
     44        }
     45
     46        if ($strategy === 'exception') {
     47            throw $exception;
     48        } elseif ($strategy === 'wp_error') {
     49            $response = new WP_Error('error', $exception->getMessage());
     50        } else {
     51            wp_trigger_error(static::class, $exception->getMessage());
     52        }
     53
     54        return $response;
     55    }
    2156
    2257    /**
     
    275310     * @access public
    276311     *
    277      * @version 7.0.0
     312     * @version 7.0.1
    278313     */
    279314    public function merge_permissions($incoming, $base, $resource_type)
     
    289324
    290325        // First get the complete list of unique keys
    291         $permission_keys = array_unique([
    292             ...array_keys($incoming),
    293             ...array_keys($base)
    294         ]);
     326        $permission_keys = array_unique(array_merge(
     327            array_keys($incoming),
     328            array_keys($base)
     329        ));
    295330
    296331        foreach($permission_keys as $permission_key) {
     
    447482     * @access public
    448483     *
    449      * @version 7.0.0
     484     *
     485     * @version 7.0.1
    450486     */
    451487    public function get_current_area()
     
    453489        if (is_admin()) {
    454490            $result = 'backend';
    455         } elseif (wp_is_rest_endpoint() || defined('REST_REQUEST')) {
     491        } elseif ($this->_is_rest_endpoint()) {
    456492            $result = 'api';
    457493        } else {
     
    537573    }
    538574
     575    /**
     576     * Check if REST request is processed
     577     *
     578     * Keep it compatible with older WP versions
     579     *
     580     * @return bool
     581     * @access private
     582     *
     583     * @version 7.0.1
     584     */
     585    private function _is_rest_endpoint()
     586    {
     587        global $wp_rest_server;
     588
     589        if (function_exists('wp_is_rest_endpoint')) {
     590            $result = wp_is_rest_endpoint();
     591        } else {
     592            $result = defined('REST_REQUEST') && REST_REQUEST;
     593
     594            if (!$result && is_a($wp_rest_server, WP_REST_Server::class)) {
     595                $result = $wp_rest_server->is_dispatching();
     596            }
     597
     598            $result = apply_filters('wp_is_rest_endpoint', $result);
     599        }
     600
     601        return $result;
     602    }
    539603
    540604}
  • advanced-access-manager/trunk/application/Framework/Utility/Redirect.php

    r3286780 r3290564  
    2828     * @access public
    2929     *
    30      * @version 7.0.0
    31      */
    32     public function do_redirect(array $redirect)
     30     * @version 7.0.1
     31     */
     32    public function do_redirect($redirect)
    3333    {
    3434        // Determine redirect HTTP status code and use it if applicable for given
  • advanced-access-manager/trunk/application/Migration/Migration_700.php

    r3286780 r3290564  
    279279            $exists = wp_roles()->is_role($id);
    280280        } else {
    281             $exists = is_a(get_user($id), WP_User::class);
     281            $exists = is_a(get_user_by('id', $id), WP_User::class);
    282282        }
    283283
     
    917917
    918918                $item = [
    919                     'effect' => $this->_convert_to_effect($settings),
     919                    'effect' => !empty($areas) && $this->_convert_to_effect(
     920                        $settings
     921                    ),
    920922                    'on'     => $areas
    921923                ];
     
    10391041                $result['list'] = [
    10401042                    'effect' => $this->_convert_to_effect($settings),
    1041                     'on'     =>  $this->_prepare_visibility_areas($settings)
     1043                    'on'     => $this->_prepare_visibility_areas($settings)
    10421044                ];
    10431045            } elseif (in_array($action, ['create', 'edit', 'delete', 'assign'], true)) {
  • advanced-access-manager/trunk/application/Restful/Jwt.php

    r3286780 r3290564  
    132132            ], self::PERMISSIONS, [ AAM_Framework_Type_AccessLevel::USER ]);
    133133
     134            // Refresh a token
     135            $this->_register_route('/jwt/(?P<id>[\w\-]+)', [
     136                'methods'  => WP_REST_Server::EDITABLE,
     137                'callback' => [ $this, 'refresh_token'],
     138                'args'     => [
     139                    'id' => [
     140                        'description' => 'Token unique ID',
     141                        'type'        => 'string',
     142                        'format'      => 'uuid',
     143                        'required'    => true
     144                    ]
     145                ]
     146            ], self::PERMISSIONS, [ AAM_Framework_Type_AccessLevel::USER ]);
     147
    134148            // Reset all tokens
    135149            $this->_register_route('/jwts', [
     
    243257                $request->get_param('fields')
    244258            );
     259        } catch (Exception $e) {
     260            $result = $this->_prepare_error_response($e);
     261        }
     262
     263        return rest_ensure_response($result);
     264    }
     265
     266    /**
     267     * Refresh a token
     268     *
     269     * @param WP_REST_Request $request
     270     *
     271     * @return WP_REST_Response
     272     * @access public
     273     *
     274     * @version 7.0.0
     275     */
     276    public function refresh_token(WP_REST_Request $request)
     277    {
     278        try {
     279            $service = $this->_get_service($request);
     280            $token   = $service->get_token_by($request->get_param('id'), 'jti');
     281
     282            if (!empty($token['is_valid'])) {
     283                $result = $service->refresh($token['token']);
     284            } else {
     285                throw new OutOfRangeException('Token is invalid or does not exist');
     286            }
    245287        } catch (Exception $e) {
    246288            $result = $this->_prepare_error_response($e);
  • advanced-access-manager/trunk/application/Restful/SecureLogin.php

    r3286780 r3290564  
    4444            $this->_register_route('/authenticate', [
    4545                'methods'  => WP_REST_Server::CREATABLE,
    46                 'callback' => array($this, 'authenticate'),
    47                 'args'     => array(
    48                         'username' => array(
     46                'callback' => [ $this, 'authenticate' ],
     47                'args'     => [
     48                        'username' => [
    4949                        'description' => 'Valid username',
    5050                        'type'        => 'string',
    5151                        'required'    => true
    52                     ),
    53                     'password' => array(
     52                    ],
     53                    'password' => [
    5454                        'description' => 'Valid password',
    5555                        'type'        => 'string',
    5656                        'required'    => true
    57                     ),
    58                     'remember' => array(
     57                    ],
     58                    'remember' => [
    5959                        'description' => 'Prolong the user session.',
    6060                        'type'        => 'boolean',
    6161                        'default'     => false
    62                     ),
    63                     'return_auth_cookies' => array(
     62                    ],
     63                    'return_auth_cookies' => [
    6464                        'description' => 'Return auth cookies.',
    6565                        'type'        => 'boolean',
    6666                        'default'     => false
    67                     ),
    68                     'fields' => array(
     67                    ],
     68                    'fields' => [
    6969                        'description' => 'List of additional fields to return',
    7070                        'type'        => 'string',
     
    7272                            return $this->_validate_fields_input($value);
    7373                        }
    74                     )
    75                 )
     74                    ]
     75                ]
    7676            ], function() { return !is_user_logged_in(); }, false);
    7777        });
     
    9696            }
    9797
    98             $user = wp_signon(array(
     98            $user = wp_signon([
    9999                'user_login'    => $request->get_param('username'),
    100100                'user_password' => $request->get_param('password'),
    101101                'remember'      => $request->get_param('remember')
    102             ));
     102            ]);
    103103
    104104            if (!is_wp_error($user)) {
     
    171171                    'rest_invalid_param',
    172172                    sprintf('Invalid fields: %s', implode(', ', $invalid_fields)),
    173                     array('status'  => 400)
     173                    [ 'status'  => 400 ]
    174174                );
    175175            }
  • advanced-access-manager/trunk/application/Service/Core.php

    r3286780 r3290564  
    276276        AAM_Restful_Configs::bootstrap();
    277277        AAM_Restful_Settings::bootstrap();
     278        AAM_Restful_BackwardCompatibility::bootstrap();
    278279    }
    279280
     
    566567     * @access private
    567568     *
    568      * @version 7.0.0
     569     * @version 7.0.1
    569570     */
    570571    private function _control_admin_area_access()
    571572    {
    572         if (is_user_logged_in()) {
     573        if (is_user_logged_in() && is_admin()) {
    573574            // Check if user is allowed to see backend
    574575            if (!$this->_current_user_can('aam_access_dashboard')) {
  • advanced-access-manager/trunk/application/Service/Identity.php

    r3286780 r3290564  
    200200     * @access private
    201201     *
    202      * @version 7.0.0
     202     * @version 7.0.1
    203203     */
    204204    private function _prepare_filter_args($args)
     
    229229
    230230        if (!empty($args['include'])) {
    231             $include         = array_diff($args['include'], $users_not_in);
     231            $include         = array_diff((array) $args['include'], $users_not_in);
    232232            $args['include'] = empty($include) ? [ 0 ] : $include;
    233233        } elseif (!empty($args['exclude'])) {
    234234            $args['exclude'] = array_unique(array_merge(
    235                 $args['exclude'],
     235                (array) $args['exclude'],
    236236                $users_not_in
    237237            ));
     
    243243        if (!empty($args['role__in'])) {
    244244            // Remove roles that are hidden
    245             $role__in         = array_diff($args['role__in'], $roles_not_in);
     245            $role__in         = array_diff((array) $args['role__in'], $roles_not_in);
    246246            $args['role__in'] = empty($role__in) ? [ 'do_not_allow' ] : $role__in;
    247247        } elseif (!empty($args['role__not_in'])) {
    248248            $args['role__not_in'] = array_unique(array_merge(
    249                 $args['role__not_in'],
     249                (array) $args['role__not_in'],
    250250                $roles_not_in
    251251            ));
  • advanced-access-manager/trunk/application/Service/Jwt.php

    r3286780 r3290564  
    133133    private function _prepare_login_response($response, $request, $user)
    134134    {
    135         $issue_jwt             = $request->get_param('issue_jwt');
    136         $issue_refreshable_jwt = $request->get_param('issue_refreshable_jwt');
     135        $issue_jwt = $this->_get_backward_compatible_request_param(
     136            'issue_jwt', 'issueJWT', $request
     137        );
     138        $issue_refreshable_jwt = $this->_get_backward_compatible_request_param(
     139            'issue_refreshable_jwt',
     140            'refreshableJWT',
     141            $request
     142        );
    137143
    138144        if (is_array($response) && ($issue_jwt || $issue_refreshable_jwt)) {
     
    140146                if (current_user_can('aam_issue_refreshable_jwt')) {
    141147                    throw new DomainException(
    142                         'Current user is not allowed to issue refreshable JWT token'
     148                        'You are not allowed to issue refreshable JWT token'
    143149                    );
    144150                }
     
    149155            ]);
    150156
    151             $response['jwt'] = array(
     157            $response['jwt'] = [
    152158                'token'         => $result['token'],
    153159                'token_expires' => $result['claims']['exp']
    154             );
     160            ];
    155161        }
    156162
    157163        return $response;
     164    }
     165
     166    /**
     167     * Get backward compatible param from request
     168     *
     169     * @param string          $new_param
     170     * @param string          $legacy_param
     171     * @param WP_REST_Request $request
     172     * @param bool            $default
     173     *
     174     * @return string|null
     175     * @access private
     176     *
     177     * @version 7.0.1
     178     */
     179    private function _get_backward_compatible_request_param(
     180        $new_param, $legacy_param, $request, $default = false
     181    ) {
     182        $result = $request->get_param($new_param);
     183
     184        if (empty($result)) {
     185            $result = $request->get_param($legacy_param);
     186
     187            if (!empty($result)) {
     188                _deprecated_argument('/authenticate', AAM_VERSION, sprintf(
     189                    'The REST %s parameter is deprecated. Replace it with %s',
     190                    $legacy_param,
     191                    $new_param
     192                ));
     193            }
     194        }
     195
     196        return is_null($result) ? $default : $result;
    158197    }
    159198
     
    186225
    187226                    // Get JWT service and verify that token is valid
    188                     $is_valid = AAM::api()->jwts(
    189                         'user:' . $cuid, [ 'error_handling' => 'wp_error' ]
    190                     )->validate($token->jwt);
    191 
    192                     if ($is_valid === true) {
    193                         $is_active = $this->_verify_user_status($cuid);
    194 
    195                         if ($is_active === true) {
    196                             if (in_array(
    197                                 $token->method,
    198                                 [ 'get', 'query', 'query_param' ],
    199                                 true
    200                             )) {
    201                                 // Also authenticate user if token comes from query
    202                                 // param
    203                                 add_action('init', function() use ($cuid, $claims) {
    204                                     $this->_authenticate_user($cuid, $claims);
    205                                 }, 1);
     227                    $service  = AAM::api()->jwts(
     228                        'user:' . $cuid,
     229                        [ 'error_handling' => 'wp_error' ]
     230                    );
     231
     232                    if (!is_wp_error($service)) {
     233                        $is_valid = $service->validate($token->jwt);
     234
     235                        if ($is_valid === true) {
     236                            $is_active = $this->_verify_user_status($cuid);
     237
     238                            if ($is_active === true) {
     239                                if (in_array(
     240                                    $token->method,
     241                                    [ 'get', 'query', 'query_param' ],
     242                                    true
     243                                )) {
     244                                    // Also authenticate user if token comes from query
     245                                    // param
     246                                    add_action('init', function() use ($cuid, $claims) {
     247                                        $this->_authenticate_user($cuid, $claims);
     248                                    }, 1);
     249                                }
     250
     251                                $user_id = $cuid;
    206252                            }
    207 
    208                             $user_id = $cuid;
    209253                        }
    210254                    }
  • advanced-access-manager/trunk/application/Service/LogoutRedirect.php

    r3286780 r3290564  
    5656     * @access protected
    5757     *
    58      * @version 7.0.0
     58     * @version 7.0.1
    5959     */
    6060    protected function initialize_hooks()
     
    6464            $redirect = AAM::api()->logout_redirect()->get_redirect();
    6565
    66             if (empty($redirect) || $redirect['type'] === 'default') {
    67                 $this->_last_user_redirect = [
    68                     'type'         => 'url_redirect',
    69                     'redirect_url' => '/'
    70                 ];
    71             } else {
     66            if (!empty($redirect) && $redirect['type'] !== 'default') {
    7267                $this->_last_user_redirect = $redirect;
    7368            }
     
    7671        // Fired after the user has been logged out successfully
    7772        add_action('wp_logout', function() {
    78             AAM::api()->redirect->do_redirect($this->_last_user_redirect);
     73            if (!empty($this->_last_user_redirect)) {
     74                AAM::api()->redirect->do_redirect($this->_last_user_redirect);
     75            }
    7976        }, PHP_INT_MAX);
    8077
     
    8380    }
    8481
     82    /**
     83     * Get default logout redirect
     84     *
     85     * @return string
     86     * @access private
     87     *
     88     * @version 7.0.1
     89     */
     90    private function _get_default_logout_redirect()
     91    {
     92        $requested_redirect_to = '';
     93        $redirect_to           = AAM::api()->misc->get($_REQUEST, 'redirect_to');
     94        $user                  = wp_get_current_user();
     95
     96        if (!empty($redirect_to) && is_string($redirect_to)) {
     97            $result = $requested_redirect_to = $redirect_to;
     98        } else {
     99            $result = add_query_arg([
     100                'loggedout' => 'true',
     101                'wp_lang'   => get_user_locale(wp_get_current_user())
     102            ], wp_login_url());
     103        }
     104
     105        return apply_filters(
     106            'logout_redirect', $result, $requested_redirect_to, $user
     107        );
     108    }
     109
    85110}
  • advanced-access-manager/trunk/readme.txt

    r3286780 r3290564  
    55Requires PHP: 5.6.0
    66Tested up to: 6.8.0
    7 Stable tag: 7.0.0
     7Stable tag: 7.0.1
    88
    99Your WordPress security starts within — with AAM. Take control of your WordPress website and solve security gaps today.
     
    6060
    6161== Changelog ==
     62
     63= 7.0.1 =
     64* Fixed: Access Denied message when aam_access_dashboard capability is created [https://github.com/aamplugin/advanced-access-manager/issues/451](https://github.com/aamplugin/advanced-access-manager/issues/451)
     65* Fixed: PHP Warning: array_diff(): Expected parameter 1 to be an array, string given in /.../Service/Identity.php on line 245 [https://github.com/aamplugin/advanced-access-manager/issues/449](https://github.com/aamplugin/advanced-access-manager/issues/449)
     66* Fixed: Framework Manager error handling [https://github.com/aamplugin/advanced-access-manager/issues/448](https://github.com/aamplugin/advanced-access-manager/issues/448)
     67* Fixed: Error type E_PARSE in .../Framework/Utility/Misc.php on line 292. Error message: syntax error, unexpected ‘…’ [https://github.com/aamplugin/advanced-access-manager/issues/447](https://github.com/aamplugin/advanced-access-manager/issues/447)
     68* Fixed: PHP Fatal error. undefined function get_user [https://github.com/aamplugin/advanced-access-manager/issues/446](https://github.com/aamplugin/advanced-access-manager/issues/446)
     69* Fixed: PHP Fatal error. undefined function wp_is_rest_endpoint [https://github.com/aamplugin/advanced-access-manager/issues/445](https://github.com/aamplugin/advanced-access-manager/issues/445)
     70* Fixed: v2 api broken [https://github.com/aamplugin/advanced-access-manager/issues/444](https://github.com/aamplugin/advanced-access-manager/issues/444)
     71* Changed: Default to WordPress default logout redirect [https://github.com/aamplugin/advanced-access-manager/issues/450](https://github.com/aamplugin/advanced-access-manager/issues/450)
     72
     73= 7.0.0 =
     74* Official 7.0.0
     75
     76= 6.9.51 =
     77* Fixed: PHP Notice: Function _load_textdomain_just_in_time [https://github.com/aamplugin/advanced-access-manager/issues/442](https://github.com/aamplugin/advanced-access-manager/issues/442)
     78* Fixed: The Access Manager Metabox does not initialize correctly [https://github.com/aamplugin/advanced-access-manager/issues/441](https://github.com/aamplugin/advanced-access-manager/issues/441)
     79* Fixed: Incorrectly invoked translation function [https://github.com/aamplugin/advanced-access-manager/issues/440](https://github.com/aamplugin/advanced-access-manager/issues/440)
     80* Fixed: Download audit report issue [https://github.com/aamplugin/advanced-access-manager/issues/438](https://github.com/aamplugin/advanced-access-manager/issues/438)
     81
     82= 6.9.49 =
     83* Fixed: Resetting all settings does not actually reset them all [https://github.com/aamplugin/advanced-access-manager/issues/436](https://github.com/aamplugin/advanced-access-manager/issues/436)
     84* New: Allow to prepare the executive audit report [https://github.com/aamplugin/advanced-access-manager/issues/437](https://github.com/aamplugin/advanced-access-manager/issues/437)
     85
     86= 6.9.48 =
     87* Fixed: Notice in WordPress if the none-default language is active [https://github.com/aamplugin/advanced-access-manager/issues/435](https://github.com/aamplugin/advanced-access-manager/issues/435)
     88* Fixed: PHP Warning: Array to string conversion in /.../RoleTransparencyCheck.php on line 83 [https://github.com/aamplugin/advanced-access-manager/issues/433](https://github.com/aamplugin/advanced-access-manager/issues/433)
     89* New: Give the ability to share security audit report [https://github.com/aamplugin/advanced-access-manager/issues/434](https://github.com/aamplugin/advanced-access-manager/issues/434)
     90
     91= 6.9.47 =
     92* Fixed: PHP Warning: Array to string conversion in /.../RoleTransparencyCheck.php on line 83 [https://github.com/aamplugin/advanced-access-manager/issues/433](https://github.com/aamplugin/advanced-access-manager/issues/433)
     93
     94= 6.9.46 =
     95* Added: Run AAM Audit periodically [https://github.com/aamplugin/advanced-access-manager/issues/432](https://github.com/aamplugin/advanced-access-manager/issues/432)
     96* Added: Allow the ability to jump to a specific AAM tab [https://github.com/aamplugin/advanced-access-manager/issues/431](https://github.com/aamplugin/advanced-access-manager/issues/431)
     97
     98= 6.9.45 =
     99* Added: Introduce AAM Security Score Widget [https://github.com/aamplugin/advanced-access-manager/issues/430](https://github.com/aamplugin/advanced-access-manager/issues/430)
     100
     101= 6.9.44 =
     102* Removed: AI Chatbot service. We are moving it all to [aamportal.com](https://aamportal.com) website as Virtual assistant
     103* Removed: Contact form. We are changing our customer support policy and directing customers to the [contact us](https://aamportal.com/contact-us) page instead
    62104
    63105= 6.9.43=
     
    323365* Fixed: Notice: Undefined variable: cache [https://github.com/aamplugin/advanced-access-manager/issues/223](https://github.com/aamplugin/advanced-access-manager/issues/223)
    324366* Changed: Update JWT vendor [https://github.com/aamplugin/advanced-access-manager/issues/221](https://github.com/aamplugin/advanced-access-manager/issues/221)
    325 
    326 = 6.8.5 =
    327 * Fixed: Redirect may not always work [https://github.com/aamplugin/advanced-access-manager/issues/214](https://github.com/aamplugin/advanced-access-manager/issues/214)
    328 * Fixed: PHP Notice: Undefined index: 404.redirect.** [https://github.com/aamplugin/advanced-access-manager/issues/215](https://github.com/aamplugin/advanced-access-manager/issues/215)
    329 * Changed: Update DataTables to 1.12.1 [https://github.com/aamplugin/advanced-access-manager/issues/217](https://github.com/aamplugin/advanced-access-manager/issues/217)
    330 * Added New: Allow value chaining for PHP_GLOBAL marker [https://github.com/aamplugin/advanced-access-manager/issues/216](https://github.com/aamplugin/advanced-access-manager/issues/216)
    331 * Added New: Add the ability to filter assigned/unassigned capabilities [https://github.com/aamplugin/advanced-access-manager/issues/218](https://github.com/aamplugin/advanced-access-manager/issues/218)
    332 
    333 = 6.8.4 =
    334 * Fixed: PHP Notice: Undefined property: stdClass::$override [https://github.com/aamplugin/advanced-access-manager/issues/211](https://github.com/aamplugin/advanced-access-manager/issues/211)
    335 * Changed: Upgraded iFrame resizer library [https://github.com/aamplugin/advanced-access-manager/issues/213](https://github.com/aamplugin/advanced-access-manager/issues/213)
    336 * Changed: Replace CodeMirror with WP default instance [https://github.com/aamplugin/advanced-access-manager/issues/212](https://github.com/aamplugin/advanced-access-manager/issues/212)
    337 
    338 = 6.8.3 =
    339 * Fixed: PHP Deprecated: filter_var(): Passing null to parameter [https://github.com/aamplugin/advanced-access-manager/issues/208](https://github.com/aamplugin/advanced-access-manager/issues/208)
    340 * Added New: Extend CALLBACK to support inline arguments [https://github.com/aamplugin/advanced-access-manager/issues/206](https://github.com/aamplugin/advanced-access-manager/issues/206)
    341 * Added New: Add support for the THE_POST token [https://github.com/aamplugin/advanced-access-manager/issues/205](https://github.com/aamplugin/advanced-access-manager/issues/205)
    342 * Added New: Add support for new resource types Filter & Action [https://github.com/aamplugin/advanced-access-manager/issues/207](https://github.com/aamplugin/advanced-access-manager/issues/207)
    343 
    344 = 6.8.2 =
    345 * Fixed: Fix jquery 1.9 incompatibility with attr 'checked' by @Tofandel [https://github.com/aamplugin/advanced-access-manager/pull/204](https://github.com/aamplugin/advanced-access-manager/pull/204)
    346 
    347 = 6.8.1 =
    348 * Fixed: Translation issues [https://github.com/aamplugin/advanced-access-manager/issues/199](https://github.com/aamplugin/advanced-access-manager/issues/199)
    349 * Fixed: Undefined class constant 'DB_VIOLATION_OPTION' [https://github.com/aamplugin/advanced-access-manager/issues/198](https://github.com/aamplugin/advanced-access-manager/issues/198)
    350 * Changed: Add "Free" tab to the add-ons page [https://github.com/aamplugin/advanced-access-manager/issues/203](https://github.com/aamplugin/advanced-access-manager/issues/203)
    351 
    352 = 6.8.0 =
    353 * Changed: Enhanced security pasture by escaping potentially harmful output, if information was directly modified in the DB or not escaped during storing AAM settings, reported by WordPress Plugin Review Team
    354 * Fixed: Cleared potentially corrupted data about status of premium add-ons.
    355 * Changed: Re-opened direct communication with the AAM developer through the Slack channel [https://aamplugin.com/support](https://aamplugin.com/support)
    356 
    357 = 6.7.9 =
    358 * Changed: Enhanced security pasture by escaping potentially harmful input from users that do not have unfiltered_html capability, reported by WordPress Plugin Review Team [https://github.com/aamplugin/advanced-access-manager/issues/192](https://github.com/aamplugin/advanced-access-manager/issues/192)
    359 * Changed: Disabling the "User Role Filter" by default for all new AAM installations [https://github.com/aamplugin/advanced-access-manager/issues/193](https://github.com/aamplugin/advanced-access-manager/issues/193)
    360 
    361 = 6.7.8 =
    362 * Changed: Adjusted suite of automated tests, confirmed that AAM is compatible with the latest WP version
    363 
    364 = 6.7.7 =
    365 * Changed: A notice "Object of class WP_User…" reported by @it4joy [https://github.com/aamplugin/advanced-access-manager/issues/184](https://github.com/aamplugin/advanced-access-manager/issues/184)
    366 
    367 = 6.7.6 =
    368 * Fixed Bug: Incorrectly handled "Add User" for with multisite setup by @terrance-orletsky-d7 [https://github.com/aamplugin/advanced-access-manager/issues/179](https://github.com/aamplugin/advanced-access-manager/issues/179)
    369 * Fixed Bug: WP Notice in logs for fread by @terrance-orletsky-d7 [https://github.com/aamplugin/advanced-access-manager/issues/177](https://github.com/aamplugin/advanced-access-manager/issues/177)
    370 
    371 = 6.7.5 =
    372 * Fixed Bug: Access Policy breaks Broadcaster Plugin by @SEA-NET [https://github.com/aamplugin/advanced-access-manager/issues/170](https://github.com/aamplugin/advanced-access-manager/issues/170)
    373 * Changed: Enhanced the premium life-cycle management [https://github.com/aamplugin/advanced-access-manager/issues/173](https://github.com/aamplugin/advanced-access-manager/issues/173)
    374 
    375 = 6.7.4 =
    376 * Fixed Bug: Access settings are not saved, reported by @argolein [https://github.com/aamplugin/advanced-access-manager/issues/167](https://github.com/aamplugin/advanced-access-manager/issues/167)
    377 * Changed: INI format warning, reported by @dannysummerlinjstartorg [https://github.com/aamplugin/advanced-access-manager/issues/160](https://github.com/aamplugin/advanced-access-manager/issues/160)
    378 * Changed: Minor change. Improved the UI consistency between views.
    379 
    380 = 6.7.3 =
    381 * Fixed Bug: Incorrectly handled .attr('checked') by the latest jQuery update [https://github.com/aamplugin/advanced-access-manager/issues/166](https://github.com/aamplugin/advanced-access-manager/issues/166)
    382 
    383 = 6.7.2 =
    384 * Fixed Bug: PHP Warning: preg_match(): Compilation failed [https://github.com/aamplugin/advanced-access-manager/issues/163](https://github.com/aamplugin/advanced-access-manager/issues/163)
    385 * Added New: Thx to [@sigysmund](https://github.com/sigysmund). Support for OpenSSL RSA private keys, to have a passphrase [https://github.com/aamplugin/advanced-access-manager/issues/165](https://github.com/aamplugin/advanced-access-manager/issues/165)
    386 * Changed: Remove Support Message Modal from UI [https://github.com/aamplugin/advanced-access-manager/issues/164](https://github.com/aamplugin/advanced-access-manager/issues/164)
    387 
    388 = 6.7.1 =
    389 * Fixed Bug: PHP Fatal error: Uncaught Error: Class name must be a valid object or a string [https://github.com/aamplugin/advanced-access-manager/issues/156](https://github.com/aamplugin/advanced-access-manager/issues/156)
    390 
    391 = 6.7.0 =
    392 * Fixed Bug: Incorrectly merged settings with multi-role enabled [https://github.com/aamplugin/advanced-access-manager/issues/152](https://github.com/aamplugin/advanced-access-manager/issues/152)
    393 * Changed: Simplify the Route service [https://github.com/aamplugin/advanced-access-manager/issues/153](https://github.com/aamplugin/advanced-access-manager/issues/153)
    394 * Changed: Unexpected Application Error Message Misleads [https://github.com/aamplugin/advanced-access-manager/issues/151](https://github.com/aamplugin/advanced-access-manager/issues/151)
    395 * Added New: AAM CLI: Allow the ability import/export settings [https://github.com/aamplugin/advanced-access-manager/issues/150](https://github.com/aamplugin/advanced-access-manager/issues/150)
    396 
    397 = 6.6.4 =
    398 * Fixed Bug: DataTables warning: table id=post-ipcheck-list - Cannot reinitialise DataTable [https://github.com/aamplugin/advanced-access-manager/issues/149](https://github.com/aamplugin/advanced-access-manager/issues/149)
    399 * Changed: User Level Filter Service: Performance Request by @dannysummerlinjstartorg [https://github.com/aamplugin/advanced-access-manager/issues/142](https://github.com/aamplugin/advanced-access-manager/issues/142)
    400 
    401 = 6.6.3 =
    402 * Fixed Bug: Initial access settings for post are not loaded [https://github.com/aamplugin/advanced-access-manager/issues/143](https://github.com/aamplugin/advanced-access-manager/issues/143)
    403 
    404 = 6.6.2 =
    405 * Fixed Bug: Reported by Wordfence research team issue with multi-role support [https://github.com/aamplugin/advanced-access-manager/issues/138](https://github.com/aamplugin/advanced-access-manager/issues/138)
    406 * Changed: Simplify `aam/v2/authenticate` output [https://github.com/aamplugin/advanced-access-manager/issues/139](https://github.com/aamplugin/advanced-access-manager/issues/139)
    407 
    408 = 6.6.1 =
    409 * Fixed Bug: register_rest_route was called incorrectly in WP 5.5 [https://github.com/aamplugin/advanced-access-manager/issues/136](https://github.com/aamplugin/advanced-access-manager/issues/136)
    410 * Fixed Bug: When AAM is active, the Password Protected cannot be set [https://github.com/aamplugin/advanced-access-manager/issues/137](https://github.com/aamplugin/advanced-access-manager/issues/137)
    411 
    412 = 6.6.0 =
    413 * Fixed Bug: No ability to "allow" API Route [https://github.com/aamplugin/advanced-access-manager/issues/131](https://github.com/aamplugin/advanced-access-manager/issues/131)
    414 * Fixed Bug: Passwordless login sets cookie that might logout issues [https://github.com/aamplugin/advanced-access-manager/issues/129](https://github.com/aamplugin/advanced-access-manager/issues/129)
    415 * Fixed Bug: AAM does not retain selected time [https://github.com/aamplugin/advanced-access-manager/issues/133](https://github.com/aamplugin/advanced-access-manager/issues/133)
    416 * Changed: Logout user automatically if JWT token is revoked [https://github.com/aamplugin/advanced-access-manager/issues/118](https://github.com/aamplugin/advanced-access-manager/issues/118)
    417 * Changed: Enhance Backend Menu service [https://github.com/aamplugin/advanced-access-manager/issues/114](https://github.com/aamplugin/advanced-access-manager/issues/114)
    418 * Added New: The ability to export/import access policies [https://github.com/aamplugin/advanced-access-manager/issues/130](https://github.com/aamplugin/advanced-access-manager/issues/130)
    419 * Added New: Add `roles` claim to the issued JWT token [https://github.com/aamplugin/advanced-access-manager/issues/100](https://github.com/aamplugin/advanced-access-manager/issues/100)
    420 * Added New: [aam-login] shortcode that renders AAM secure login form [https://github.com/aamplugin/advanced-access-manager/issues/90](https://github.com/aamplugin/advanced-access-manager/issues/90)
    421 
    422 = 6.5.4 =
    423 * Fixed Bug: Incorectly evaluated best candidate for the conditional statement [https://github.com/aamplugin/advanced-access-manager/issues/128](https://github.com/aamplugin/advanced-access-manager/issues/128)
    424 
    425 = 6.5.3 =
    426 * Fixed Bug: PHP Warning: Parameter must be an array or an object that implements Countable in /service/core.php [https://github.com/aamplugin/advanced-access-manager/issues/126](https://github.com/aamplugin/advanced-access-manager/issues/126)
    427 * Added New: Allow to target the same resource with multiple statements [https://github.com/aamplugin/advanced-access-manager/issues/124](https://github.com/aamplugin/advanced-access-manager/issues/124)
    428 * Added New: Enhance "In" condition for the access policies [https://github.com/aamplugin/advanced-access-manager/issues/123](https://github.com/aamplugin/advanced-access-manager/issues/123)
    429 * Changed: Change the access policy initialization order [https://github.com/aamplugin/advanced-access-manager/issues/122](https://github.com/aamplugin/advanced-access-manager/issues/122)
    430 
    431 = 6.5.2 =
    432 * Fixed Bug: Passwordless authentication disregards "redirect_to" query param [https://github.com/aamplugin/advanced-access-manager/issues/117](https://github.com/aamplugin/advanced-access-manager/issues/117)
    433 * Fixed Bug: Failing to reset user expiration settings [https://github.com/aamplugin/advanced-access-manager/issues/119](https://github.com/aamplugin/advanced-access-manager/issues/119)
    434 * Fixed Bug: IP Check: Inherited rule cannot be deleted [https://github.com/aamplugin/advanced-access-manager/issues/116](https://github.com/aamplugin/advanced-access-manager/issues/116)
    435 
    436 = 6.5.1 =
    437 * Fixed Bug: edit_category_form_fields is deprecated since version 3.0.0! [https://github.com/aamplugin/advanced-access-manager/issues/115](https://github.com/aamplugin/advanced-access-manager/issues/115)
    438 * Fixed Bug: Incorrectly loading iframe resizer [https://github.com/aamplugin/advanced-access-manager/issues/113](https://github.com/aamplugin/advanced-access-manager/issues/113)
    439 
    440 = 6.5.0 =
    441 * Fixed Bug: No visual loading process in the Post Access metabox [https://github.com/aamplugin/advanced-access-manager/issues/111](https://github.com/aamplugin/advanced-access-manager/issues/111)
    442 * Fixed Bug: Safari browser cropps the modals [https://github.com/aamplugin/advanced-access-manager/issues/107](https://github.com/aamplugin/advanced-access-manager/issues/107)
    443 * Fixed Bug: Backend menu IDs with upper-case letters fail to restrict [https://github.com/aamplugin/advanced-access-manager/issues/105](https://github.com/aamplugin/advanced-access-manager/issues/105)
    444 * Fixed Bug: Deleting role does not reload the main panel [https://github.com/aamplugin/advanced-access-manager/issues/102](https://github.com/aamplugin/advanced-access-manager/issues/102)
    445 * Fixed Bug: Incorrect user login redirect with passworless URL [https://github.com/aamplugin/advanced-access-manager/issues/98](https://github.com/aamplugin/advanced-access-manager/issues/98)
    446 * Added New: The ability to reset access settings for any specific subject [https://github.com/aamplugin/advanced-access-manager/issues/109](https://github.com/aamplugin/advanced-access-manager/issues/109)
    447 * Added New: Slug to the Posts & Terms tab [https://github.com/aamplugin/advanced-access-manager/issues/108](https://github.com/aamplugin/advanced-access-manager/issues/108)
    448 * Added New: Use `Authorization` header with fallback to `Authentication` [https://github.com/aamplugin/advanced-access-manager/issues/99](https://github.com/aamplugin/advanced-access-manager/issues/99)
    449 * Added New: Filter post's content with [aam] shortcode and capability [https://github.com/aamplugin/advanced-access-manager/issues/96](https://github.com/aamplugin/advanced-access-manager/issues/96)
    450 * Added New: The ability to manage access to navigation menu[https://github.com/aamplugin/advanced-access-manager/issues/89](https://github.com/aamplugin/advanced-access-manager/issues/89)
    451 * Changed: Simplify support message payload [https://github.com/aamplugin/advanced-access-manager/issues/106](https://github.com/aamplugin/advanced-access-manager/issues/106)
    452 * Changed: Update bootstrap to 3.4.1 [https://github.com/aamplugin/advanced-access-manager/issues/95](https://github.com/aamplugin/advanced-access-manager/issues/95)
    453 * Changed: Dynamically adjust AAM iFrame to its content [https://github.com/aamplugin/advanced-access-manager/issues/104](https://github.com/aamplugin/advanced-access-manager/issues/104)
    454 * Changed: Enhance role cloning feature [https://github.com/aamplugin/advanced-access-manager/issues/97](https://github.com/aamplugin/advanced-access-manager/issues/97)
    455 
    456 = 6.4.3 =
    457 * Fixed Bug: Invalid AAM notifications [https://github.com/aamplugin/advanced-access-manager/issues/92](https://github.com/aamplugin/advanced-access-manager/issues/92)
    458 * Fixed Bug: HTTP redirect status code must be a redirection code, 3xx [https://github.com/aamplugin/advanced-access-manager/issues/94](https://github.com/aamplugin/advanced-access-manager/issues/94)
    459 * Fixed Bug: PHP Deprecated: contextual_help is "deprecated" since version 3.3.0 [https://github.com/aamplugin/advanced-access-manager/issues/93](https://github.com/aamplugin/advanced-access-manager/issues/93)
    460 
    461 = 6.4.2 =
    462 * Fixed Bug: Plus Package add-on: Call to undefined function wp_parse_list() [https://github.com/aamplugin/advanced-access-manager/issues/87](https://github.com/aamplugin/advanced-access-manager/issues/87)
    463 * Added New: Backward compatibility, return v1/authenticate endpoint [https://github.com/aamplugin/advanced-access-manager/issues/91](https://github.com/aamplugin/advanced-access-manager/issues/91)
    464 * Added New: Implement "New update is available" feature [https://github.com/aamplugin/advanced-access-manager/issues/88](https://github.com/aamplugin/advanced-access-manager/issues/88)
    465 
    466 = 6.4.1 =
    467 * Fixed Bug: Access Policy does not allow to use token in the param's value [https://github.com/aamplugin/advanced-access-manager/issues/84](https://github.com/aamplugin/advanced-access-manager/issues/84)
    468 * Fixed Bug: Warning: count(): Parameter must be an array or an object that implements Countable [https://github.com/aamplugin/advanced-access-manager/issues/82](https://github.com/aamplugin/advanced-access-manager/issues/82)
    469 * Fixed Bug: Fatal error: Call to undefined function get_main_site_id() [https://github.com/aamplugin/advanced-access-manager/issues/81](https://github.com/aamplugin/advanced-access-manager/issues/81)
    470 * Fixed Bug: Plus Package add-on: Incorrect handling of tags with white space [https://github.com/aamplugin/advanced-access-manager/issues/86](https://github.com/aamplugin/advanced-access-manager/issues/86)
    471 * Added New: Plus Package add-on: Define multiple default terms (including tags) [https://github.com/aamplugin/advanced-access-manager/issues/83](https://github.com/aamplugin/advanced-access-manager/issues/83)
    472 
    473 = 6.4.0 =
    474 * Fixed Bug: URI Access: Changing existing URI rule puts it in the end of the list [https://github.com/aamplugin/advanced-access-manager/issues/74](https://github.com/aamplugin/advanced-access-manager/issues/74)
    475 * Fixed Bug: URI Access: Incorrect handling of the inherited rules [https://github.com/aamplugin/advanced-access-manager/issues/77](https://github.com/aamplugin/advanced-access-manager/issues/77)
    476 * Fixed Bug: CSS issue with add-on button when it is inactive [https://github.com/aamplugin/advanced-access-manager/issues/78](https://github.com/aamplugin/advanced-access-manager/issues/78)
    477 * Fixed Bug: IP Check add-on: Failure to delete rules [https://github.com/aamplugin/advanced-access-manager/issues/65](https://github.com/aamplugin/advanced-access-manager/issues/65)
    478 * Fixed Bug: IP Check add-on: Incorrectly evaluated multiple rules [https://github.com/aamplugin/advanced-access-manager/issues/66](https://github.com/aamplugin/advanced-access-manager/issues/66)
    479 * Fixed Bug: Plus Package add-on: Warning: Invalid argument supplied for foreach() in ...ContentHooks.php on line 800 [https://github.com/aamplugin/advanced-access-manager/issues/73](https://github.com/aamplugin/advanced-access-manager/issues/73)
    480 * Fixed Bug: Plus Package add-on: Terms & Taxonomies settings take effect when Post & Terms service is off [https://github.com/aamplugin/advanced-access-manager/issues/69](https://github.com/aamplugin/advanced-access-manager/issues/69)
    481 * Added New: Plus Package add-on: Support for the "ADD NEW" term access option to access policy [https://github.com/aamplugin/advanced-access-manager/issues/57](https://github.com/aamplugin/advanced-access-manager/issues/57)
    482 * Added New: Plus Package add-on: Wildcard support for the API Routes in access policies [https://github.com/aamplugin/advanced-access-manager/issues/56](https://github.com/aamplugin/advanced-access-manager/issues/56)
    483 * Added New: Plus Package add-on: More granular access to taxonomy/term visibility [https://github.com/aamplugin/advanced-access-manager/issues/54](https://github.com/aamplugin/advanced-access-manager/issues/54)
    484 * Added New: IP Check add-on: Integration with Access Policy [https://github.com/aamplugin/advanced-access-manager/issues/68](https://github.com/aamplugin/advanced-access-manager/issues/68)
    485 * Added New: The ability to define "Access Denied Redirect" rules with access policy [https://github.com/aamplugin/advanced-access-manager/issues/61](https://github.com/aamplugin/advanced-access-manager/issues/61)
    486 * Added New: The ability to define "Login Redirect" rules with access policy [https://github.com/aamplugin/advanced-access-manager/issues/62](https://github.com/aamplugin/advanced-access-manager/issues/62)
    487 * Added New: The ability to define "Logout Redirect" rules with access policy [https://github.com/aamplugin/advanced-access-manager/issues/63](https://github.com/aamplugin/advanced-access-manager/issues/63)
    488 * Added New: The ability to define "404 Redirect" rules with access policy [https://github.com/aamplugin/advanced-access-manager/issues/64](https://github.com/aamplugin/advanced-access-manager/issues/64)
    489 * Added New: Allow the ability to programmatically get AAM service [https://github.com/aamplugin/advanced-access-manager/issues/71](https://github.com/aamplugin/advanced-access-manager/issues/71)
    490 * Added New: The ability to change role's slug [https://github.com/aamplugin/advanced-access-manager/issues/72](https://github.com/aamplugin/advanced-access-manager/issues/72)
    491 * Added New: The ability to issue refreshable JWT token through RESTful API [https://github.com/aamplugin/advanced-access-manager/issues/16](https://github.com/aamplugin/advanced-access-manager/issues/16)
    492 * Added New: The "Manage Access" toolbar menu item [https://github.com/aamplugin/advanced-access-manager/issues/26](https://github.com/aamplugin/advanced-access-manager/issues/26)
    493 * Added New: AAM [WP-CLI add-on](https://github.com/aamplugin/aam-cli). Allows to install premium AAM add-ons and access policies. Check [for more details](https://aamplugin.com/reference/plugin#wp-cli-commands)
    494 * Changed:   Use slugs instead of post/term IDs during policy generation [https://github.com/aamplugin/advanced-access-manager/issues/80](https://github.com/aamplugin/advanced-access-manager/issues/80)
    495 * Changed:   Policy Generate button does not have tooltip [https://github.com/aamplugin/advanced-access-manager/issues/79](https://github.com/aamplugin/advanced-access-manager/issues/79)
    496 * Changed:   Access Policy Generator split across services [https://github.com/aamplugin/advanced-access-manager/issues/76](https://github.com/aamplugin/advanced-access-manager/issues/76)
    497 * Changed:   Enhanced AAM API [https://github.com/aamplugin/advanced-access-manager/issues/75](https://github.com/aamplugin/advanced-access-manager/issues/75)
    498 * Changed:   The 404 (Not Found) Redirect now is allowed to be customized per user and role [https://github.com/aamplugin/advanced-access-manager/issues/64](https://github.com/aamplugin/advanced-access-manager/issues/64)
    499 
    500 = 6.3.3 =
    501 * Change: Updated core to allow geolocation functionality with IP Check
    502 * Change: Enhanced [IP Check](https://aamplugin.com/pricing/ip-check) add-on with ability to define geolocation rules [https://aamplugin.com/article/how-to-manage-access-to-wordpress-website-based-on-location](https://aamplugin.com/article/how-to-manage-access-to-wordpress-website-based-on-location)
    503 * Change: Enhanced [Plus Package](https://aamplugin.com/pricing/plus-package)
    504 
    505 = 6.3.2 =
    506 * Fixed Bug: *_OTHERS posts & terms access options malfunction [https://github.com/aamplugin/advanced-access-manager/issues/52](https://github.com/aamplugin/advanced-access-manager/issues/52)
    507 
    508 = 6.3.1 =
    509 * Fixed Bug: Draft policy still applicable if attached to user or role [https://github.com/aamplugin/advanced-access-manager/issues/49](https://github.com/aamplugin/advanced-access-manager/issues/49)
    510 * Fixed Bug: Resetting all AAM settings still keep legacy settings in DB [https://github.com/aamplugin/advanced-access-manager/issues/48](https://github.com/aamplugin/advanced-access-manager/issues/48)
    511 * Fixed Bug: PHP Warning: Invalid argument supplied for foreach() in .../Repository.php on line 71 [https://github.com/aamplugin/advanced-access-manager/issues/47](https://github.com/aamplugin/advanced-access-manager/issues/47)
    512 * Fixed Bug: User's capabilities, populated through policy, are gone when rebased [https://github.com/aamplugin/advanced-access-manager/issues/45](https://github.com/aamplugin/advanced-access-manager/issues/45)
    513 * Fixed Bug: Cannot lock user with AAM UI [https://github.com/aamplugin/advanced-access-manager/issues/43](https://github.com/aamplugin/advanced-access-manager/issues/43)
    514 * Fixed Bug: Teaser Message modified with added backslashes to single and double quotes [https://github.com/aamplugin/advanced-access-manager/issues/42](https://github.com/aamplugin/advanced-access-manager/issues/42)
    515 
    516 = 6.3.0 =
    517 * Fixed Bug: PHP Notice about missing license key [https://github.com/aamplugin/advanced-access-manager/issues/12](https://github.com/aamplugin/advanced-access-manager/issues/12)
    518 * Fixed Bug: Fatal error: Allowed memory size of XXX bytes exhausted [https://github.com/aamplugin/advanced-access-manager/issues/15](https://github.com/aamplugin/advanced-access-manager/issues/15)
    519 * Fixed Bug: PHP Notice: Undefined index: path [https://github.com/aamplugin/advanced-access-manager/issues/18](https://github.com/aamplugin/advanced-access-manager/issues/18)
    520 * Fixed Bug: PHP Notice: Undefined index: password [https://github.com/aamplugin/advanced-access-manager/issues/31](https://github.com/aamplugin/advanced-access-manager/issues/31)
    521 * Fixed Bug: NGIX compatibility for URI Access [https://github.com/aamplugin/advanced-access-manager/issues/33](https://github.com/aamplugin/advanced-access-manager/issues/33)
    522 * Fixed Bug: URI Access service does not protect the homepage [https://github.com/aamplugin/advanced-access-manager/issues/17](https://github.com/aamplugin/advanced-access-manager/issues/17)
    523 * Fixed Bug: New rule is created if URI Access endpoint is updated [https://github.com/aamplugin/advanced-access-manager/issues/35](https://github.com/aamplugin/advanced-access-manager/issues/35)
    524 * Fixed Bug: Conflict with Jatpack plugin [https://github.com/aamplugin/advanced-access-manager/issues/25](https://github.com/aamplugin/advanced-access-manager/issues/25)
    525 * Fixed Bug: Potentially incorrectly used PHP core `list` function [https://github.com/aamplugin/advanced-access-manager/issues/38](https://github.com/aamplugin/advanced-access-manager/issues/38)
    526 * Added New: Access Policy token [PHP_GLOBAL](https://aamplugin.com/reference/policy#php_global)
    527 * Added New: Access Policy token [WP_NETWORK_OPTION](https://aamplugin.com/reference/policy#wp_network_option)
    528 * Added New: Allow to attach Access Policies to Default subject [https://github.com/aamplugin/advanced-access-manager/issues/13](https://github.com/aamplugin/advanced-access-manager/issues/13)
    529 * Added New: Ability to create new access policy from generated [https://github.com/aamplugin/advanced-access-manager/issues/27](https://github.com/aamplugin/advanced-access-manager/issues/27)
    530 
    531 = 6.2.2 =
    532 * Fixed Bug: Backend Dashboard index.php still could be restricted with Backend Menu service
    533 * Fixed Bug: Policy Generator - Fatal error with PHP lower than 7.0.0
    534 * Fixed Bug: Policy Validator - Improper dependency validation when if it is not installed
    535 * Fixed Bug: Default access settings not propagated to user that does not have any roles (multisite setup)
    536 * Fixed Bug: Reset settings where not synced across all subsites in multisite setup
    537 * Added New: Ability to define wildcard [BackendMenu](https://aamplugin.com/reference/policy#backendmenu) resource with Access Policy
    538 * Added New: Ability to define wildcard [Metabox](https://aamplugin.com/reference/policy#metabox) resource with Access Policy
    539 * Added New: Ability to define wildcard [Widget](https://aamplugin.com/reference/policy#widget) resource with Access Policy
    540 * Added New: Ability to define wildcard [Toolbar](https://aamplugin.com/reference/policy#toolbar) resource with Access Policy
    541 
    542 = 6.2.1 =
    543 * Fixed Bug: Very minor UI issue with Access Policy Delete pop-up
    544 * Added New: Enhanced Access Policy with new [POLICY_META](https://aamplugin.com/reference/policy#policy_meta) token
    545 * Change: Access Policy post type supports custom fields now
    546 
    547 = 6.2.0 =
    548 * Fixed Bug: Access policy was not applied to visitors
    549 * Fixed Bug: Bug fixing that is related to unwanted PHP notices [https://forum.aamplugin.com/d/456-notice-undefined-index-expire](https://forum.aamplugin.com/d/456-notice-undefined-index-expire)
    550 * Fixed Bug: Failing to delete multiple Access URI rules without reloading the page
    551 * Added New: Ability to generate Access Policy from user's or role's settings [https://forum.aamplugin.com/d/446-announcement-about-upcoming-features/2](https://forum.aamplugin.com/d/446-announcement-about-upcoming-features/2)
    552 * Added New: More granular control over the HIDDEN access option [https://forum.aamplugin.com/d/446-announcement-about-upcoming-features](https://forum.aamplugin.com/d/446-announcement-about-upcoming-features)
    553 * Added New: Export/Import AAM settings [https://aamplugin.com/article/how-to-export-and-import-aam-settings](https://aamplugin.com/article/how-to-export-and-import-aam-settings)
    554 * Added New: Ability to send support request from the AAM UI
    555 * Added New: Multisite Settings Sync service that allows to sync access settings changes across all sites
    556 * Added New: New hook `aam_updated_access_settings` that is triggered when access settings are stored
    557 * Added New: New data type casting (*date) for Access Policy [https://aamplugin.com/reference/policy#markers](https://aamplugin.com/reference/policy#markers)
    558 * Added New: New POLICY_PARAM access policy token [https://aamplugin.com/reference/policy#policy_param](https://aamplugin.com/reference/policy#policy_param)
    559 * Added New: New WP_SITE access policy token [https://aamplugin.com/reference/policy#wp_site](https://aamplugin.com/reference/policy#wp_site)
    560 * Change: [DATETIME](https://aamplugin.com/reference/policy#marker-datetime) access policy token returns time in UTC timezone
    561 * Change: Enhanced security over AAM UI
    562 * Change: Multiple internal simplifications and refactoring
    563 
    564 = 6.1.1 =
    565 * Fixed Bug: Unnecessary backslashes before displaying the access policy [https://forum.aamplugin.com/d/432-access-policy-ui-escaping-slashes](https://forum.aamplugin.com/d/432-access-policy-ui-escaping-slashes)
    566 * Fixed Bug: aam_access_dashboard custom capability caused "Access Denied"
    567 * Change: Enforcing default `307` Temporary Redirect code if none is provided for any AAM redirect functionality
    568 * Change: Persisting the last managed role, user or visitor on the AAM page
    569 * Change: Improved safety by using the last role on the list instead of the default Administrator role
    570 * Change: Optimized access policy service. Changed the way it is applied to any given object
    571 * Added New: Migration script that clears previously detected migration errors
    572 
    573 = 6.1.0 =
    574 * Fixed Bug: Access Policy UI - the "Attach to Default" button was not rendering correctly
    575 * Fixed Bug: Role Management UI - the PHP notice where `Undefined variable: parent`
    576 * Fixed Bug: AAM UI page - improperly compressed HTML response if server config does not match PHP executable INI settings
    577 * Fixed Bug: Login Redirect Settings - incorrectly merged settings for multi-role support
    578 * Fixed Bug: Logout Redirect Settings - incorrectly merged settings for multi-role support
    579 * Fixed Bug: Access Denied Redirect Settings - incorrectly merged settings for multi-role support
    580 * Fixed Bug: API Route Settings - incorrectly halted inheritance mechanism
    581 * Fixed Bug: Admin Toolbar Settings - incorrectly halted inheritance mechanism
    582 * Fixed Bug: URI Access Settings - incorrectly halted inheritance mechanism
    583 * Fixed Bug: Content Visibility Settings - incorrectly merged settings for multi-role support
    584 * Fixed Bug: Access Policy Core - incorrectly managed internal cache
    585 * Fixed Bug: AAM Core - incorrectly managed internal object cache
    586 * Fixed Bug: Content Service - incorrectly mapped `do_not_allow` capability if any of the registered post types have it
    587 * Fixed Bug: Content Service - fatal error `Cannot use object of type Closure as array` [https://forum.aamplugin.com/d/354-php-fatal-error-cannot-use-object-of-type-closure-as-array](https://forum.aamplugin.com/d/354-php-fatal-error-cannot-use-object-of-type-closure-as-array)
    588 * Fixed Bug: The `aam_show_toolbar` capability was not taken in consideration
    589 * Fixed Bug: Logout Redirect Service - White screen occurs if "Default" option is explicitly selected [https://wordpress.org/support/topic/blank-log-out-page-on-6-0-5/](https://wordpress.org/support/topic/blank-log-out-page-on-6-0-5/)
    590 * Change: Refactored internal inheritance mechanism where AAM objects no longer responsible to check for inheritance flag. This eliminates several constrains that we discovered recently.
    591 * Change: Multiple minor changes to the codebase to consume internal AAM API in more consistent way
    592 * Change: JWT & Secure Login Services - enriched RESTful API error responses with more details about an error
    593 * Change: Content Service - optimization improvements
    594 * Added New: Implemented new filter `aam_token_typecast_filter` for Access Policy for custom type casting
    595 * Added New: Implemented support for the `=>` (map to) operator for the Access Policy
    596 * Added New: Implemented support for the AAM_CONFIG marker for the Access Policy
    597 
    598 = 6.0.5 =
    599 * Fixed Bug: Refactored the license managements. Fixed bugs with license registration https://forum.aamplugin.com/d/356-unregistered-version-message
    600 * Fixed Bug: Some servers do not allow WP core string concatenation. This was causing 403 https://forum.aamplugin.com/d/389-message-loading-aam-ui-please-wait-403-forbidden
    601 * Fixed Bug: Media list on Posts & Terms tab is not rendered correctly due to improperly managed DB query for post type `attachment`
    602 * Fixed Bug: AAM core getOption method did not deserialized settings properly in some cases
    603 * Fixed Bug: Access Manager metabox was rendered for users that have ability to manage other users https://forum.aamplugin.com/d/371-you-are-not-allowed-to-manage-any-aam-subject
    604 * Fixed Bug: Logout redirect was no working properly https://forum.aamplugin.com/d/339-problem-with-login-shortcode-and-widget
    605 * Fixed Bug: The Drill-Down button was not working on Posts & Terms tab
    606 * Fixed Bug: Access policy Action "Create" was not converted at all for the PostType resource
    607 * Change:    Simplified the first migration script by removing all error emissions. We captured enough migration logs to be confident about proper migration of the most critical settings
    608 * Change:    Changed verbiage for the Enterprise Package on the Add-ons area
    609 * Change:    Added info notification to the Posts & Terms tab for proper Media access controls
    610 * Change:    Merge internal Settings service with Core service
    611 * Change:    Added new migration script that fixed issues with legacy names for premium add-ons
    612 * Change:    Added new internal AddOn manager class
    613 * Added New: Added the ability to check for new add-on updates from the Add-ons area
    614 * Added New: Published free AAM add-on AAM Protected Media Files https://wordpress.org/plugins/aam-protected-media-files/
    615 
    616 = 6.0.4 =
    617 * Fixed Bug: https://forum.aamplugin.com/d/367-authentication-jwt-expires-fatal-error
    618 * Fixed Bug: JWT validation endpoint did not check token's expiration based on UTC timezone
    619 * Fixed Bug: Removed unnecessary console.log invocations from the aam.js library
    620 * Fixed Bug: Fixed the potential bug with improperly merged options when access policy Param's Value is defined as multi-dimensional array
    621 * Fixed Bug: https://forum.aamplugin.com/d/339-problem-with-login-shortcode-and-widget
    622 * Fixed Bug: https://forum.aamplugin.com/d/371-you-are-not-allowed-to-manage-any-aam-subject
    623 * Fixed Bug: Incompatibility with plugins that are extremely aggressive and modify the WP_Query "suppress_filters" flag. Shame on you guys!
    624 
    625 = 6.0.3 =
    626 * Fixed Bug: Fatal Error - Class 'AAM_Core_Server' not found. https://forum.aamplugin.com/d/358-uncaught-error-class-aam-core-server-not-found
    627 * Fixed Bug: Fixed the bug where post types that do not have Gutenberg enabled are not shown on the Metaboxes & Widgets tab https://wordpress.org/support/topic/in-metaboxes-widgets-no-pages/
    628 * Fixed Bug: Not all possible post types are shown on the Posts & Terms tab
    629 
    630 = 6.0.2 =
    631 * Fixed Bug: https://forum.aamplugin.com/d/361-uncaught-error-call-to-a-member-function-settimezone-on-boolean
    632 * Fixed Bug: https://forum.aamplugin.com/d/378-aam-6-0-1-conflict-with-acf-advanced-custom-fields
    633 * Fixed Bug: Migration script, fixed couple more minor bugs that were causing warnings
    634 
    635 = 6.0.1 =
    636 * Fixed Bug: Numerous bugs fixed in the migration script. New script prepared to do additional clean-up and fix corrupted data
    637 * Fixed Bug: https://forum.aamplugin.com/d/369-notice-undefined-offset-1-service-content-php-on-line-509
    638 * Fixed Bug: https://wordpress.org/support/topic/6-0-issues/
    639 * Fixed Bug: https://forum.aamplugin.com/d/353-comment-system-activated
    640 * Fixed Bug: Migration script was skipping access settings conversion for roles that have white space in slug
    641 * Added New: Additional migration script for clean-up and fixing corrupted data
    642367
    643368= 6.0.0 =
Note: See TracChangeset for help on using the changeset viewer.