Ticket #9073: post.php.diff
| File post.php.diff, 1.2 KB (added by sirzooro, 4 years ago) |
|---|
-
post.php
old new 1730 1730 // expected_slashed (everything!) 1731 1731 $data = compact( array( 'post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_content_filtered', 'post_title', 'post_excerpt', 'post_status', 'post_type', 'comment_status', 'ping_status', 'post_password', 'post_name', 'to_ping', 'pinged', 'post_modified', 'post_modified_gmt', 'post_parent', 'menu_order', 'guid' ) ); 1732 1732 $data = apply_filters('wp_insert_post_data', $data, $postarr); 1733 1734 // categories 1735 $post_category = apply_filters('wp_insert_post_category', $post_category); 1736 // make sure we set a valid category 1737 if ( empty($post_category) || 0 == count($post_category) || !is_array($post_category) ) { 1738 $post_category = array(get_option('default_category')); 1739 } 1740 // old-style tags_input 1741 if ( !empty($tags_input) ) 1742 $tags_input = apply_filters('wp_insert_post_tags', $tags_input); 1743 // new-style support for all tag-like taxonomies 1744 $tax_input = apply_filters('wp_insert_post_tax', empty($tax_input) ? array() : $tax_input); 1745 1733 1746 $data = stripslashes_deep( $data ); 1734 1747 $where = array( 'ID' => $post_ID ); 1735 1748
