• Hello all. I am building a plugin that allows users to favorite certain tags or categories, and then displays links to those tags or categories from the sidebar (or wherever). One of the issues that has arisen is how best to send information to my plugin when a user chooses to favorite or unfavorite a tag / category. Let’s say that the ‘favorite this’ button renders on any tag or category page. It then falls to my plugin to give the user a button or link to click to tell it to add that tag or category to their list of favorites. My question, what is the best way to do this? Can I use the settings_fields function outside of admin mode, and is this a good idea to do so? As I understand, it would allow the logged in user to make use of the nonce functionality, insuring that they could not follow malicious links. I wonder though if this would get in the way of any caching done by the server, or any if it would significantly increase load time. Finally, if using settings_fields is the best bet, should I then just create a separate form for each ‘unfavorite this tag / category’ button? Any help or ideas are appreciated.

    -Joe

  • The topic ‘Passing Variables in the Front End: Best Practices’ is closed to new replies.