WordPress.org

Ready to get started?Download WordPress

Forums

improper use of the home_url function (1 post)

  1. bbn
    Member
    Posted 1 year ago #

    Dear plugin authors,

    Please note that if you use the home_url function, it can be transformed by a filter that adds query arguments. So for instance, the following code can easily break:

    $url = home_url() . "?blabla=321732"

    A quick survey of plugins installed for a recent project show that many plugin authors - even very established ones - are making this mistake.

    Ben

Topic Closed

This topic has been closed to new replies.

About this Topic