Created
June 11, 2011 20:54
-
-
Save alexkingorg/1020947 to your computer and use it in GitHub Desktop.
Check for standard WP admin page before attaching action.
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 | |
/* | |
Plugin Name: Standard WP Admin Page Check | |
Description: Example code. | |
Version: 1.0 | |
Author: Alex King | |
Author URI: http://alexking.org | |
*/ | |
function ak_wp_admin_standard_page_test() { | |
?> | |
<script type="text/javascript"> | |
alert('This is a standard WP admin page.'); | |
</script> | |
<?php | |
} | |
if ( !defined( 'IFRAME_REQUEST' ) ) { | |
add_action( 'admin_head', 'ak_wp_admin_standard_page_test' ); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment