Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Add Sticky support for Posts #349

Closed
kraftbj opened this Issue · 4 comments

4 participants

@kraftbj

No option to set a post as Sticky via the app.

@roundhill
Owner

Just a note that it looks like the API offers support for this with a 'sticky' boolean: http://codex.wordpress.org/XML-RPC_MetaWeblog_API. Should be fairly simple to add.

@soulseekah

I found out that the documentation is wrong, _prepare_post is not called in the mw_getRecentPosts, thus sticky is not available in the response at all (edited the Codex entry to reflect this).

https://github.com/WordPress/WordPress/blob/master/wp-includes/class-wp-xmlrpc-server.php#L4745

This can only be accomplished if the call is switched to wp_getPosts instead:

https://github.com/WordPress/WordPress/blob/master/wp-includes/class-wp-xmlrpc-server.php#L1413

Or waiting for a fix in core (http://core.trac.wordpress.org/ticket/26679), which may take years to roll out. Other than this blocker, I have a working patch that's pretty much done if the switch to wp_getPosts is viable (several variable renames need to be done for this, mt_allow_comments vs comment_status for example). Thoughts?

@soulseekah

See: soulseekah@bf9d036
This works with a patched XML-RPC server, but gives an overview of the scope of the patch.
Of course, moving to the wp_ API for everything is best at this point, which probably needs a separate issue.

@bummytime
Owner

Closing issue and migrating to new repo.

@bummytime bummytime closed this
@bummytime bummytime referenced this issue in wordpress-mobile/WordPress-Editor-Android
Open

Add Sticky support for Posts #88

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.