Last active
August 1, 2019 12:51
-
-
Save Pebblo/205b500c0c33f7583cdc7f08c89800e9 to your computer and use it in GitHub Desktop.
Example of how to change the EE admin foot text to include details from other plugins. #EE #admin_general
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. | |
//Remove the EE espresso_admin_footer callback and add another which includes current content. | |
add_action('admin_init', 'tw_filter_admin_footer_text'); | |
function tw_filter_admin_footer_text() { | |
$admin = EE_Registry::instance()->load_core('EE_Admin'); | |
remove_filter('admin_footer_text', array($admin, 'espresso_admin_footer')); | |
add_filter('admin_footer_text', 'tw_ee_filter_powered_by_event_espresso'); | |
} | |
function tw_ee_filter_powered_by_event_espresso($content = '') | |
{ | |
$powered_by_event_espresso = \EEH_Template::powered_by_event_espresso('aln-cntr', '', array('utm_content' => 'admin_footer')); | |
return $content ? $powered_by_event_espresso . '<br/>' . $content : $powered_by_event_espresso; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment