[wp-hackers] idea: no SQL in themes

David House dmhouse at gmail.com
Wed Nov 16 16:29:05 GMT 2005


On 16/11/05, Ryan Boren <ryan at boren.nu> wrote:
> Indeed.  Themes shouldn't use $wpdb directly.  We need to provide API
> for them to use. Taking comments-popup.php as an example:

http://trac.wordpress.org/ticket/1892

That does the two examples you picked out in comments-popup.php, and
also replaces $wpdb->num_queries with get_num_queries() in footer.php
for completeness.

--
-David House, dmhouse at gmail.com, http://xmouse.ithium.net


More information about the wp-hackers mailing list