From 890b809bb995191f33d7d3cc4547a37fbe67d6a5 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Sat, 15 Mar 2014 05:04:54 +0000 Subject: [PATCH] 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 --- src/wp-includes/class-wp-xmlrpc-server.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/class-wp-xmlrpc-server.php b/src/wp-includes/class-wp-xmlrpc-server.php index 6399491dfc..17657023f1 100644 --- a/src/wp-includes/class-wp-xmlrpc-server.php +++ b/src/wp-includes/class-wp-xmlrpc-server.php @@ -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;