Plugin Directory

Changeset 3047188


Ignore:
Timestamp:
03/07/2024 02:36:46 PM (2 years ago)
Author:
bc2018
Message:

check role

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bc-menu-cart-woo/trunk/inc/Main.php

    r3047119 r3047188  
    6363                die(__('Security check failed', 'bc-menu-cart-woo'));
    6464            }
     65
     66            if (!current_user_can('edit_posts')) {
     67                wp_die(__('You don not have the rights to continue', 'bc-menu-cart-woo'));
     68            }
     69
    6570            error_log('Security check passed, go ahead and delete');
    6671            wp_delete_post($option_post_id);
Note: See TracChangeset for help on using the changeset viewer.