Plugin Directory


Ignore:
Timestamp:
04/02/2025 06:36:12 AM (12 months ago)
Author:
tlamedia
Message:

Update to version 2.3.2 from GitHub

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gtm-kit/trunk/src/Admin/AdminAPI.php

    r3169885 r3265445  
    8282            ]
    8383        );
    84     }
    85 
    86     /**
    87      * Permission callback
    88      *
    89      * @return true|WP_Error
    90      */
    91     public function permission_callback() {
    92         $capability = is_multisite() ? 'manage_network_options' : 'manage_options';
    93         $capability = apply_filters( 'gtmkit_admin_capability', $capability );
    94 
    95         if ( ! current_user_can( $capability ) ) {
    96             return new WP_Error( 'rest_forbidden', esc_html__( 'Only authenticated users can access endpoint.', 'gtm-kit' ), [ 'status' => 401 ] );
    97         }
    98 
    99         return true;
    10084    }
    10185
Note: See TracChangeset for help on using the changeset viewer.