add_filter - How to pass two variables (1 post)

  1. sccr410
    Posted 5 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.