Support » Plugins » add_filter – How to pass two variables

  • Everything I have searched online says “It’s easy to pass two variables to add_filter” yet I am completely baffled by this.

    add_filter( "the_content", "my_function", 10, 2 )
    function my_function($content, $link) {

    This says that there are two variables being passed to my_function. However, how do you define what those two variables are?!

    I am trying to write a function that automatically adds a link at the end of the content for every post.

  • The topic ‘add_filter – How to pass two variables’ is closed to new replies.