[wp-hackers] Creating objects within a plug-in

Williams Phillip phil.m.williams at gmail.com
Fri Jan 11 15:31:03 GMT 2008


I am developing a plug-in that will allow archive links and pages to  
be easily filtered to exclude or include specific categories. It  
consists of a filter class that encapsulates the functionality of  
wp_get_archives() with the additional subqueries to limit the  
returned posts to the specified categories.

Currently, I instantiate various archive filter objects at the  
beginning of the functions.php file. I can then use them on any page  
by declaring the objects as global. I would like to be able to go the  
next step and build an admin screen that will allow a user to  
configure any number of archive filters for use on within templates.  
I am planning on either using the options route or creating my own  
table structure to manage the filter settings.

My question is this. How would a filter object be instantiated that  
could then be used within another PHP file?

Phil
phil.m.williams at gmail.com





More information about the wp-hackers mailing list