메소드 | 설명 | |
---|---|---|
file_system_to_url ( string $fs ) | ||
get_current_url ( ) : string | ||
get_full_path ( string $src ) : string | ||
get_host ( ) : string | Some setups like HTTP_HOST, some like SERVER_NAME, it's complicated | |
get_params ( integer $i = false ) : array | string | Returns the url parameters, for example for url http://example.org/blog/post/news/2014/whatever this will return array('blog', 'post', 'news', '2014', 'whatever'); OR if sent an integer like: TimberUrlHelper::get_params(2); this will return 'news'; | |
get_path_base ( ) : string | ||
get_rel_path ( string $src ) : string | ||
get_rel_url ( string $url, boolean $force = false ) : string | ||
get_scheme ( ) : string | Get url scheme | |
is_absolute ( string $path ) : boolean | This will evaluate wheter a URL is at an aboslute location (like http://example.org/whatever) | |
is_external ( string $url ) : boolean | ||
is_external_content ( string $url ) : boolean | This function is slightly different from the one below in the case of: an image hosted on the same domain BUT on a different site than the Wordpress install will be reported as external content. | |
is_local ( string $url ) : boolean | ||
is_url ( string $url ) : boolean | ||
prepend_to_url ( string $url, string $path ) : string | ||
preslashit ( string $path ) : string | ||
remove_double_slashes ( string $url ) : string | ||
remove_trailing_slash ( string $link ) : string | Pass links through untrailingslashit unless they are a single / | |
url_to_file_system ( string $url ) : string | Takes a url and figures out its place based in the file system based on path NOTE: Not fool-proof, makes a lot of assumptions about the file path matching the URL path |
메소드 | 설명 | |
---|---|---|
is_internal_content ( string $url ) |
public static get_full_path ( string $src ) : string | ||
$src | string | |
리턴 | string |
public static is_absolute ( string $path ) : boolean | ||
$path | string | |
리턴 | boolean | true if $path is an absolute url, false if relative. |
public static is_external ( string $url ) : boolean | ||
$url | string | |
리턴 | boolean | true if $path is an external url, false if relative or local. true if it's a subdomain (http://cdn.example.org = true) |
public static is_external_content ( string $url ) : boolean | ||
$url | string | a URL to evaluate against |
리턴 | boolean | if $url points to an external location returns true |
public static remove_double_slashes ( string $url ) : string | ||
$url | string | |
리턴 | string |
public static remove_trailing_slash ( string $link ) : string | ||
$link | string | |
리턴 | string |
public static url_to_file_system ( string $url ) : string | ||
$url | string | |
리턴 | string |