Changeset 14230 for trunk/wp-includes/post.php
- Timestamp:
- 04/25/2010 07:42:51 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r14219 r14230 2191 2191 $where = array( 'ID' => $post_ID ); 2192 2192 2193 if ( $update) {2193 if ( $update ) { 2194 2194 do_action( 'pre_post_update', $post_ID ); 2195 2195 if ( false === $wpdb->update( $wpdb->posts, $data, $where ) ) { … … 2230 2230 if ( isset( $tags_input ) ) 2231 2231 wp_set_post_tags( $post_ID, $tags_input ); 2232 // new-style support for all tag-like taxonomies 2233 if ( !empty($tax_input) ) { 2234 foreach ( $tax_input as $taxonomy => $tags ) { 2235 $taxonomy_obj = get_taxonomy($taxonomy); 2236 if ( current_user_can($taxonomy_obj->assign_cap) ) 2237 wp_set_post_terms( $post_ID, $tags, $taxonomy ); 2238 } 2232 // new-style support for all taxonomies 2233 $tax_names = get_object_taxonomies( get_post($post_ID) ); 2234 foreach ( (array)$tax_names as $taxonomy ) { 2235 if ( 'category' == $taxonomy ) // Handled seperately. 2236 continue; 2237 $taxonomy_obj = get_taxonomy($taxonomy); 2238 if ( !current_user_can($taxonomy_obj->assign_cap) ) 2239 continue; 2240 if ( !$taxonomy_obj->show_ui ) 2241 continue; 2242 2243 $tags = isset($tax_input[$taxonomy]) ? $tax_input[$taxonomy] : array(); 2244 wp_set_post_terms( $post_ID, $tags, $taxonomy ); 2239 2245 } 2240 2246 … … 2266 2272 wp_transition_post_status($data['post_status'], $previous_status, $post); 2267 2273 2268 if ( $update )2274 if ( $update ) 2269 2275 do_action('edit_post', $post_ID, $post); 2270 2276 … … 2321 2327 } 2322 2328 2323 if ( $postarr['post_type'] == 'attachment')2329 if ( $postarr['post_type'] == 'attachment' ) 2324 2330 return wp_insert_attachment($postarr); 2325 2331
Note: See TracChangeset
for help on using the changeset viewer.