#21866 closed task (blessed) (fixed)
Remove AtomPub from core
Reported by: | nacin | Owned by: | |
---|---|---|---|
Milestone: | 3.5 | Priority: | normal |
Severity: | normal | Version: | 2.3 |
Component: | AtomPub | Keywords: | has-patch dev-feedback needs-testing |
Focuses: | Cc: |
Description
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 WordPress.com 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)
Change History (8)
#2
@
12 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:
http://plugins.svn.wordpress.org/atom-publishing-protocol/trunk/ (first rev, needs love)
#3
@
12 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');
.
#4
@
12 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: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
#6
follow-up:
↓ 7
@
12 years ago
- Resolution set to fixed
- Status changed from new to closed
In [21818]:
Remove AtomPub from core.
- Will be replaced with http://wordpress.org/extend/plugins/atom-publishing-protocol/.
- Introduces an action, xmlrpc_rsd_apis, to add APIs to xmlrpc.php?rsd.
- Introduces support for 'error' being 403 and 50x in class-wp.php.
- Removes 'Remote Publishing' from Writing Settings (see [21804]). Keeps the remote_publishing settings section.
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.
The atompub slug on extend/plugins/ is taken. atom-publishing-protocol seems good.