-
-
Save joshfeck/fcc1da76ca446ec13c69 to your computer and use it in GitHub Desktop.
This will hide the Export All buttons from the users with the Event Manager role. Event Espresso 3 + Roles and Permissions add-on required.
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, except of course if you're starting with a blank file | |
add_action('admin_head', 'my_custom_hide_buttons_for_event_managers'); | |
function my_custom_hide_buttons_for_event_managers() { | |
global $pagenow; | |
if( $pagenow == 'admin.php' && ! current_user_can( 'espresso_group_admin' ) ) { | |
echo '<style> | |
#form1[action="admin.php?page=events"] a.button-secondary[title="Export to Excel"] {display:none !important;} | |
</style>'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment