WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 8 months ago

#33425 new defect (bug)

XML-RPC missing options on wp.getOptions

Reported by: SergioEstevao Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.3
Component: XML-RPC Keywords: reporter-feedback needs-patch
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 2 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 2 years ago.
Descriptions added to new fields
class-wp-xmlrpc-server.diff (4.2 KB) - added by tonyrankin 2 years ago.
Actual diff file :p

Download all attachments as: .zip

Change History (11)

#1 @wonderboymusic
2 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
2 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 2 years ago by SergioEstevao (previous) (diff)

@tonyrankin
2 years ago

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

#3 @tonyrankin
2 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 2 years ago by tonyrankin (previous) (diff)

@tonyrankin
2 years ago

Descriptions added to new fields

@tonyrankin
2 years ago

Actual diff file :p

#4 @tonyrankin
2 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
2 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
2 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
8 months 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
8 months 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).

Note: See TracTickets for help on using tickets.