Changeset 5149 for trunk/wp-includes/category.php
- Timestamp:
- 03/31/2007 06:16:12 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/category.php
r5119 r5149 207 207 } 208 208 209 function get_category_by_slug( $slug ) { 210 global $wpdb; 211 $slug = sanitize_title( $slug ); 212 if ( empty( $slug ) ) 213 return false; 214 $category = $wpdb->get_var( "SELECT * FROM $wpdb->categories WHERE category_nicename = '$slug' " ); 215 return get_category( $category ); 216 } 217 209 218 // Get the ID of a category from its name 210 219 function get_cat_ID($cat_name='General') {
Note: See TracChangeset
for help on using the changeset viewer.