0

Confused on why this isn't working...can anyone point out my mistake?

Here is the filterable content:

'next_text' => apply_filters('atbdp_pagination_next_text', directorist_icon( 'fas fa-chevron-right', false ))

Here is what I have for my filter but I'm getting no change in the output on the page.

add_filter( 'atbdp_pagination_next_text', 'directorist_next_label');
function directorist_next_label(){
  return 'next';
}

1 Answer 1

0
apply_filters( $tag, $value, $param, $otherparam )

This is how the apply_filters function work. By default, the value is printed if no function is hooked with the filter.

It's not clear what directorist_icon( 'fas fa-chevron-right', false ) prints here. But if it is showing "next" string at the output, the filter is working right.

If you need to print, then echo apply_filters will help.

If this description doesn't fit your necessity, you can explain what you want to achieve, I hope I can help.

1
  • Thanks for the help. directorist_icon( 'fas fa-chevron-right' false) shows a font awesome icon (chevon right). I want the text to say next instead of that chevron icon. Right now I'm seeing the icon. Commented Oct 22, 2022 at 22:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.