Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Check for standard WP admin page before attaching action.
<?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
You can’t perform that action at this time.