Skip to content

Instantly share code, notes, and snippets.

@miya0001
Last active December 19, 2019 04:38
Show Gist options
  • Save miya0001/226b0e40100e7751310a to your computer and use it in GitHub Desktop.
Save miya0001/226b0e40100e7751310a to your computer and use it in GitHub Desktop.
WordPressで管理画面とログイン画面を判別
<?php
function is_login_page(){
if ( in_array( $GLOBALS['pagenow'], array( 'wp-login.php', 'wp-register.php' ) ) ) {
return true;
} else {
return false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment