WP_Styles::_css_href()
Generates an enqueued style's fully-qualified URL.
Метод класса: WP_Styles{}
Хуки из метода
Возвращает
Строку
. Style's fully-qualified URL.
Использование
global $wp_styles; $wp_styles->_css_href( $src, $ver, $handle );
- $src(строка) (обязательный)
- The source of the enqueued style.
- $ver(строка) (обязательный)
- The version of the enqueued style.
- $handle(строка) (обязательный)
- The style's registered handle.
Список изменений
С версии 2.6.0 | Введена. |
Код WP_Styles::_css_href() WP Styles:: css href WP 6.4.1
public function _css_href( $src, $ver, $handle ) { if ( ! is_bool( $src ) && ! preg_match( '|^(https?:)?//|', $src ) && ! ( $this->content_url && str_starts_with( $src, $this->content_url ) ) ) { $src = $this->base_url . $src; } if ( ! empty( $ver ) ) { $src = add_query_arg( 'ver', $ver, $src ); } /** * Filters an enqueued style's fully-qualified URL. * * @since 2.6.0 * * @param string $src The source URL of the enqueued style. * @param string $handle The style's registered handle. */ $src = apply_filters( 'style_loader_src', $src, $handle ); return esc_url( $src ); }