Echo variables inside a function
Just started making inroads into coding my first plugin. I’ve got a widget that displays three tabs of post titles in a tabbed menu. The first tab currently displays the most commented posts written in the last 30 days. I’m using this filter:
$where .= " AND post_date > '" . date('Y-m-d', strtotime('-30 days')) . "'";
I’d like to make the 30 days a user configured variable but don’t know how to echo this variable within the where filter.
How can I make it work?
- The topic ‘Echo variables inside a function’ is closed to new replies.