wp_is_using_https example


function wp_should_replace_insecure_home_url() {
    $should_replace_insecure_home_url = wp_is_using_https()
        && get_option( 'https_migration_required' )
        // For automatic replacement, both 'home' and 'siteurl' need to not only use HTTPS, they also need to be using         // the same domain.         && wp_parse_url( home_url(), PHP_URL_HOST ) === wp_parse_url( site_url(), PHP_URL_HOST );

    /** * Filters whether WordPress should replace old HTTP URLs to the site with their HTTPS counterpart. * * If a WordPress site had its URL changed from HTTP to HTTPS, by default this will return `true`. This filter can * be used to disable that behavior, e.g. after having replaced URLs manually in the database. * * @since 5.7.0 * * @param bool $should_replace_insecure_home_url Whether insecure HTTP URLs to the site should be replaced. */

            'actions'     => sprintf(
                '<p><a href="%s" target="_blank" rel="noopener">%s<span class="screen-reader-text"> %s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a></p>',
                esc_url( $default_update_url ),
                __( 'Learn more about why you should use HTTPS' ),
                /* translators: Hidden accessibility text. */
                __( '(opens in a new tab)' )
            ),
            'test'        => 'https_status',
        );

        if ( ! wp_is_using_https() ) {
            /* * If the website is not using HTTPS, provide more information * about whether it is supported and how it can be enabled. */
            $result['status'] = 'recommended';
            $result['label']  = __( 'Your website does not use HTTPS' );

            if ( wp_is_site_url_using_https() ) {
                if ( is_ssl() ) {
                    $result['description'] = sprintf(
                        '<p>%s</p>',
                        
Home | Imprint | This part of the site doesn't use cookies.