home_url хук-фильтр . WP 3.0.0
Filters the home URL.
Использование
add_filter( 'home_url', 'filter_function_name_8675', 10, 4 ); function filter_function_name_8675( $url, $path, $orig_scheme, $blog_id ){ // filter... return $url; }
- $url(строка)
- The complete home URL including scheme and path.
- $path(строка)
- Path relative to the home URL. Blank string if no path is specified.
- $orig_scheme(строка/null)
- Scheme to give the home URL context. Accepts 'http', 'https', 'relative', 'rest', or null.
- $blog_id(число/null)
- Site ID, or null for the current site.
Список изменений
С версии 3.0.0 | Введена. |
Где вызывается хук
home_url
wp-includes/link-template.php 3298
return apply_filters( 'home_url', $url, $path, $orig_scheme, $blog_id );