Opened 3 years ago

Closed 2 years ago

#15238 closed enhancement (fixed)

XML-RPC class should have better documentation

Reported by: koke Owned by: westi
Priority: normal Milestone: 3.2
Component: XML-RPC Version:
Severity: minor Keywords: has-patch
Cc: jbernal@…, josephscott, westi

Description

Right now, most of the comments on src:trunk/wp-includes/class.wp-xmlrpc-server.php are like this one:

	/**
	 * Retrieve page list.
	 *
	 * @since 2.2.0
	 *
	 * @param array $args Method parameters.
	 * @return unknown
	 */

At least they should detail more about the contents of $args and the values returned.

Attachments (2)

wp-xmlrpcdoc-15238-wip-1.patch (2.4 KB) - added by koke 3 years ago.
Commented some xmlrpc functions
wp-xmlrpcdoc-15238-wip-2.patch (2.7 KB) - added by koke 2 years ago.
More documentation for wp.getComments, wp.deleteComment, and wp.editComment

Download all attachments as: .zip

Change History (14)

koke3 years ago

Commented some xmlrpc functions

comment:1   koke3 years ago

  • Cc jbernal@… added

This should be an easy (although tedious) task. I've attached a patch commenting some of the functions. This way, the format and expected content of the documentation can be discussed before doing all the hard work

  • Cc josephscott added

Some of this gets tricky, for instance if we allow for custom post statuses, trying to list the valid ones in the comments is going to be incomplete at best. Another challenge is that since most people interested in this API are external clients, they are unlikely to read the source code. In some cases they are forbidden from doing so.

Some of these have already been documented in the codex, and that might be a better place for these overall. The source code comments could link to the codex pages for reference.

  • Keywords gci needs-patch added
  • Milestone changed from Awaiting Review to Future Release
  • Cc westi added

One of the reasons I want this in the code is so that the expected behaviour is documented with the implementation as this makes it much easier to review changes

comment:6   koke2 years ago

As an example, bbpress documentation in xmlrpc is quite good:
http://trac.bbpress.org/browser/trunk/xmlrpc.php#L497

koke2 years ago

More documentation for wp.getComments, wp.deleteComment, and wp.editComment

  • Keywords gci removed
  • Milestone changed from Future Release to 3.2
  • Owner set to westi
  • Status changed from new to reviewing

Moving to 3.2 - documentation changes only

Removing GCI as the task was never done for GCI

comment:8   jane2 years ago

  • Keywords has-patch added; needs-patch removed

(In [17646]) The beginings of better phpdoc for XMLRPC functions. See #15238 props koke.

(In [17647]) More better phpdoc for XMLRPC functions. See #15238 props koke.

  • Milestone changed from 3.2 to Future Release

This has as much as it can get for 3.2, are past freeze. Open new ticket(s) for additional documentation patches in next release.

  • Milestone changed from Future Release to 3.2
  • Resolution set to fixed
  • Status changed from reviewing to closed

New tickets for new patches.

Note: See TracTickets for help on using tickets.