XML-RPC: Include 'sticky' in the struct returned from metaWeblog.getRecentPosts.

Using wp.getPosts is preferred and non-WP XML-RPC APIs are no longer actively maintained. This is simply for parity with existing MW methods.

props soulseekah.
fixes #26679.


git-svn-id: https://develop.svn.wordpress.org/trunk@27553 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2014-03-15 05:04:54 +00:00
parent 0ed014743d
commit 890b809bb9
1 changed files with 2 additions and 1 deletions

View File

@ -4846,7 +4846,8 @@ class wp_xmlrpc_server extends IXR_Server {
'custom_fields' => $this->get_custom_fields($entry['ID']),
'wp_post_format' => $post_format,
'date_modified' => $post_modified,
'date_modified_gmt' => $post_modified_gmt
'date_modified_gmt' => $post_modified_gmt,
'sticky' => ( $entry['post_type'] === 'post' && is_sticky( $entry['ID'] ) ),
);
$entry_index = count( $struct ) - 1;