Changeset 5085 for branches/2.1/wp-includes/post.php
- Timestamp:
- 03/22/2007 11:02:32 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.1/wp-includes/post.php
r5083 r5085 770 770 function wp_set_post_categories($post_ID = 0, $post_categories = array()) { 771 771 global $wpdb; 772 773 $post_ID = (int) $post_ID; 772 774 // If $post_categories isn't already an array, make it one: 773 775 if (!is_array($post_categories) || 0 == count($post_categories) || empty($post_categories)) … … 780 782 SELECT category_id 781 783 FROM $wpdb->post2cat 782 WHERE post_id = $post_ID");784 WHERE post_id = '$post_ID'"); 783 785 784 786 if (!$old_categories) { … … 795 797 $wpdb->query(" 796 798 DELETE FROM $wpdb->post2cat 797 WHERE category_id = $del798 AND post_id = $post_ID799 WHERE category_id = '$del' 800 AND post_id = '$post_ID' 799 801 "); 800 802 }
Note: See TracChangeset
for help on using the changeset viewer.