wpcf7_link()
Builds an HTML anchor element.
Хуков нет.
Возвращает
Строку. Formatted anchor element.
Использование
wpcf7_link( $url, $anchor_text, $atts );
- $url(строка) (обязательный)
- Link URL.
- $anchor_text(строка) (обязательный)
- Anchor label text.
- $atts(строка|массив)
- HTML attributes.
По умолчанию:''
Код wpcf7_link() wpcf7 link CF7 6.1.5
function wpcf7_link( $url, $anchor_text, $atts = '' ) {
$atts = wp_parse_args( $atts, array(
'id' => null,
'class' => null,
) );
$atts = array_merge( $atts, array(
'href' => esc_url( $url ),
) );
return sprintf(
'<a %1$s>%2$s</a>',
wpcf7_format_atts( $atts ),
esc_html( $anchor_text )
);
}