Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#20042 closed enhancement (fixed)

Move AtomServer class to class-atomserver.php

Reported by: ryan's profile ryan Owned by: ryan's profile ryan
Milestone: 3.4 Priority: normal
Severity: normal Version:
Component: AtomPub Keywords: has-patch dev-feedback
Focuses: Cc:


Move the class to its own file, much as was done with the xmlrpc server class. wp-app.php would then be just the basic endpoint handling bits.

Attachments (2)

20042.patch (57.7 KB) - added by kurtpayne 12 years ago.
20042.diff (2.9 KB) - added by nacin 12 years ago.

Download all attachments as: .zip

Change History (7)

#1 @westi
12 years ago

I like the idea of this.

If we are touch the APP code this much we should look at merging in #7652 and testing out Gorilla ( for testing it (As last I checked APE was too broken to test with)

12 years ago

#2 @kurtpayne
12 years ago

  • Cc kpayne@… added
  • Keywords has-patch added

20042.patch does the following:

  • separates the atom server into a separate class
  • removes the log_api calls per #20051
  • updates the query filter per IRC chat with nacin, ryan
  • replaces the exit calls with wp_die calls for future unit tests
  • installs an override handler for wp_die
  • allows a plugin to replace the atom class with a wp_atom_server_class hook
  • whitespace cleanup

It passes the Gorilla test:

Gorilla is beginning testing on

testServiceDocumentExists with data set #0
[info] Service document found
[result] success

testCollectionsExist with data set #0
[info] Collections found:
    Test Blog Posts accepts application/atom+xml;type=entry
    Test Blog Media accepts image/*, audio/*, video/*
[result] success

testHasJPEGCollection with data set #0
[info] JPEG collections found:
    Test Blog Media
[result] success
Gorilla is beginning testing on

[info] Post collections found:
    Test Blog Posts
[info] Using Test Blog Posts at
[info] Checking current
[result] success

[info] Testing basics
[info] Posting of new entry reported success, location:
[result] success

testPostFromTemplate with data set #0
[info] Creating from Gorilla/lib/tests/data/posts/example-1.xml
[info] Posting of new entry reported success, location:
[info] Examining the new entry as returned in the POST response
[info] Slug was used in server-generated URI
[info] Checking at the new location
[result] success

#3 @kurtpayne
12 years ago

  • Keywords dev-feedback added

#4 @ryan
12 years ago

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

In [20062]:

wp-app.php cleanup:

  • Put the atom server class in class-wp-atom-server.php
  • Remove log_api calls
  • Update the query filter
  • Replace exit calls with wp_die() for unit test compat
  • Add override handler for wp_die()
  • Allow plugins to replace the atom class
  • Whitespace cleanup

Props kurtpayne. fixes #20042

12 years ago

#5 @nacin
12 years ago

In [20063]:

New wp_die_app_handler context in wp_die() for APP requests. Introduces _scalar_wp_die_handler() as a generic handler that wraps die(), for use by plugins. Move deprecated function to the end of the wp-app.php file (same as xmlrpc.php). see #20042.

Note: See TracTickets for help on using tickets.