apply_filters( 'lp__link_html_text,' $text, $value, $atts )
Allow filtering the link HTML text to render.
Plugin
Namespace
Launchpad
Parameters
string
$text
Link text
string
$value
Link value
string
$atts
Link attributes
Return
string
Filtered link text.
Example
Suppose you want to customize the text of a link based on its value. Here’s how you can achieve that using the lp__link_html_text filter:
// Add the filter hook for customizing the link HTML text
add_filter( 'lp__link_html_text', function( $text, $value, $atts ) {
// Customize the link text based on specific conditions or requirements
if ( $value === 'https://example.com' ) {
$text = 'Example Text';
}
return $text;
}, 10, 3 );
After applying this customization, the text of the link will be modified based on the specified conditions. In this example, if the link value is 'https://example.com', the text will be changed to 'Example Text'.