如何修复PHP致命错误:调用未定义的函数is_ssl()

I am getting:

"PHP Fatal error: Call to undefined function is_ssl()"

Because of this, I think I can't login in my admin page.

I tried to write a code for a plugin to redirect me when it is used the Server HTTP_host but i couldn't activate the plugin.

if ( is_ssl() ) {
if ( 0 === strpos($_SERVER['REQUEST_URI'], 'http') ) {
    wp_redirect( set_url_scheme( $_SERVER['REQUEST_URI'], 'https' ) );
    exit();
} else {
    wp_redirect( 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
    exit();
  } 
}

"Call to undefined function is_ssl()" ;

"Call to undefined function force_ssl_admin()"

is_ssl() is located in wp-includes/load.php. For versions of WordPress prior to 4.6.0, it was located in wp-includes/functions.php.

Check the integrity of these files