Created
January 10, 2022 11:58
-
-
Save Pebblo/d873917590646da70303b513f6c92a43 to your computer and use it in GitHub Desktop.
Example of how you can remove the screen options on the EE event editor page for a specific user ID.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php //Please do not include the opening PHP tag if you already have one. | |
function tw_ee_remove_ee_event_screen_options() { | |
if(get_current_user_id() === 1) { | |
add_filter('screen_options_show_screen', '__return_false'); | |
} | |
} | |
add_action('AHEE__EE_Admin_Page___initialize_admin_page__before_initialization_espresso_events', 'tw_ee_remove_ee_event_screen_options'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment