Plugin Directory

Changeset 3304543


Ignore:
Timestamp:
06/02/2025 12:07:52 AM (10 months ago)
Author:
vasyltech
Message:

Official 7.0.4

Location:
advanced-access-manager
Files:
327 added
23 edited

Legend:

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

    r3296450 r3304543  
    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.3
     6 * Version: 7.0.4
    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.3');
     290    define('AAM_VERSION', '7.0.4');
    291291    define('AAM_BASEDIR', __DIR__);
    292292
     
    298298    AAM_Autoloader::register();
    299299
    300     // Keep this as the lowest priority
    301     add_action('plugins_loaded', 'AAM::on_plugins_loaded', -999);
    302 
    303     // The highest priority (higher the core)
    304     // this is important to have to catch events like register core post types
    305     add_action('init', 'AAM::on_init', -1);
     300    // Load AAM service and register all the necessary initializations
     301    add_action('plugins_loaded', 'AAM::on_plugins_loaded');
     302    add_action('init', 'AAM::on_init');
    306303
    307304    // Activation & deactivation hooks
  • advanced-access-manager/trunk/application/Addon/Repository.php

    r3294227 r3304543  
    3232     * Note! This is the latest version at the time of AAM publishing
    3333     *
    34      * @version 7.0.2
     34     * @version 7.0.4
    3535     */
    36     const LATEST_PREMIUM_VERSION = '7.0.2';
     36    const LATEST_PREMIUM_VERSION = '7.0.3';
    3737
    3838    /**
  • advanced-access-manager/trunk/application/Migration/Migration_700.php

    r3290564 r3304543  
    917917
    918918                $item = [
    919                     'effect' => !empty($areas) && $this->_convert_to_effect(
    920                         $settings
    921                     ),
     919                    'effect' => !empty($areas) ?
     920                        $this->_convert_to_effect($settings) : 'allow',
    922921                    'on'     => $areas
    923922                ];
  • advanced-access-manager/trunk/application/Restful/SecurityAudit.php

    r3286780 r3304543  
    170170        ]);
    171171
    172         // print_r($result);
    173 
    174172        // Get HTTP code
    175173        $http_code = wp_remote_retrieve_response_code($result);
  • advanced-access-manager/trunk/application/Service/AccessDeniedRedirect.php

    r3286780 r3304543  
    2525     * @access protected
    2626     *
    27      * @version 7.0.0
     27     * @version 7.0.4
    2828     */
    2929    protected function __construct()
     30    {
     31        // Register RESTful API endpoints
     32        AAM_Restful_AccessDeniedRedirect::bootstrap();
     33
     34        add_action('init', function() {
     35            $this->initialize_hooks();
     36        }, PHP_INT_MAX);
     37    }
     38
     39    /**
     40     * Initialize Access Denied Redirect hooks
     41     *
     42     * @return void
     43     * @access protected
     44     *
     45     * @version 7.0.4
     46     */
     47    protected function initialize_hooks()
    3048    {
    3149        if (is_admin()) {
     
    3654        }
    3755
    38         // Register RESTful API endpoints
    39         AAM_Restful_AccessDeniedRedirect::bootstrap();
    40 
    41         $this->initialize_hooks();
    42     }
    43 
    44     /**
    45      * Initialize Access Denied Redirect hooks
    46      *
    47      * @return void
    48      * @access protected
    49      *
    50      * @version 7.0.0
    51      */
    52     protected function initialize_hooks()
    53     {
    5456        add_action('aam_access_denied_redirect_handler_filter', function($handler) {
    5557            if (is_null($handler)) {
  • advanced-access-manager/trunk/application/Service/AdminToolbar.php

    r3286780 r3304543  
    2525     * @access protected
    2626     *
    27      * @version 7.0.0
     27     * @version 7.0.4
    2828     */
    2929    protected function __construct()
     30    {
     31        // Register RESTful API endpoints
     32        AAM_Restful_AdminToolbar::bootstrap();
     33
     34        add_action('init', function() {
     35            $this->initialize_hooks();
     36        }, PHP_INT_MAX);
     37    }
     38
     39    /**
     40     * Initialize Admin Toolbar hooks
     41     *
     42     * @return void
     43     * @access protected
     44     *
     45     * @version 7.0.4
     46     */
     47    protected function initialize_hooks()
    3048    {
    3149        if (is_admin()) {
     
    3452            });
    3553        }
    36 
    37         // Register RESTful API endpoints
    38         AAM_Restful_AdminToolbar::bootstrap();
    3954
    4055        // Cache admin toolbar
     
    4560        }
    4661
    47         $this->initialize_hooks();
    48     }
    49 
    50     /**
    51      * Initialize Admin Toolbar hooks
    52      *
    53      * @return void
    54      * @access protected
    55      *
    56      * @version 7.0.0
    57      */
    58     protected function initialize_hooks()
    59     {
    6062        add_action('wp_before_admin_bar_render', function () {
    6163            $this->_filter_admin_toolbar();
  • advanced-access-manager/trunk/application/Service/ApiRoute.php

    r3286780 r3304543  
    2424     * @access protected
    2525     *
    26      * @version 7.0.0
     26     * @version 7.0.4
    2727     */
    2828    protected function __construct()
     29    {
     30        // Register RESTful API endpoints
     31        AAM_Restful_ApiRoute::bootstrap();
     32
     33        add_action('init', function() {
     34            $this->initialize_hooks();
     35        }, PHP_INT_MAX);
     36    }
     37
     38    /**
     39     * Initialize API Route hooks
     40     *
     41     * @return void
     42     * @access protected
     43     *
     44     * @version 7.0.4
     45     */
     46    protected function initialize_hooks()
    2947    {
    3048        if (is_admin()) {
     
    3553        }
    3654
    37         // Register RESTful API endpoints
    38         AAM_Restful_ApiRoute::bootstrap();
    39 
    40         $this->initialize_hooks();
    41     }
    42 
    43     /**
    44      * Initialize API Route hooks
    45      *
    46      * @return void
    47      * @access protected
    48      *
    49      * @version 7.0.0
    50      */
    51     protected function initialize_hooks()
    52     {
    5355        // Register API manager is applicable
    5456        add_filter('rest_pre_dispatch', function($result, $_, $request) {
  • advanced-access-manager/trunk/application/Service/BackendMenu.php

    r3294227 r3304543  
    2424     * @access protected
    2525     *
    26      * @version 7.0.0
     26     * @version 7.0.4
    2727     */
    2828    protected function __construct()
     29    {
     30        // Register RESTful API endpoints
     31        AAM_Restful_BackendMenu::bootstrap();
     32
     33        add_action('init', function() {
     34            $this->initialize_hooks();
     35        }, PHP_INT_MAX);
     36    }
     37
     38    /**
     39     * Initialize Admin Menu hooks
     40     *
     41     * @return void
     42     * @access protected
     43     *
     44     * @version 7.0.4
     45     */
     46    protected function initialize_hooks()
    2947    {
    3048        if (is_admin()) {
     
    3351                AAM_Backend_Feature_Main_BackendMenu::register();
    3452            });
    35         }
    36 
    37         // Register RESTful API endpoints
    38         AAM_Restful_BackendMenu::bootstrap();
    39 
    40         $this->initialize_hooks();
    41     }
    42 
    43     /**
    44      * Initialize Admin Menu hooks
    45      *
    46      * @return void
    47      * @access protected
    48      *
    49      * @version 7.0.2
    50      */
    51     protected function initialize_hooks()
    52     {
    53         if (is_admin()) {
     53
    5454            // Filter the admin menu only when we are not on the AAM page and user
    5555            // does not have the ability to manage admin menu through AAM UI
  • advanced-access-manager/trunk/application/Service/Capability.php

    r3286780 r3304543  
    4343     * @access protected
    4444     *
    45      * @version 7.0.0
     45     * @version 7.0.4
    4646     */
    4747    protected function __construct()
    4848    {
    4949        add_filter('aam_get_config_filter', function($result, $key) {
    50             if (is_null($result) && array_key_exists($key, self::DEFAULT_CONFIG)) {
     50            if (empty($result) && array_key_exists($key, self::DEFAULT_CONFIG)) {
    5151                $result = self::DEFAULT_CONFIG[$key];
    5252            }
     
    5555        }, 10, 2);
    5656
    57         if (is_admin()) {
    58             // Hook that initialize the AAM UI part of the service
    59             add_action('aam_initialize_ui_action', function () {
    60                 AAM_Backend_Feature_Main_Capability::register();
    61             });
    62         }
     57        // Register RESTful API endpoints
     58        AAM_Restful_Capability::bootstrap();
    6359
    64         $this->initialize_hooks();
     60        add_action('init', function() {
     61            $this->initialize_hooks();
     62        }, PHP_INT_MAX);
    6563    }
    6664
     
    7169     * @access protected
    7270     *
    73      * @version 7.0.0
     71     * @version 7.0.4
    7472     */
    7573    protected function initialize_hooks()
    7674    {
    77         // Register RESTful API endpoints
    78         AAM_Restful_Capability::bootstrap();
     75        if (is_admin()) {
     76            // Hook that initialize the AAM UI part of the service
     77            add_action('aam_initialize_ui_action', function () {
     78                AAM_Backend_Feature_Main_Capability::register();
     79            });
     80        }
    7981
    8082        // Capability descriptions hooks
     
    8789
    8890        // Initialize the list of capabilities with descriptions
    89         add_action('init', function() {
    90             $this->_capabilities = [
    91                 'switch_themes' => __('Allows a user to change the active theme of a website, altering its overall design and layout.', 'advanced-access-manager'),
    92                 'edit_themes' => __('Enables a user to directly modify the code of theme files, allowing for customization and adjustments to the website\'s appearance and functionality.', 'advanced-access-manager'),
    93                 'edit_theme_options' => __('Permits a user to access and modify theme settings through the WordPress Customizer, enabling personalized adjustments to the site\'s appearance and functionality without altering code.', 'advanced-access-manager'),
    94                 'install_themes' => __('Allows a user to add new themes to a website from the WordPress Theme Directory or by uploading theme files directly.', 'advanced-access-manager'),
    95                 'activate_plugins' => __('Enables a user to activate or deactivate plugins, thereby controlling the addition or removal of specific functionalities on the website.', 'advanced-access-manager'),
    96                 'edit_plugins' => __('Allows a user to directly modify the code of installed plugin files, enabling custom changes and enhancements to the site\'s functionality.', 'advanced-access-manager'),
    97                 'install_plugins' => __('Allows a user to add new plugins to a website, expanding its functionality by integrating additional features and tools.', 'advanced-access-manager'),
    98                 'edit_users' => __('Allows a user to modify the profiles and settings of existing users, including their roles, personal information, and permissions.', 'advanced-access-manager'),
    99                 'edit_files' => __('Allows a user to edit files in the theme or plugin editor', 'advanced-access-manager'),
    100                 'manage_options' => __('Allows a user to manage all site options and settings', 'advanced-access-manager'),
    101                 'moderate_comments' => __('Allows a user to moderate comments and manage their status', 'advanced-access-manager'),
    102                 'manage_categories' => __('Allows a user to manage and edit categories for posts', 'advanced-access-manager'),
    103                 'manage_links' => __('Allows a user to manage and edit links in the blogroll', 'advanced-access-manager'),
    104                 'upload_files' => __('Allows a user to upload files to the media library', 'advanced-access-manager'),
    105                 'import' => __('Allows a user to import content from external sources', 'advanced-access-manager'),
    106                 'unfiltered_html' => __('Allows a user to post unfiltered HTML content', 'advanced-access-manager'),
    107                 'edit_posts' => __('Allows a user to edit posts created by the user', 'advanced-access-manager'),
    108                 'edit_others_posts' => __('Allows a user to edit posts created by other users', 'advanced-access-manager'),
    109                 'edit_published_posts' => __('Allows a user to edit posts that are already published', 'advanced-access-manager'),
    110                 'publish_posts' => __('Allows a user to publish new posts', 'advanced-access-manager'),
    111                 'edit_pages' => __('Allows a user to edit pages on the site', 'advanced-access-manager'),
    112                 'read' => __('Allows a user to read and view site content', 'advanced-access-manager'),
    113                 'publish_pages' => __('Publish pages on the site', 'advanced-access-manager'),
    114                 'edit_others_pages' => __('Edit pages created by other users', 'advanced-access-manager'),
    115                 'edit_published_pages' => __('Edit pages that are already published', 'advanced-access-manager'),
    116                 'delete_pages' => __('Delete pages', 'advanced-access-manager'),
    117                 'delete_others_pages' => __('Delete pages created by other users', 'advanced-access-manager'),
    118                 'delete_published_pages' => __('Delete pages that are already published', 'advanced-access-manager'),
    119                 'delete_posts' => __('Delete posts', 'advanced-access-manager'),
    120                 'delete_others_posts' => __('Delete posts created by other users', 'advanced-access-manager'),
    121                 'delete_published_posts' => __('Delete posts that are already published', 'advanced-access-manager'),
    122                 'delete_private_posts' => __('Delete private posts', 'advanced-access-manager'),
    123                 'edit_private_posts' => __('Edit private posts', 'advanced-access-manager'),
    124                 'read_private_posts' => __('Read private posts', 'advanced-access-manager'),
    125                 'delete_private_pages' => __('Delete private pages', 'advanced-access-manager'),
    126                 'edit_private_pages' => __('Edit private pages', 'advanced-access-manager'),
    127                 'read_private_pages' => __('Read private pages', 'advanced-access-manager'),
    128                 'delete_users' => __('Delete users', 'advanced-access-manager'),
    129                 'create_users' => __('Create new users', 'advanced-access-manager'),
    130                 'unfiltered_upload' => __('Upload files without filtering', 'advanced-access-manager'),
    131                 'edit_dashboard' => __('Access and edit the dashboard', 'advanced-access-manager'),
    132                 'customize' => __('Customize site appearance and options', 'advanced-access-manager'),
    133                 'delete_site' => __('Delete the entire site', 'advanced-access-manager'),
    134                 'update_plugins' => __('Update installed plugins', 'advanced-access-manager'),
    135                 'delete_plugins' => __('Delete installed plugins', 'advanced-access-manager'),
    136                 'update_themes' => __('Update installed themes', 'advanced-access-manager'),
    137                 'update_core' => __('Update WordPress core', 'advanced-access-manager'),
    138                 'list_users' => __('View list of all users', 'advanced-access-manager'),
    139                 'remove_users' => __('Remove users from the site', 'advanced-access-manager'),
    140                 'add_users' => __('Add new users to the site', 'advanced-access-manager'),
    141                 'promote_users' => __('Promote users to higher roles', 'advanced-access-manager'),
    142                 'delete_themes' => __('Delete installed themes', 'advanced-access-manager'),
    143                 'export' => __('Export data from the site', 'advanced-access-manager'),
    144                 'edit_comment' => __('Edit comments left on the site', 'advanced-access-manager'),
    145                 'create_sites' => __('Create new sites in a multisite network', 'advanced-access-manager'),
    146                 'delete_sites' => __('Delete sites in a multisite network', 'advanced-access-manager'),
    147                 'manage_network' => __('Manage the entire network of sites', 'advanced-access-manager'),
    148                 'manage_sites' => __('Manage individual sites in a multisite network', 'advanced-access-manager'),
    149                 'manage_network_users' => __('Manage users across the entire network', 'advanced-access-manager'),
    150                 'manage_network_themes' => __('Manage themes across the entire network', 'advanced-access-manager'),
    151                 'manage_network_options' => __('Manage network-wide options and settings', 'advanced-access-manager'),
    152                 'manage_network_plugins' => __('Manage plugins across the entire network', 'advanced-access-manager'),
    153                 'upload_plugins' => __('Upload plugins to the site', 'advanced-access-manager'),
    154                 'upload_themes' => __('Upload themes to the site', 'advanced-access-manager'),
    155                 'upgrade_network' => __('Upgrade the entire network of sites', 'advanced-access-manager'),
    156                 'setup_network' => __('Set up and configure a multisite network', 'advanced-access-manager'),
    157                 'level_0' => __('Read only user level. Typically the Subscriber role.', 'advanced-access-manager'),
    158                 'level_1' => __('Limited access level. Typically the Contributor role.', 'advanced-access-manager'),
    159                 'level_2' => __('Author role access level', 'advanced-access-manager'),
    160                 'level_3' => __('No specific meaning.', 'advanced-access-manager'),
    161                 'level_4' => __('No specific meaning.', 'advanced-access-manager'),
    162                 'level_5' => __('No specific meaning.', 'advanced-access-manager'),
    163                 'level_6' => __('No specific meaning.', 'advanced-access-manager'),
    164                 'level_7' => __('Editor access level.', 'advanced-access-manager'),
    165                 'level_8' => __('No specific meaning.', 'advanced-access-manager'),
    166                 'level_9' => __('No specific meaning.', 'advanced-access-manager'),
    167                 'level_10' => __('The highest level capabilities. Typically the Administrator role.', 'advanced-access-manager')
    168             ];
    169         });
     91        $this->_capabilities = [
     92            'switch_themes' => __('Allows a user to change the active theme of a website, altering its overall design and layout.', 'advanced-access-manager'),
     93            'edit_themes' => __('Enables a user to directly modify the code of theme files, allowing for customization and adjustments to the website\'s appearance and functionality.', 'advanced-access-manager'),
     94            'edit_theme_options' => __('Permits a user to access and modify theme settings through the WordPress Customizer, enabling personalized adjustments to the site\'s appearance and functionality without altering code.', 'advanced-access-manager'),
     95            'install_themes' => __('Allows a user to add new themes to a website from the WordPress Theme Directory or by uploading theme files directly.', 'advanced-access-manager'),
     96            'activate_plugins' => __('Enables a user to activate or deactivate plugins, thereby controlling the addition or removal of specific functionalities on the website.', 'advanced-access-manager'),
     97            'edit_plugins' => __('Allows a user to directly modify the code of installed plugin files, enabling custom changes and enhancements to the site\'s functionality.', 'advanced-access-manager'),
     98            'install_plugins' => __('Allows a user to add new plugins to a website, expanding its functionality by integrating additional features and tools.', 'advanced-access-manager'),
     99            'edit_users' => __('Allows a user to modify the profiles and settings of existing users, including their roles, personal information, and permissions.', 'advanced-access-manager'),
     100            'edit_files' => __('Allows a user to edit files in the theme or plugin editor', 'advanced-access-manager'),
     101            'manage_options' => __('Allows a user to manage all site options and settings', 'advanced-access-manager'),
     102            'moderate_comments' => __('Allows a user to moderate comments and manage their status', 'advanced-access-manager'),
     103            'manage_categories' => __('Allows a user to manage and edit categories for posts', 'advanced-access-manager'),
     104            'manage_links' => __('Allows a user to manage and edit links in the blogroll', 'advanced-access-manager'),
     105            'upload_files' => __('Allows a user to upload files to the media library', 'advanced-access-manager'),
     106            'import' => __('Allows a user to import content from external sources', 'advanced-access-manager'),
     107            'unfiltered_html' => __('Allows a user to post unfiltered HTML content', 'advanced-access-manager'),
     108            'edit_posts' => __('Allows a user to edit posts created by the user', 'advanced-access-manager'),
     109            'edit_others_posts' => __('Allows a user to edit posts created by other users', 'advanced-access-manager'),
     110            'edit_published_posts' => __('Allows a user to edit posts that are already published', 'advanced-access-manager'),
     111            'publish_posts' => __('Allows a user to publish new posts', 'advanced-access-manager'),
     112            'edit_pages' => __('Allows a user to edit pages on the site', 'advanced-access-manager'),
     113            'read' => __('Allows a user to read and view site content', 'advanced-access-manager'),
     114            'publish_pages' => __('Publish pages on the site', 'advanced-access-manager'),
     115            'edit_others_pages' => __('Edit pages created by other users', 'advanced-access-manager'),
     116            'edit_published_pages' => __('Edit pages that are already published', 'advanced-access-manager'),
     117            'delete_pages' => __('Delete pages', 'advanced-access-manager'),
     118            'delete_others_pages' => __('Delete pages created by other users', 'advanced-access-manager'),
     119            'delete_published_pages' => __('Delete pages that are already published', 'advanced-access-manager'),
     120            'delete_posts' => __('Delete posts', 'advanced-access-manager'),
     121            'delete_others_posts' => __('Delete posts created by other users', 'advanced-access-manager'),
     122            'delete_published_posts' => __('Delete posts that are already published', 'advanced-access-manager'),
     123            'delete_private_posts' => __('Delete private posts', 'advanced-access-manager'),
     124            'edit_private_posts' => __('Edit private posts', 'advanced-access-manager'),
     125            'read_private_posts' => __('Read private posts', 'advanced-access-manager'),
     126            'delete_private_pages' => __('Delete private pages', 'advanced-access-manager'),
     127            'edit_private_pages' => __('Edit private pages', 'advanced-access-manager'),
     128            'read_private_pages' => __('Read private pages', 'advanced-access-manager'),
     129            'delete_users' => __('Delete users', 'advanced-access-manager'),
     130            'create_users' => __('Create new users', 'advanced-access-manager'),
     131            'unfiltered_upload' => __('Upload files without filtering', 'advanced-access-manager'),
     132            'edit_dashboard' => __('Access and edit the dashboard', 'advanced-access-manager'),
     133            'customize' => __('Customize site appearance and options', 'advanced-access-manager'),
     134            'delete_site' => __('Delete the entire site', 'advanced-access-manager'),
     135            'update_plugins' => __('Update installed plugins', 'advanced-access-manager'),
     136            'delete_plugins' => __('Delete installed plugins', 'advanced-access-manager'),
     137            'update_themes' => __('Update installed themes', 'advanced-access-manager'),
     138            'update_core' => __('Update WordPress core', 'advanced-access-manager'),
     139            'list_users' => __('View list of all users', 'advanced-access-manager'),
     140            'remove_users' => __('Remove users from the site', 'advanced-access-manager'),
     141            'add_users' => __('Add new users to the site', 'advanced-access-manager'),
     142            'promote_users' => __('Promote users to higher roles', 'advanced-access-manager'),
     143            'delete_themes' => __('Delete installed themes', 'advanced-access-manager'),
     144            'export' => __('Export data from the site', 'advanced-access-manager'),
     145            'edit_comment' => __('Edit comments left on the site', 'advanced-access-manager'),
     146            'create_sites' => __('Create new sites in a multisite network', 'advanced-access-manager'),
     147            'delete_sites' => __('Delete sites in a multisite network', 'advanced-access-manager'),
     148            'manage_network' => __('Manage the entire network of sites', 'advanced-access-manager'),
     149            'manage_sites' => __('Manage individual sites in a multisite network', 'advanced-access-manager'),
     150            'manage_network_users' => __('Manage users across the entire network', 'advanced-access-manager'),
     151            'manage_network_themes' => __('Manage themes across the entire network', 'advanced-access-manager'),
     152            'manage_network_options' => __('Manage network-wide options and settings', 'advanced-access-manager'),
     153            'manage_network_plugins' => __('Manage plugins across the entire network', 'advanced-access-manager'),
     154            'upload_plugins' => __('Upload plugins to the site', 'advanced-access-manager'),
     155            'upload_themes' => __('Upload themes to the site', 'advanced-access-manager'),
     156            'upgrade_network' => __('Upgrade the entire network of sites', 'advanced-access-manager'),
     157            'setup_network' => __('Set up and configure a multisite network', 'advanced-access-manager'),
     158            'level_0' => __('Read only user level. Typically the Subscriber role.', 'advanced-access-manager'),
     159            'level_1' => __('Limited access level. Typically the Contributor role.', 'advanced-access-manager'),
     160            'level_2' => __('Author role access level', 'advanced-access-manager'),
     161            'level_3' => __('No specific meaning.', 'advanced-access-manager'),
     162            'level_4' => __('No specific meaning.', 'advanced-access-manager'),
     163            'level_5' => __('No specific meaning.', 'advanced-access-manager'),
     164            'level_6' => __('No specific meaning.', 'advanced-access-manager'),
     165            'level_7' => __('Editor access level.', 'advanced-access-manager'),
     166            'level_8' => __('No specific meaning.', 'advanced-access-manager'),
     167            'level_9' => __('No specific meaning.', 'advanced-access-manager'),
     168            'level_10' => __('The highest level capabilities. Typically the Administrator role.', 'advanced-access-manager')
     169        ];
    170170    }
    171171
  • advanced-access-manager/trunk/application/Service/Content.php

    r3296450 r3304543  
    5151     * @access protected
    5252     *
    53      * @version 7.0.0
     53     * @version 7.0.4
    5454     */
    5555    protected function __construct()
    5656    {
    5757        add_filter('aam_get_config_filter', function($result, $key) {
    58             if (is_null($result) && array_key_exists($key, self::DEFAULT_CONFIG)) {
     58            if (empty($result) && array_key_exists($key, self::DEFAULT_CONFIG)) {
    5959                $result = self::DEFAULT_CONFIG[$key];
    6060            }
     
    6363        }, 10, 2);
    6464
    65 
     65        // Register RESTful API
     66        AAM_Restful_Content::bootstrap();
     67
     68        add_action('init', function() {
     69            $this->initialize_hooks();
     70        }, PHP_INT_MAX);
     71    }
     72
     73    /**
     74     * Initialize Content service hooks
     75     *
     76     * @return void
     77     * @access protected
     78     *
     79     * @version 7.0.4
     80     */
     81    protected function initialize_hooks()
     82    {
    6683        if (is_admin()) {
    6784            // Hook that initialize the AAM UI part of the service
     
    86103        }
    87104
    88         // Register RESTful API
    89         AAM_Restful_Content::bootstrap();
    90 
    91         $this->initialize_hooks();
    92     }
    93 
    94     /**
    95      * Initialize Content service hooks
    96      *
    97      * @return void
    98      * @access protected
    99      *
    100      * @version 7.0.0
    101      */
    102     protected function initialize_hooks()
    103     {
    104105        if (!is_admin()) {
    105106            // Password protected filter
     
    171172
    172173        // Audit all registered post types and adjust access controls accordingly
    173         add_action('registered_post_type', function ($post_type, $obj) {
     174        foreach(get_post_types([], 'objects') as $post_type) {
    174175            // REST API. Control if user is allowed to publish content
    175             add_filter("rest_pre_insert_{$post_type}", function ($post, $request) {
     176            add_filter("rest_pre_insert_{$post_type->name}", function ($post, $request) {
    176177                $status = (isset($request['status']) ? $request['status'] : null);
    177178
     
    182183                        $post = new WP_Error(
    183184                            'rest_cannot_publish',
    184                             __('You are not allowed to publish this content', 'advanced-access-manager'),
    185                             array('status' => rest_authorization_required_code())
     185                            'You are not allowed to publish this content',
     186                            [ 'status' => rest_authorization_required_code() ]
    186187                        );
    187188                    }
     
    193194            // Populate the collection of post type caps
    194195            foreach ([ 'edit_post', 'read_post', 'delete_post', 'publish_posts' ] as $cap) {
    195                 $meta_cap = $obj->cap->{$cap};
     196                $meta_cap = $post_type->cap->{$cap};
    196197
    197198                if (!empty($meta_cap)
     
    202203                }
    203204            }
    204         }, 10, 2);
     205        }
    205206    }
    206207
  • advanced-access-manager/trunk/application/Service/Core.php

    r3296450 r3304543  
    6868     * @return void
    6969     *
    70      * @version 7.0.3
     70     * @version 7.0.4
    7171     */
    7272    protected function __construct()
    7373    {
    7474        add_filter('aam_get_config_filter', function($result, $key) {
    75             if (is_null($result) && array_key_exists($key, self::DEFAULT_CONFIG)) {
     75            if (empty($result) && array_key_exists($key, self::DEFAULT_CONFIG)) {
    7676                $result = self::DEFAULT_CONFIG[$key];
    7777            }
     
    8080        }, 10, 2);
    8181
     82        // Control user's status
     83        add_action('set_current_user', function() {
     84            $this->_control_user_account();
     85        });
     86
     87        // Bootstrap RESTful API
     88        AAM_Restful_Mu::bootstrap();
     89        AAM_Restful_Roles::bootstrap();
     90        AAM_Restful_Users::bootstrap();
     91        AAM_Restful_Configs::bootstrap();
     92        AAM_Restful_Settings::bootstrap();
     93        AAM_Restful_BackwardCompatibility::bootstrap();
     94
     95        add_action('init', function() {
     96            $this->initialize_hooks();
     97        }, PHP_INT_MAX);
     98    }
     99
     100    /**
     101     * Initialize service hooks
     102     *
     103     * @return void
     104     * @access protected
     105     *
     106     * @version 7.0.4
     107     */
     108    protected function initialize_hooks()
     109    {
    82110        // Hook into AAM config initialization and enrich it with ConfigPress
    83111        // settings
     
    224252            return $response;
    225253        }, PHP_INT_MAX);
    226 
    227         // Control user's status
    228         add_action('set_current_user', function() {
    229             $this->_control_user_account();
    230         });
    231254
    232255        // Control admin notifications
     
    270293
    271294        // Control access to the backend area
    272         add_action('init', function() {
    273             $this->_control_admin_area_access();
    274             $this->_control_admin_toolbar();
    275 
    276             // Run upgrades if available
    277             AAM_Core_Migration::run();
    278         }, 1);
    279 
    280         // Bootstrap RESTful API
    281         AAM_Restful_Mu::bootstrap();
    282         AAM_Restful_Roles::bootstrap();
    283         AAM_Restful_Users::bootstrap();
    284         AAM_Restful_Configs::bootstrap();
    285         AAM_Restful_Settings::bootstrap();
    286         AAM_Restful_BackwardCompatibility::bootstrap();
     295        $this->_control_admin_area_access();
     296        $this->_control_admin_toolbar();
     297
     298        // Run upgrades if available
     299        AAM_Core_Migration::run();
    287300    }
    288301
  • advanced-access-manager/trunk/application/Service/Identity.php

    r3294227 r3304543  
    4343     * @access protected
    4444     *
    45      * @version 7.0.0
     45     * @version 7.0.4
    4646     */
    4747    protected function __construct()
     48    {
     49        // Register RESTful API endpoints
     50        AAM_Restful_Identity::bootstrap();
     51
     52        add_action('init', function() {
     53            $this->initialize_hooks();
     54        }, PHP_INT_MAX);
     55    }
     56
     57    /**
     58     * Initialize service hooks
     59     *
     60     * @return void
     61     * @access protected
     62     *
     63     * @version 7.0.4
     64     */
     65    protected function initialize_hooks()
    4866    {
    4967        if (is_admin()) {
     
    5472        }
    5573
    56         // Register RESTful API endpoints
    57         AAM_Restful_Identity::bootstrap();
    58 
    59         $this->initialize_hooks();
    60     }
    61 
    62     /**
    63      * Initialize service hooks
    64      *
    65      * @return void
    66      * @access protected
    67      *
    68      * @version 7.0.2
    69      */
    70     protected function initialize_hooks()
    71     {
    7274        // Control the list of editable roles
    7375        add_filter('editable_roles', function($roles) {
  • advanced-access-manager/trunk/application/Service/Jwt.php

    r3290564 r3304543  
    4444     * @access protected
    4545     *
    46      * @version 7.0.0
     46     * @version 7.0.4
    4747     */
    4848    protected function __construct()
    4949    {
    5050        add_filter('aam_get_config_filter', function($result, $key) {
    51             if (is_null($result) && array_key_exists($key, self::DEFAULT_CONFIG)) {
     51            if (empty($result) && array_key_exists($key, self::DEFAULT_CONFIG)) {
    5252                $result = self::DEFAULT_CONFIG[$key];
    5353            }
     
    5656        }, 10, 2);
    5757
     58        // WP Core current user definition
     59        add_filter('determine_current_user', function($user_id){
     60            return $this->_determine_current_user($user_id);
     61        }, PHP_INT_MAX);
     62
     63        // Register RESTful API
     64        AAM_Restful_Jwt::bootstrap();
     65
     66        add_action('init', function() {
     67            $this->initialize_hooks();
     68        }, PHP_INT_MAX);
     69    }
     70
     71    /**
     72     * Initialize service hooks
     73     *
     74     * @return void
     75     * @access protected
     76     *
     77     * @version 7.0.4
     78     */
     79    protected function initialize_hooks()
     80    {
    5881        if (is_admin()) {
    5982            // Hook that initialize the AAM UI part of the service
     
    7194        }
    7295
    73         $this->initialize_hooks();
    74     }
    75 
    76     /**
    77      * Initialize service hooks
    78      *
    79      * @return void
    80      * @access protected
    81      *
    82      * @version 7.0.0
    83      */
    84     protected function initialize_hooks()
    85     {
    8696        add_action('aam_reset_action', function() {
    8797            global $wpdb;
     
    92102            ]);
    93103        });
    94 
    95         // Register RESTful API
    96         AAM_Restful_Jwt::bootstrap();
    97104
    98105        add_filter(
     
    102109            }, 10, 3
    103110        );
    104 
    105         // WP Core current user definition
    106         add_filter('determine_current_user', function($user_id){
    107             return $this->_determine_current_user($user_id);
    108         }, PHP_INT_MAX);
    109111
    110112        // Allow other implementations to work with JWT token
     
    205207     * @access private
    206208     *
    207      * @version 7.0.0
     209     * @version 7.0.4
    208210     */
    209211    private function _determine_current_user($user_id)
     
    214216            if (!empty($token)) {
    215217                $claims = AAM::api()->jwt->decode($token->jwt);
    216 
    217218
    218219                if (!is_wp_error($claims)) {
     
    234235
    235236                        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                                 }
     237                            if ($this->_is_user_active($cuid)) {
     238                                $this->_maybe_authenticate($cuid, $token, $claims);
    250239
    251240                                $user_id = $cuid;
     
    258247
    259248        return $user_id;
     249    }
     250
     251    /**
     252     * Determine if JWT token is used in password-less URL and if so - authenticate
     253     *
     254     * @param int    $user_id
     255     * @param object $token
     256     * @param array  $claims
     257     *
     258     * @return void
     259     * @access private
     260     *
     261     * @version 7.0.4
     262     */
     263    private function _maybe_authenticate($user_id, $token, $claims)
     264    {
     265        if (in_array($token->method, [ 'get', 'query', 'query_param' ], true)) {
     266            $this->_authenticate_user($user_id, $claims);
     267        }
    260268    }
    261269
     
    320328     * @access protected
    321329     *
    322      * @version 7.0.0
     330     * @version 7.0.4
    323331     */
    324332    private function _extract_token()
    325333    {
    326334        $configs   = AAM::api()->config;
    327         $container = wp_parse_list($configs->get('service.jwt.bearer'));
     335        $container = wp_parse_list($configs->get('service.jwt.bearer', ''));
    328336
    329337        foreach ($container as $method) {
     
    394402     * @param int $user_id
    395403     *
    396      * @return bool|WP_Error
     404     * @return bool
    397405     * @access private
    398406     *
    399      * @version 7.0.0
    400      */
    401     private function _verify_user_status($user_id)
    402     {
    403         $result = true;
    404         $user   = AAM::api()->user($user_id);
    405 
    406         // Step #1. Verify that user is active
    407         if (!$user->is_user_active()) {
    408             $result = new WP_Error(
    409                 'inactive_user',
    410                 '[ERROR]: User is inactive. Contact the administrator.'
    411             );
    412         }
    413 
    414         // Step #2. Verify that user is not expired
    415         if ($user->is_user_access_expired()) {
    416             $result = new WP_Error(
    417                 'inactive_user',
    418                 '[ERROR]: User access is expired. Contact the administrator.'
    419             );
    420         }
    421 
    422         return $result;
     407     * @version 7.0.4
     408     */
     409    private function _is_user_active($user_id)
     410    {
     411        $user = AAM::api()->user($user_id);
     412
     413        // Verify that user is active and is not expired
     414        return $user->is_user_active() && !$user->is_user_access_expired();
    423415    }
    424416
  • advanced-access-manager/trunk/application/Service/LoginRedirect.php

    r3286780 r3304543  
    3535     * @access protected
    3636     *
    37      * @version 7.0.0
     37     * @version 7.0.4
    3838     */
    3939    protected function __construct()
    4040    {
    4141        add_filter('aam_get_config_filter', function($result, $key) {
    42             if (is_null($result) && array_key_exists($key, self::DEFAULT_CONFIG)) {
     42            if (empty($result) && array_key_exists($key, self::DEFAULT_CONFIG)) {
    4343                $result = self::DEFAULT_CONFIG[$key];
    4444            }
     
    4747        }, 10, 2);
    4848
    49         if (is_admin()) {
    50             // Hook that initialize the AAM UI part of the service
    51             add_action('aam_initialize_ui_action', function () {
    52                 AAM_Backend_Feature_Main_LoginRedirect::register();
    53             });
    54         }
     49        // Register RESTful API
     50        AAM_Restful_LoginRedirect::bootstrap();
    5551
    56         $this->initialize_hooks();
     52        add_action('init', function() {
     53            $this->initialize_hooks();
     54        }, PHP_INT_MAX);
    5755    }
    5856
     
    6361     * @access protected
    6462     *
    65      * @version 7.0.0
     63     * @version 7.0.4
    6664     */
    6765    protected function initialize_hooks()
    6866    {
     67        if (is_admin()) {
     68            // Hook that initialize the AAM UI part of the service
     69            add_action('aam_initialize_ui_action', function () {
     70                AAM_Backend_Feature_Main_LoginRedirect::register();
     71            });
     72        }
     73
    6974        // AAM Secure Login hooking
    7075        add_filter(
     
    7782        // WP Core login redirect hook
    7883        add_filter('login_redirect', [ $this, 'get_login_redirect' ], 10, 3);
    79 
    80         // Register RESTful API
    81         AAM_Restful_LoginRedirect::bootstrap();
    8284    }
    8385
  • advanced-access-manager/trunk/application/Service/LogoutRedirect.php

    r3290564 r3304543  
    3636     * @access protected
    3737     *
    38      * @version 7.0.0
     38     * @version 7.0.4
    3939     */
    4040    protected function __construct()
     41    {
     42        // Register RESTful API
     43        AAM_Restful_LogoutRedirect::bootstrap();
     44
     45        add_action('init', function() {
     46            $this->initialize_hooks();
     47        }, PHP_INT_MAX);
     48    }
     49
     50    /**
     51     * Initialize Logout redirect hooks
     52     *
     53     * @return void
     54     * @access protected
     55     *
     56     * @version 7.0.4
     57     */
     58    protected function initialize_hooks()
    4159    {
    4260        if (is_admin()) {
     
    4765        }
    4866
    49         $this->initialize_hooks();
    50     }
    51 
    52     /**
    53      * Initialize Logout redirect hooks
    54      *
    55      * @return void
    56      * @access protected
    57      *
    58      * @version 7.0.1
    59      */
    60     protected function initialize_hooks()
    61     {
    6267        // Capture currently logging out user settings
    6368        add_action('clear_auth_cookie', function() {
     
    7580            }
    7681        }, PHP_INT_MAX);
    77 
    78         // Register RESTful API
    79         AAM_Restful_LogoutRedirect::bootstrap();
    8082    }
    8183
  • advanced-access-manager/trunk/application/Service/Metaboxes.php

    r3296450 r3304543  
    2525     * @access protected
    2626     *
    27      * @version 7.0.0
     27     * @version 7.0.4
    2828     */
    2929    protected function __construct()
     30    {
     31        // Register RESTful API endpoints
     32        AAM_Restful_Metabox::bootstrap();
     33
     34        add_action('init', function() {
     35            $this->initialize_hooks();
     36        }, PHP_INT_MAX);
     37    }
     38
     39    /**
     40     * Initialize hooks
     41     *
     42     * @return void
     43     * @access protected
     44     *
     45     * @version 7.0.4
     46     */
     47    protected function initialize_hooks()
    3048    {
    3149        if (is_admin()) {
     
    3654        }
    3755
    38         // Register RESTful API endpoints
    39         AAM_Restful_Metabox::bootstrap();
    40 
    41         $this->initialize_hooks();
    42     }
    43 
    44     /**
    45      * Initialize hooks
    46      *
    47      * @return void
    48      * @access protected
    49      *
    50      * @version 7.0.0
    51      */
    52     protected function initialize_hooks()
    53     {
    5456        // Manager WordPress metaboxes
    5557        add_action('in_admin_header', function () {
  • advanced-access-manager/trunk/application/Service/NotFoundRedirect.php

    r3286780 r3304543  
    2424     * @access protected
    2525     *
    26      * @version 7.0.0
     26     * @version 7.0.4
    2727     */
    2828    protected function __construct()
     29    {
     30        // Register the RESTful API
     31        AAM_Restful_NotFoundRedirect::bootstrap();
     32
     33        add_action('init', function() {
     34            $this->initialize_hooks();
     35        }, PHP_INT_MAX);
     36    }
     37
     38    /**
     39     * Initialize the service hooks
     40     *
     41     * @return void
     42     * @access protected
     43     *
     44     * @version 7.0.4
     45     */
     46    protected function initialize_hooks()
    2947    {
    3048        if (is_admin()) {
     
    3553        }
    3654
    37         $this->initialize_hooks();
    38     }
    39 
    40     /**
    41      * Initialize the service hooks
    42      *
    43      * @return void
    44      * @access protected
    45      *
    46      * @version 7.0.0
    47      */
    48     protected function initialize_hooks()
    49     {
    5055        add_action('wp', function() {
    5156            global $wp_query;
     
    5964            }
    6065        });
    61 
    62         // Register the RESTful API
    63         AAM_Restful_NotFoundRedirect::bootstrap();
    6466    }
    6567
  • advanced-access-manager/trunk/application/Service/Policies.php

    r3286780 r3304543  
    2424     * @access protected
    2525     *
    26      * @version 7.0.0
     26     * @version 7.0.4
    2727     */
    2828    protected function __construct()
    2929    {
    30         if (is_admin()) {
    31             // Hook that initialize the AAM UI part of the service
    32             add_action('aam_initialize_ui_action', function () {
    33                 AAM_Backend_Feature_Main_Policy::register();
    34             });
    35 
    36             // Register custom access control metabox
    37             add_action('add_meta_boxes', function() {
    38                 $this->_add_meta_boxes();
    39             });
    40 
    41             // Access policy save
    42             add_filter('wp_insert_post_data', function($data) {
    43                 return $this->_wp_insert_post_data($data);
    44             });
    45         }
    46 
    47         $this->initialize_hooks();
     30        // Register RESTful API
     31        AAM_Restful_Policies::bootstrap();
     32
     33        add_action('init', function() {
     34            $this->initialize_hooks();
     35        }, PHP_INT_MAX);
    4836    }
    4937
     
    7967     *
    8068     * @return void
    81      *
    8269     * @access protected
    83      * @version 7.0.0
     70     *
     71     * @version 7.0.4
    8472     */
    8573    protected function initialize_hooks()
    8674    {
    87         // Register RESTful API
    88         AAM_Restful_Policies::bootstrap();
     75        if (is_admin()) {
     76            // Hook that initialize the AAM UI part of the service
     77            add_action('aam_initialize_ui_action', function () {
     78                AAM_Backend_Feature_Main_Policy::register();
     79            });
     80
     81            // Register custom access control metabox
     82            add_action('add_meta_boxes', function() {
     83                $this->_add_meta_boxes();
     84            });
     85
     86            // Access policy save
     87            add_filter('wp_insert_post_data', function($data) {
     88                return $this->_wp_insert_post_data($data);
     89            });
     90        }
    8991
    9092        // Override role list permissions
  • advanced-access-manager/trunk/application/Service/SecureLogin.php

    r3286780 r3304543  
    3939     * @access protected
    4040     *
    41      * @version 7.0.0
     41     * @version 7.0.4
    4242     */
    4343    protected function __construct()
    4444    {
    4545        add_filter('aam_get_config_filter', function($result, $key) {
    46             if (is_null($result) && array_key_exists($key, self::DEFAULT_CONFIG)) {
     46            if (empty($result) && array_key_exists($key, self::DEFAULT_CONFIG)) {
    4747                $result = self::DEFAULT_CONFIG[$key];
    4848            }
     
    5151        }, 10, 2);
    5252
     53        // Register custom RESTful API endpoint for login
     54        AAM_Restful_SecureLogin::bootstrap();
     55
     56        add_action('init', function() {
     57            $this->initialize_hooks();
     58        }, PHP_INT_MAX);
     59    }
     60
     61    /**
     62     * Initialize core hooks
     63     *
     64     * @return void
     65     * @access protected
     66     *
     67     * @version 7.0.4
     68     */
     69    protected function initialize_hooks()
     70    {
    5371        if (is_admin()) {
    5472            // Register additional tab for the Settings
     
    5876        }
    5977
    60         $this->initialize_hooks();
    61     }
    62 
    63     /**
    64      * Initialize core hooks
    65      *
    66      * @return void
    67      * @access protected
    68      *
    69      * @version 7.0.0
    70      */
    71     protected function initialize_hooks()
    72     {
    7378        // Register custom frontend Login widget
    7479        add_action('widgets_init', function () {
    7580            register_widget('AAM_Backend_Widget_Login');
    7681        });
    77 
    78         // Register custom RESTful API endpoint for login
    79         AAM_Restful_SecureLogin::bootstrap();
    8082
    8183        // Redefine the wp-login.php header message
  • advanced-access-manager/trunk/application/Service/SecurityAudit.php

    r3286780 r3304543  
    5656     * @access protected
    5757     *
    58      * @version 7.0.0
     58     * @version 7.0.4
    5959     */
    6060    protected function __construct()
     61    {
     62        // Keep the support RESTful service enabled at all times because it is used
     63        // by issue reporting feature as well
     64        AAM_Restful_SecurityAudit::bootstrap();
     65
     66        add_action('init', function() {
     67            $this->initialize_hooks();
     68        }, PHP_INT_MAX);
     69    }
     70
     71    /**
     72     * Initialize service hooks
     73     *
     74     * @return void
     75     * @access protected
     76     *
     77     * @version 7.0.4
     78     */
     79    protected function initialize_hooks()
    6180    {
    6281        add_filter('aam_security_scan_enabled_filter', function() {
    6382            return AAM::api()->config->get(AAM::SERVICES[__CLASS__], true);
    6483        });
    65 
    6684
    6785        // Register cron-job
     
    8098            );
    8199        });
    82 
    83         // Keep the support RESTful service enabled at all times because it is used
    84         // by issue reporting feature as well
    85         AAM_Restful_SecurityAudit::bootstrap();
    86100    }
    87101
  • advanced-access-manager/trunk/application/Service/Urls.php

    r3286780 r3304543  
    2525     * @access protected
    2626     *
    27      * @version 7.0.0
     27     * @version 7.0.4
    2828     */
    2929    protected function __construct()
    3030    {
    31 
    32         if (is_admin()) {
    33             // Hook that initialize the AAM UI part of the service
    34             add_action('aam_initialize_ui_action', function () {
    35                 AAM_Backend_Feature_Main_Url::register();
    36             });
    37         }
    38 
    3931        // Register RESTful API endpoints
    4032        AAM_Restful_Urls::bootstrap();
    4133
    42         $this->initialize_hooks();
     34        add_action('init', function() {
     35            $this->initialize_hooks();
     36        }, PHP_INT_MAX);
    4337    }
    4438
     
    4943     * @access protected
    5044     *
    51      * @version 7.0.0
     45     * @version 7.0.4
    5246     */
    5347    protected function initialize_hooks()
    5448    {
     49        if (is_admin()) {
     50            // Hook that initialize the AAM UI part of the service
     51            add_action('aam_initialize_ui_action', function () {
     52                AAM_Backend_Feature_Main_Url::register();
     53            });
     54        }
     55
    5556        // Authorize request
    56         add_action('init', function() {
    57             $this->authorize();
    58         });
     57        $this->authorize();
    5958    }
    6059
  • advanced-access-manager/trunk/application/Service/Widgets.php

    r3294227 r3304543  
    3232     * @access protected
    3333     *
    34      * @version 7.0.0
     34     * @version 7.0.4
    3535     */
    3636    protected function __construct()
    3737    {
    38         if (is_admin()) {
    39             // Hook that initialize the AAM UI part of the service
    40             add_action('aam_initialize_ui_action', function () {
    41                 AAM_Backend_Feature_Main_Widget::register();
    42             });
    43         }
    44 
    4538        // Register RESTful API endpoints
    4639        AAM_Restful_Widgets::bootstrap();
    4740
    48         $this->initialize_hooks();
     41        add_action('init', function() {
     42            $this->initialize_hooks();
     43        }, PHP_INT_MAX);
    4944    }
    5045
     
    8580     * @access protected
    8681     *
    87      * @version 7.0.0
     82     * @version 7.0.4
    8883     */
    8984    protected function initialize_hooks()
    9085    {
    9186        if (is_admin()) {
     87            // Hook that initialize the AAM UI part of the service
     88            add_action('aam_initialize_ui_action', function () {
     89                AAM_Backend_Feature_Main_Widget::register();
     90            });
     91
    9292            // Manager WordPress metaboxes
    9393            add_action('in_admin_header', function () {
  • advanced-access-manager/trunk/readme.txt

    r3296450 r3304543  
    55Requires PHP: 5.6.0
    66Tested up to: 6.8.0
    7 Stable tag: 7.0.3
     7Stable tag: 7.0.4
    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.4 =
     64* Change: Making sure that all AAM hooks are triggered only after init [https://github.com/aamplugin/advanced-access-manager/issues/465](https://github.com/aamplugin/advanced-access-manager/issues/465)
    6265
    6366= 7.0.3 =
Note: See TracChangeset for help on using the changeset viewer.