[wp-trac] [WordPress Trac] #7609: Use forward compatible $wpdb->has_cap() instead of $wpdb->one_off_function()

WordPress Trac wp-trac at lists.automattic.com
Tue Aug 26 23:48:14 GMT 2008


#7609: Use forward compatible $wpdb->has_cap() instead of
$wpdb->one_off_function()
----------------------+-----------------------------------------------------
 Reporter:  mdawaffe  |       Owner:  anonymous
     Type:  defect    |      Status:  new      
 Priority:  normal    |   Milestone:  2.7      
Component:  General   |     Version:  2.7      
 Severity:  normal    |    Keywords:           
----------------------+-----------------------------------------------------
 WP now has two "can the database do X?" functions in WPDB:
 $wpdb->supports_collation() and $wpdb->supports_subqueries().

 Attached adds a more generice $wpdb->has_cap( $cap ) that we can add to
 over time as needed.  Since the function returns false by default, it's
 forward compatible for plugins.

 Taken from HyperDB and BackPress.  If we want to call it something else
 ($wpdb->supports( $cap ) or something), we probably can.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/7609>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list