Skip to content

Instantly share code, notes, and snippets.

@joshfeck
Created March 7, 2020 02:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshfeck/e9f54800d07330e1f615a0fd32965739 to your computer and use it in GitHub Desktop.
Save joshfeck/e9f54800d07330e1f615a0fd32965739 to your computer and use it in GitHub Desktop.
Example code for adding to the Event Espresso 4 Registrations admin list table
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
add_action(
'AHEE__admin_wrapper__template__before_admin_page_content',
'my_custom_add_to_admin_reg_list_table'
);
function my_custom_add_to_admin_reg_list_table() {
$currentScreen = get_current_screen();
if(
$currentScreen->id === "event-espresso_page_espresso_registrations"
) {
if (
! isset($_REQUEST['action']) ||
empty($_REQUEST['action' ]) ||
$_REQUEST['action'] === 'default'
) {
// your code to add new things goes here
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment