Plugin Directory

Changeset 3221690


Ignore:
Timestamp:
01/13/2025 04:25:58 PM (10 months ago)
Author:
PerS
Message:

Update to version 1.8.2 from GitHub

Location:
super-admin-all-sites-menu
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • super-admin-all-sites-menu/tags/1.8.2/readme.txt

    r3220658 r3221690  
    11=== Super Admin All Sites Menu ===
    2 Stable tag: 1.8.1
     2Stable tag: 1.8.2
    33Requires at least: 5.6 
    44Tested up to: 6.7 
     
    109109== Changelog ==
    110110
     111
     112= 1.8.2 =
     113* Abort early if the user does not have the required permissions
     114* Security: Added endpoint verification for REST API requests
     115* Bug fix: Added rest endpoint permission check
     116* Code improvement: Added strict types declaration
     117* Code improvement: Added return type declarations
     118
    111119= 1.8.1 =
    112120
  • super-admin-all-sites-menu/tags/1.8.2/super-admin-all-sites-menu.php

    r3220658 r3221690  
    1313 * GitHub Plugin URI: https://github.com/soderlind/super-admin-all-sites-menu
    1414 * Description: For the super admin, replace WP Admin Bar My Sites menu with an All Sites menu.
    15  * Version:     1.8.1
     15 * Version:     1.8.2
    1616 * Author:      Per Soderlind
    1717 * Network:     true
     
    5656
    5757    public function init(): void {
     58
     59        // Only for super admins and REST API requests.
     60        if ( ! is_super_admin() && ! wp_is_rest_endpoint() ) {
     61            return;
     62        }
     63
     64        // Only for multisite.
    5865        if ( ! is_multisite() ) {
     66            return;
     67        }
     68
     69        // Only for REST API requests to the correct endpoint.
     70        if ( wp_is_rest_endpoint() && false === strpos( get_rest_url(), Config::REST_ENDPOINT ) ) {
    5971            return;
    6072        }
     
    510522}
    511523
    512 // Initialize plugin
    513 ( new SuperAdminAllSitesMenu() )->init();
     524add_action( 'plugins_loaded', function () {
     525    // Initialize plugin
     526    ( new SuperAdminAllSitesMenu() )->init();
     527} );
     528
  • super-admin-all-sites-menu/trunk/readme.txt

    r3220658 r3221690  
    11=== Super Admin All Sites Menu ===
    2 Stable tag: 1.8.1
     2Stable tag: 1.8.2
    33Requires at least: 5.6 
    44Tested up to: 6.7 
     
    109109== Changelog ==
    110110
     111
     112= 1.8.2 =
     113* Abort early if the user does not have the required permissions
     114* Security: Added endpoint verification for REST API requests
     115* Bug fix: Added rest endpoint permission check
     116* Code improvement: Added strict types declaration
     117* Code improvement: Added return type declarations
     118
    111119= 1.8.1 =
    112120
  • super-admin-all-sites-menu/trunk/super-admin-all-sites-menu.php

    r3220658 r3221690  
    1313 * GitHub Plugin URI: https://github.com/soderlind/super-admin-all-sites-menu
    1414 * Description: For the super admin, replace WP Admin Bar My Sites menu with an All Sites menu.
    15  * Version:     1.8.1
     15 * Version:     1.8.2
    1616 * Author:      Per Soderlind
    1717 * Network:     true
     
    5656
    5757    public function init(): void {
     58
     59        // Only for super admins and REST API requests.
     60        if ( ! is_super_admin() && ! wp_is_rest_endpoint() ) {
     61            return;
     62        }
     63
     64        // Only for multisite.
    5865        if ( ! is_multisite() ) {
     66            return;
     67        }
     68
     69        // Only for REST API requests to the correct endpoint.
     70        if ( wp_is_rest_endpoint() && false === strpos( get_rest_url(), Config::REST_ENDPOINT ) ) {
    5971            return;
    6072        }
     
    510522}
    511523
    512 // Initialize plugin
    513 ( new SuperAdminAllSitesMenu() )->init();
     524add_action( 'plugins_loaded', function () {
     525    // Initialize plugin
     526    ( new SuperAdminAllSitesMenu() )->init();
     527} );
     528
Note: See TracChangeset for help on using the changeset viewer.