Created
January 20, 2020 14:26
-
-
Save Pebblo/8b8d1968f39ce90530b6c1e447541d77 to your computer and use it in GitHub Desktop.
Fixes a conflict with eventON due to it changing `$typenow` on admin_init.
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. | |
// Set `$typenow` back to empty when editing espresso_venues | |
add_action('admin_init', 'tw_ee_eventON_fix', 11); | |
function tw_ee_eventON_fix(){ | |
global $typenow; | |
if (isset($_REQUEST['page'], $_REQUEST['action']) | |
&& $_REQUEST['page'] === 'espresso_venues' | |
&& $_REQUEST['action'] === 'edit' | |
){ | |
$typenow = ''; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment