Make WordPress Core

Opened 10 years ago

Last modified 3 months ago

#33425 new defect (bug)

XML-RPC missing options on wp.getOptions

Reported by: sergioestevao's profile SergioEstevao Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.3
Component: XML-RPC Keywords: reporter-feedback needs-patch close
Focuses: Cc:

Description

Why the list of options available here

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

doesn’t match this https://codex.wordpress.org/Option_Reference

For example default_category or blog_public fields are not available on XML-RPC.

Attachments (3)

class-wp-xmlrpc-server.php (193.0 KB) - added by tonyrankin 10 years ago.
Adding addition fields so that Site Settings can be queried via wp.getOptions
class-wp-xmlrpc-server.2.php (194.1 KB) - added by tonyrankin 10 years ago.
Descriptions added to new fields
class-wp-xmlrpc-server.diff (4.2 KB) - added by tonyrankin 10 years ago.
Actual diff file :p

Download all attachments as: .zip

Change History (12)

#1 @wonderboymusic
10 years ago

  • Keywords reporter-feedback needs-patch added

I don't think there's a great reason for the disparity, what do you propose we add?

#2 @SergioEstevao
10 years ago

I think it will good to add all the ones that that are on the documentation of XML-RPC as available.

Last edited 10 years ago by SergioEstevao (previous) (diff)

@tonyrankin
10 years ago

Adding addition fields so that Site Settings can be queried via wp.getOptions

#3 @tonyrankin
10 years ago

The attached changes have been/are being tested, so far so good. I'll update here if I notice anything.

Edit: Realized I didn't add descriptions to most of the fields. I'll upload another attachment.

Last edited 10 years ago by tonyrankin (previous) (diff)

@tonyrankin
10 years ago

Descriptions added to new fields

@tonyrankin
10 years ago

Actual diff file :p

#4 @tonyrankin
10 years ago

Ping @wonderboymusic

There's a feature being merged into WordPress for Android that needs to toggle based on the version that this ticket will be launched in. Do you have info on the expected release date and version?

#5 @dd32
10 years ago

@tonyrankin 4.5 at the earliest, however a good reason for exposing the options would be appreciated. I don't see most of them being useful for a content publishing client (which is what the XML-RPC is for mostly)

It looks like this is related to https://github.com/wordpress-mobile/WordPress-Android/issues/3434

#6 @tonyrankin
10 years ago

The mobile apps try to support WP.org when possible, we're working on exposing site settings to our users. There's a way to change these settings for WP.com users via the REST-API but our self-hosted users will have no way to modify (or even read) their settings.

#7 @daniloercoli
9 years ago

Use case: default_post_format - used to pre-select post_format in the client editor.
Ref: https://github.com/wordpress-mobile/WordPress-Android/issues/4580

#8 @tonyrankin
9 years ago

@dd32: Would a smaller patch that just exposes the default post format be okay here? That would help us resolve this user's issue (the one @daniloercoli linked).

#9 @callumbw95
3 months ago

  • Keywords close added

Hi All,

I have just taken a look into this, and the original request to expose more site settings via wp.getOptions was entirely valid at the time this ticket was opened, especially for improving the capabilities of mobile and other client applications.

However, since 2015 the WordPress landscape has evolved significantly with the introduction and integration of the WordPress REST API. The REST API is now the modern, preferred, and fully supported method for this type of remote interaction. The specific functionality requested here—accessing and managing site settings—is now best handled by the /wp/v2/settings REST API endpoint, which is more robust, secure, and extensible.

The XML-RPC API is now considered a legacy component. While it remains in core for backward compatibility, it is in a maintenance-only state, and is no longer receiving new features to it.

For these reasons, this enhancement is no longer aligned with the project's direction. I am going to mark this ticket with the close tag so we can get a second opinion before we close this ticket.

Note: See TracTickets for help on using tickets.