Created
May 28, 2014 15:57
-
-
Save ksemel/2c6702d69614e86c27f2 to your computer and use it in GitHub Desktop.
use get_current_screen() to narrow the scope of a function
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
function admin_footer(){ | |
$screen = get_current_screen(); | |
if ( isset( $screen->base ) && $screen->base == 'profile' ) { | |
echo "<script type='text/javascript'> | |
if( jQuery('#GA_enabled').is(':checked') === false ) { | |
ShowOrHideQRCode(); | |
} | |
</script>"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment