Revert [23359]. The post_author and comment_count post object fields will remain numeric strings for back compat. see #22324.

git-svn-id: http://core.svn.wordpress.org/trunk@23531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2013-02-28 19:40:26 +00:00
parent 73ff644661
commit 5cd77fdb99
2 changed files with 11 additions and 11 deletions

View File

@ -624,7 +624,7 @@ class wp_xmlrpc_server extends IXR_Server {
'post_status' => $post['post_status'],
'post_type' => $post['post_type'],
'post_name' => $post['post_name'],
'post_author' => (string) $post['post_author'],
'post_author' => $post['post_author'],
'post_password' => $post['post_password'],
'post_excerpt' => $post['post_excerpt'],
'post_content' => $post['post_content'],
@ -806,7 +806,7 @@ class wp_xmlrpc_server extends IXR_Server {
$_page = array(
'dateCreated' => $page_date,
'userid' => (string) $page->post_author,
'userid' => $page->post_author,
'page_id' => $page->ID,
'page_status' => $page->post_status,
'description' => $full_page['main'],
@ -3647,10 +3647,10 @@ class wp_xmlrpc_server extends IXR_Server {
$content .= $post_data['post_content'];
$struct = array(
'userid' => (string) $post_data['post_author'],
'userid' => $post_data['post_author'],
'dateCreated' => $this->_convert_date( $post_data['post_date'] ),
'content' => $content,
'postid' => (string) $post_data['ID']
'postid' => (string) $post_data['ID']
);
return $struct;
@ -3698,10 +3698,10 @@ class wp_xmlrpc_server extends IXR_Server {
$content .= $entry['post_content'];
$struct[] = array(
'userid' => (string) $entry['post_author'],
'userid' => $entry['post_author'],
'dateCreated' => $post_date,
'content' => $content,
'postid' => (string) $entry['ID'],
'content' => $content,
'postid' => (string) $entry['ID'],
);
}
@ -4570,7 +4570,7 @@ class wp_xmlrpc_server extends IXR_Server {
$resp = array(
'dateCreated' => $post_date,
'userid' => (string) $postdata['post_author'],
'userid' => $postdata['post_author'],
'postid' => $postdata['ID'],
'description' => $post['main'],
'title' => $postdata['post_title'],
@ -4681,7 +4681,7 @@ class wp_xmlrpc_server extends IXR_Server {
$struct[] = array(
'dateCreated' => $post_date,
'userid' => (string) $entry['post_author'],
'userid' => $entry['post_author'],
'postid' => (string) $entry['ID'],
'description' => $post['main'],
'title' => $entry['post_title'],
@ -4896,7 +4896,7 @@ class wp_xmlrpc_server extends IXR_Server {
$struct[] = array(
'dateCreated' => $post_date,
'userid' => (string) $entry['post_author'],
'userid' => $entry['post_author'],
'postid' => (string) $entry['ID'],
'title' => $entry['post_title'],
'post_status' => $entry['post_status'],

View File

@ -1976,7 +1976,7 @@ function sanitize_post($post, $context = 'display') {
* @return mixed Sanitized value.
*/
function sanitize_post_field($field, $value, $post_id, $context) {
$int_fields = array('ID', 'post_parent', 'menu_order', 'post_author', 'comment_count');
$int_fields = array('ID', 'post_parent', 'menu_order');
if ( in_array($field, $int_fields) )
$value = (int) $value;