Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#21866 closed task (blessed) (fixed)

Remove AtomPub from core

Reported by: nacin's profile nacin Owned by:
Milestone: 3.5 Priority: normal
Severity: normal Version: 2.3
Component: AtomPub Keywords: has-patch dev-feedback needs-testing
Focuses: Cc:


AtomPub never received any traction, inside WordPress or out. It's very outdated (written from before there were pages, and when attachments were a post status).

It's hardly used. A stat I heard from is that 200-300 posts per day are published using it, across tens of millions of sites, compared to hundreds of thousands for XML-RPC.

And, unlike XML-RPC, it receives zero love from developers (very few bug reports or enhancements ever filed, and I can count on one hand the number from the last two years), which leads to unfortunate patches when it falls out of date with the rest of core.

Who wants in? Removal process:

Delete wp-app.php and class-wp-atom-server.php. Keep atomlib.php.

If necessary for backwards compatibility, we will stub log_app() somewhere, as well as stub wp_atom_server with a __call method to avoid fatal errors. There must be existence checks here so a plugin can load them back.

Catch wp-app.php requests through WP_Rewrite and deliver a 403 message (as if it were disabled from the admin).

Remove wp-app.php from xmlrpc.php?rsd, and add a hook in there so a plugin can add it back.

Create a plugin that handles wp-app.php, overriding the WP_Rewrite 403, returning a reference to xmlrpc.php?rsd, etc.

Remove all references to APP_REQUEST, instead hiding the admin bar with the show_admin_bar filter, filtering the wp_die() handler with wp_die_handler, and firing the app_publish_post hook off 'publish_post' on our own. The plugin should still define APP_REQUEST for compatibility.

Remove the enable_app option from the DB and the UI. (Related, #21509 for XML-RPC.)

Attachments (1)

atom.diff (10.6 KB) - added by wonderboymusic 11 years ago.

Download all attachments as: .zip

Change History (8)

#1 @nacin
11 years ago

The atompub slug on extend/plugins/ is taken. atom-publishing-protocol seems good.

#2 @wonderboymusic
11 years ago

  • Keywords has-patch dev-feedback needs-testing added
  • Version set to 2.3

Attached a first pass at Atom removal.

The plugin is here: (first rev, needs love)

Last edited 11 years ago by wonderboymusic (previous) (diff)

#3 @nacin
11 years ago

atom.diff looks good. I'll want to study the class-wp.php changes carefully — I got the gist, but could you explain them to the class? (Random note - no need to check isset() in order to unset().)

We can probably ditch log_app(), actually, as it's only available inside wp-app.php. The plugin will need to define it. Good use of pluggable-deprecated.php for the old wp_atom_server class.

You can go ahead and leave the deletion of wp-app.php and class-wp-atom-server.php out of future patches, to make them easier to review.

I too considered isset( $GLOBALS['wp_settings_fields']['writing']['remote_publishing'] ). Though I think we can just lump it in next to do_settings_fields('writing', 'default');.

11 years ago

#4 @wonderboymusic
11 years ago

I updated the patch to remove the deleted files.

class-wp.php: error is a query var but only really handles 404, which redirects to a template. 403, 500, 502, 503 are handled by the browser (and don't need a content body) but aren't easy to trigger in WP, until the changes I made.

If we open our hymnals to one of our favorite HTTP status code resources:

#6 follow-up: @nacin
11 years ago

  • Resolution set to fixed
  • Status changed from new to closed

In [21818]:

Remove AtomPub from core.

DB version is bumped to generate the new wp-app rewrite rule and remove the old enable_app option.

props wonderboymusic.
fixes #21509.

In [21819]:

Remove accidental cruft in [21804] caused by renaming variables. see #21509.

#7 in reply to: ↑ 6 @sirzooro
11 years ago

  • Cc sirzooro added

Replying to nacin:

In [21818]:

  • Introduces an action, xmlrpc_rsd_apis, to add APIs to xmlrpc.php?rsd.

In the past I proposed another solution for this: #10514. Could you use it now?

Note: See TracTickets for help on using tickets.