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