public static function isViewingHTMLPage()
    {
        if (!is_admin()) {
            return false;
        }
        if (!array_key_exists('SCRIPT_NAME', $_SERVER)) {
            return false;
        }
        
        $whitelisted_script_names = array(
            'wp-admin/post-new.php',
            'wp-admin/post.php',
            'wp-admin/edit.php',
        );
        $script_name = strstr($_SERVER['SCRIPT_NAME'], 'wp-admin');
        if (!in_array($script_name, $whitelisted_script_names)) {
            return false;
        }

        return true;
    }
public static function isViewingHTMLPage()
    {
        if (!is_admin()) {
            return false;
        }
        if (!array_key_exists('SCRIPT_NAME', $_SERVER)) {
            return false;
        }
        
        $whitelisted_script_names = array(
            'wp-admin/post-new.php',
            'wp-admin/post.php',
            'wp-admin/edit.php',
        );
        $script_name = strstr($_SERVER['SCRIPT_NAME'], 'wp-admin');
        if (!in_array($script_name, $whitelisted_script_names)) {
            return false;
        }

        return true;
    }
public static function isViewingHTMLPage ( ) { if ( ! is_admin ( ) ) { return false ; } if ( ! array_key_exists ( 'SCRIPT_NAME' , $ _SERVER ) ) { return false ; } $ whitelisted_script_names = array ( 'wp-admin/post-new.php' , 'wp-admin/post.php' , 'wp-admin/edit.php' , ) ; $ script_name = strstr ( $ _SERVER [ 'SCRIPT_NAME' ] , 'wp-admin' ) ; if ( ! in_array ( $ script_name , $ whitelisted_script_names ) ) { return false ; } return true ; }
Is the user currently viewing a HTML page?
Things that are not HTML would be admin-ajax.php for instance
@return bool
Is the user currently viewing a HTML page? Things that are not HTML would be admin - ajax . php for instance