site_url

site_url

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('site_url') is found 2 times:

  • /wp-includes/https-detection.php line 58
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
         * filter because `site_url()` will adjust the scheme based on what the
         * current request is using.
         */
        /** This filter is documented in wp-includes/link-template.php */
        $site_url = apply_filters( 'site_url', get_option( 'siteurl' ), '', null, null );
     
        return 'https' === wp_parse_url( $site_url, PHP_URL_SCHEME );
    }
     
    /**
     * Checks whether HTTPS is supported for the server and domain.
  • /wp-includes/link-template.php line 3552
    3548
    3549
    3550
    3551
    3552
    3553
    3554
    3555
    3556
    3557
    3558
         * @param string|null $scheme  Scheme to give the site URL context. Accepts 'http', 'https', 'login',
         *                             'login_post', 'admin', 'relative' or null.
         * @param int|null    $blog_id Site ID, or null for the current site.
         */
        return apply_filters( 'site_url', $url, $path, $scheme, $blog_id );
    }
     
    /**
     * Retrieves the URL to the admin area for the current site.
     *
     * @since 2.6.0

See this hook used in plugins: