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'.

Related

Allow filter for specific admin pages.

Allow filter for specific admin pages arguments.

Allow filter for all admin sub views arguments.

Allow filter for admin views arguments of specific admin page and view.

Allow filter for admin sub views arguments of specific admin page, view, and sub view.

Allow filter for admin sub views arguments of specific admin page.

Allow filter for specific admin sub view arguments.

Allow filter for admin sub view arguments of specific admin view.

Allow filter for admin sub views param.

Allow filter for admin sub views param of specific admin page.

Allow filter for admin sub views param of specific admin page and view.

Allow filter for admin sub views param of specific admin page view.

Allow filter for all admin toolbar arguments.

Allow filter for specific admin toolbar arguments.

Allow filter for all admin toolbar arguments.

Allow filter for specific admin toolbar arguments.

Allow filter for all admin views arguments.

Allow filter for admin views arguments of specific admin page and view.

Allow filter for admin views arguments of specific admin page.

Allow filter for specific admin view arguments.

Allow filter for all admin views param.

Allow filter for admin views param of specific admin page.

Allow filtering the button HTML text to render.

Allow filter for customizing the HTML items for contact details.

Allow filter for all field group arguments.

Allow filter for specific field group arguments.

Allow field value filter.

Allow filtering of template parts to be rendered on a page.

Allow filtering of template parts to be rendered on a page for a specific template.

Allow filtering of template parts to be rendered on a page for a specific template and type.

Allow filter to customize the option of submit button HTML.

Allow filter for the HTML structure of price.

Allow filter for the price HTML arguments.

Allow filter for customizing the HTML items for social media links.