Changeset 40688 for branches/3.7/src
- Timestamp:
- 05/16/2017 08:30:47 AM (9 years ago)
- Location:
- branches/3.7
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.7
-
branches/3.7/src
- Property svn:mergeinfo changed
/trunk/src merged: 40677
- Property svn:mergeinfo changed
-
branches/3.7/src/wp-includes/class-wp-xmlrpc-server.php
r34157 r40688 1051 1051 */ 1052 1052 protected function _insert_post( $user, $content_struct ) { 1053 $defaults = array( 'post_status' => 'draft', 'post_type' => 'post', 'post_author' => 0, 1054 'post_password' => '', 'post_excerpt' => '', 'post_content' => '', 'post_title' => '' ); 1055 1056 $post_data = wp_parse_args( $content_struct, $defaults ); 1053 $defaults = array( 1054 'post_status' => 'draft', 1055 'post_type' => 'post', 1056 'post_author' => null, 1057 'post_password' => null, 1058 'post_excerpt' => null, 1059 'post_content' => null, 1060 'post_title' => null, 1061 'post_date' => null, 1062 'post_date_gmt' => null, 1063 'post_format' => null, 1064 'post_name' => null, 1065 'post_thumbnail' => null, 1066 'post_parent' => null, 1067 'ping_status' => null, 1068 'comment_status' => null, 1069 'custom_fields' => null, 1070 'terms_names' => null, 1071 'terms' => null, 1072 'sticky' => null, 1073 'enclosure' => null, 1074 'ID' => null, 1075 ); 1076 1077 $post_data = wp_parse_args( array_intersect_key( $content_struct, $defaults ), $defaults ); 1057 1078 1058 1079 $post_type = get_post_type_object( $post_data['post_type'] ); … … 1234 1255 $post_data['tax_input'] = $terms; 1235 1256 unset( $post_data['terms'], $post_data['terms_names'] ); 1236 } else {1237 // do not allow direct submission of 'tax_input', clients must use 'terms' and/or 'terms_names'1238 unset( $post_data['tax_input'], $post_data['post_category'], $post_data['tags_input'] );1239 1257 } 1240 1258
Note: See TracChangeset
for help on using the changeset viewer.