Свойство | Type | Description | |
---|---|---|---|
$current_host | Holds current HTTP host. | ||
$url_slashit | Whether to slash the url or not. Used when query vars are in url. |
Méthode | Description | |
---|---|---|
add_url_host ( string $path = '' ) : string | Create full valid URL with parsed host. | |
add_url_subdomain ( string $url = '' ) : string | Adds subdomain to input URL. | |
build_singular_relative_url ( integer $post_id = null, array $args = [] ) : relative | Generates relative URL for the Homepage and Singular Posts. | |
generate_url_path ( array $args = [] ) : string | Generate URL from arguments. | |
get_current_subdomain ( null | string $set = null, boolean $unset = false ) : string | boolean | Fetches current subdomain set by $this->set_current_subdomain(); | |
get_home_host ( ) : string | Fetches home URL host. Like "wordpress.org". | |
get_home_path ( ) : string | Fetches home URL subdirectory path. Like "wordpress.org/plugins/". | |
get_paged_post_url ( integer $i, integer $post_id, string $pos = 'prev' ) : string | Returns the special URL of a paged post. | |
get_paged_url ( string $prev_next = 'next', integer $post_id ) : string | null | Generates Previous and Next links. | |
get_relative_qtranslate_url ( string $path = '', integer $post_id = '' ) | Generates qtranslate URL. | |
get_relative_term_url ( object $term = null, array | boolean $args = [] ) : Relative | Generates relative URL for current term. | |
get_relative_wmpl_url ( string $path = '', integer $post_id = '' ) : relative | Generate relative WPML url. | |
get_shortlink ( integer $post_id ) : string | null | Generates shortlink URL. | |
get_translation_path ( string $path = '', integer $post_id = null, boolean $external = false ) : relative | Generates relative URL for current post_ID for translation plugins. | |
make_fully_qualified_url ( string $url ) : string | Makes a fully qualified URL from input. Always uses http to fix. | |
parse_url_args ( array $args = [], array $defaults = [], boolean $get_defaults = false ) : array | Parse and sanitize url args. | |
permalink_structure ( ) : string | Cached WordPress permalink structure settings. | |
reparse_url_args ( array $args = [] ) : array | Reparse URL args. | |
set_current_subdomain ( string $subdomain = '' ) : string | Sets current working subdomain. | |
set_url_scheme ( string $url, string $scheme = null, boolean $use_filter = true ) : string | Sets URL scheme for input URL. | |
set_url_scheme_filter ( string $url, $current_scheme ) | Set URL scheme based on filter. | |
the_url ( string $url = '', array $args = [] ) : string | Creates canonical URL. | |
the_url_donncha_domainmap ( string $path, boolean $get_scheme = false ) : string | array | void | Try to get an canonical URL when Donncha Domain Mapping is active. | |
the_url_wpmudev_domainmap ( string $path, boolean $get_scheme = false ) : string | array | void | Creates a full canonical URL when WPMUdev Domain Mapping is active from path. | |
unset_current_subdomain ( ) | Unsets current working subdomain. |
Méthode | Description | |
---|---|---|
__construct ( ) | Constructor, load parent constructor and set up variables. | |
maybe_get_paged ( integer $paged, boolean $singular = false, boolean $plural = true ) : integer | boolean | Add $paged if Paginated and allowed through arguments. |
protected __construct ( ) |
public add_url_host ( string $path = '' ) : string | ||
$path | string | Current path. |
Résultat | string | Full valid URL with http host. |
public add_url_subdomain ( string $url = '' ) : string | ||
$url | string | The current URL without subdomain. |
Résultat | string | $url Fully qualified URL with possible subdomain. |
public build_singular_relative_url ( integer $post_id = null, array $args = [] ) : relative | ||
$post_id | integer | The ID. |
$args | array | The URL arguments. |
Résultat | relative | Post or Page url. |
public generate_url_path ( array $args = [] ) : string | ||
$args | array | the URL args. |
Résultat | string | $path |
public get_home_host ( ) : string | ||
Résultat | string | The home URL host. |
public get_home_path ( ) : string | ||
Résultat | string | The home URL path. |
public get_relative_qtranslate_url ( string $path = '', integer $post_id = '' ) | ||
$path | string | The current path. |
$post_id | integer | The Post ID. Unused until qTranslate provides external URL forgery. |
public get_relative_term_url ( object $term = null, array | boolean $args = [] ) : Relative | ||
$term | object | The term object. |
$args | array | boolean | { 'external' : Whether to fetch the WP Request or get the permalink by Post Object. 'paged' : Whether to add pagination for all types. 'paged_plural' : Whether to add pagination for the second or later page. } |
Résultat | Relative | term or taxonomy URL. |
public get_relative_wmpl_url ( string $path = '', integer $post_id = '' ) : relative | ||
$path | string | The current path. |
$post_id | integer | The Post ID. |
Résultat | relative | path for WPML urls. |
public make_fully_qualified_url ( string $url ) : string | ||
$url | string | Required the current maybe not fully qualified URL. |
Résultat | string | $url |
protected maybe_get_paged ( integer $paged, boolean $singular = false, boolean $plural = true ) : integer | boolean | ||
$paged | integer | |
$singular | boolean | Whether to allow plural and singular. |
$plural | boolean | Whether to allow plural regardless. |
Résultat | integer | boolean | $paged. False if not allowed. Int if allowed. |
public permalink_structure ( ) : string | ||
Résultat | string | permalink structure. |
public reparse_url_args ( array $args = [] ) : array | ||
$args | array | required The passed arguments. |
Résultat | array | $args parsed args. |
public set_current_subdomain ( string $subdomain = '' ) : string | ||
$subdomain | string | The current subdomain. |
Résultat | string | The set subdomain. |
public set_url_scheme ( string $url, string $scheme = null, boolean $use_filter = true ) : string | ||
$url | string | Absolute url that includes a scheme. |
$scheme | string | optional. Scheme to give $url. Currently 'http', 'https', 'login', 'login_post', 'admin', or 'relative'. |
$use_filter | boolean | Whether to parse filters. |
Résultat | string | url with chosen scheme. |
public set_url_scheme_filter ( string $url, $current_scheme ) | ||
$url | string | The url with scheme. |
public the_url ( string $url = '', array $args = [] ) : string | ||
$url | string | the url |
$args | array | : accepted args : { @param bool $paged Return current page URL without pagination if false @param bool $paged_plural Whether to add pagination for the second or later page. @param bool $from_option Get the canonical uri option @param object $post The Post Object. @param bool $external Whether to fetch the current WP Request or get the permalink by Post Object. @param bool $is_term Fetch url for term. @param object $term The term object. @param bool $home Fetch home URL. @param bool $forceslash Fetch home URL and slash it, always. @param int $id The Page or Term ID. } |
Résultat | string | Escape url. |
public unset_current_subdomain ( ) |