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:
parent
73ff644661
commit
5cd77fdb99
|
@ -624,7 +624,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||||
'post_status' => $post['post_status'],
|
'post_status' => $post['post_status'],
|
||||||
'post_type' => $post['post_type'],
|
'post_type' => $post['post_type'],
|
||||||
'post_name' => $post['post_name'],
|
'post_name' => $post['post_name'],
|
||||||
'post_author' => (string) $post['post_author'],
|
'post_author' => $post['post_author'],
|
||||||
'post_password' => $post['post_password'],
|
'post_password' => $post['post_password'],
|
||||||
'post_excerpt' => $post['post_excerpt'],
|
'post_excerpt' => $post['post_excerpt'],
|
||||||
'post_content' => $post['post_content'],
|
'post_content' => $post['post_content'],
|
||||||
|
@ -806,7 +806,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||||
|
|
||||||
$_page = array(
|
$_page = array(
|
||||||
'dateCreated' => $page_date,
|
'dateCreated' => $page_date,
|
||||||
'userid' => (string) $page->post_author,
|
'userid' => $page->post_author,
|
||||||
'page_id' => $page->ID,
|
'page_id' => $page->ID,
|
||||||
'page_status' => $page->post_status,
|
'page_status' => $page->post_status,
|
||||||
'description' => $full_page['main'],
|
'description' => $full_page['main'],
|
||||||
|
@ -3647,7 +3647,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||||
$content .= $post_data['post_content'];
|
$content .= $post_data['post_content'];
|
||||||
|
|
||||||
$struct = array(
|
$struct = array(
|
||||||
'userid' => (string) $post_data['post_author'],
|
'userid' => $post_data['post_author'],
|
||||||
'dateCreated' => $this->_convert_date( $post_data['post_date'] ),
|
'dateCreated' => $this->_convert_date( $post_data['post_date'] ),
|
||||||
'content' => $content,
|
'content' => $content,
|
||||||
'postid' => (string) $post_data['ID']
|
'postid' => (string) $post_data['ID']
|
||||||
|
@ -3698,7 +3698,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||||
$content .= $entry['post_content'];
|
$content .= $entry['post_content'];
|
||||||
|
|
||||||
$struct[] = array(
|
$struct[] = array(
|
||||||
'userid' => (string) $entry['post_author'],
|
'userid' => $entry['post_author'],
|
||||||
'dateCreated' => $post_date,
|
'dateCreated' => $post_date,
|
||||||
'content' => $content,
|
'content' => $content,
|
||||||
'postid' => (string) $entry['ID'],
|
'postid' => (string) $entry['ID'],
|
||||||
|
@ -4570,7 +4570,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||||
|
|
||||||
$resp = array(
|
$resp = array(
|
||||||
'dateCreated' => $post_date,
|
'dateCreated' => $post_date,
|
||||||
'userid' => (string) $postdata['post_author'],
|
'userid' => $postdata['post_author'],
|
||||||
'postid' => $postdata['ID'],
|
'postid' => $postdata['ID'],
|
||||||
'description' => $post['main'],
|
'description' => $post['main'],
|
||||||
'title' => $postdata['post_title'],
|
'title' => $postdata['post_title'],
|
||||||
|
@ -4681,7 +4681,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||||
|
|
||||||
$struct[] = array(
|
$struct[] = array(
|
||||||
'dateCreated' => $post_date,
|
'dateCreated' => $post_date,
|
||||||
'userid' => (string) $entry['post_author'],
|
'userid' => $entry['post_author'],
|
||||||
'postid' => (string) $entry['ID'],
|
'postid' => (string) $entry['ID'],
|
||||||
'description' => $post['main'],
|
'description' => $post['main'],
|
||||||
'title' => $entry['post_title'],
|
'title' => $entry['post_title'],
|
||||||
|
@ -4896,7 +4896,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||||
|
|
||||||
$struct[] = array(
|
$struct[] = array(
|
||||||
'dateCreated' => $post_date,
|
'dateCreated' => $post_date,
|
||||||
'userid' => (string) $entry['post_author'],
|
'userid' => $entry['post_author'],
|
||||||
'postid' => (string) $entry['ID'],
|
'postid' => (string) $entry['ID'],
|
||||||
'title' => $entry['post_title'],
|
'title' => $entry['post_title'],
|
||||||
'post_status' => $entry['post_status'],
|
'post_status' => $entry['post_status'],
|
||||||
|
|
|
@ -1976,7 +1976,7 @@ function sanitize_post($post, $context = 'display') {
|
||||||
* @return mixed Sanitized value.
|
* @return mixed Sanitized value.
|
||||||
*/
|
*/
|
||||||
function sanitize_post_field($field, $value, $post_id, $context) {
|
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) )
|
if ( in_array($field, $int_fields) )
|
||||||
$value = (int) $value;
|
$value = (int) $value;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue