wc_is_external_resource( string $url )
See if a resource is remote.
Description Description
Parameters Parameters
- $url
-
(Required) URL to check.
Return Return
(bool)
Source Source
File: includes/wc-core-functions.php
function wc_is_external_resource( $url ) { $wp_base = str_replace( array( 'http://', 'https://' ), '//', get_home_url( null, '/', 'http' ) ); return strstr( $url, '://' ) && ! strstr( $url, $wp_base ); }
Changelog Changelog
Version | Description |
---|---|
3.2.0 | Introduced. |