WordPress.org

Make WordPress Core

Opened 7 months ago

Closed 7 months ago

Last modified 4 months ago

#25362 closed enhancement (fixed)

Improve documentation in wp-admin/admin-post.php

Reported by: ericlewis Owned by: DrewAPicture
Milestone: 3.7 Priority: normal
Severity: normal Version:
Component: Inline Docs Keywords:
Focuses: Cc:

Description

The description here is a bit vague, and the language is also specific to POST requests, where this is a general request handling file.

Also, I had never realized that WP has a built-in form handler file for this purpose, and actually thought this was a relic of bygone AJAX request handling from looking at it. We should probably add some documentation in the Codex for this somewhere.

Attachments (2)

25362.diff (448 bytes) - added by ericlewis 7 months ago.
25362.1.diff (447 bytes) - added by ericlewis 7 months ago.

Download all attachments as: .zip

Change History (10)

ericlewis7 months ago

comment:1 ericlewis7 months ago

attachment:25362.diff gives more detail in the file-level docblock.

comment:2 ericlewis7 months ago

  • Keywords has-patch added

comment:3 follow-up: DrewAPicture7 months ago

  • Keywords needs-patch added; has-patch removed
  • Milestone changed from Awaiting Review to 3.7

Notes on 25362.diff:

  • No period in the file header short description
  • Use camel-casing in the file header, so "WordPress Generic Request (POST/GET) Handler"

comment:4 in reply to: ↑ 3 ericlewis7 months ago

Replying to DrewAPicture:

  • No period in the file header short description

Following-up to the IRC discussion, it actually looks like core is split pretty evenly in this regard - 276 of 544 PHP file headers have a period at the end of their short description.

Should we bring these inline to the new standard?

ericlewis7 months ago

comment:5 ericlewis7 months ago

attachment:25362.1.diff adds CamelCasing to the file-level header and removes the trailing period

comment:6 DrewAPicture7 months ago

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

In 25561:

Improve file header and description in wp-admin/admin-post.php.

Props ericlewis.
Fixes #25362.

comment:8 kpdesign4 months ago

  • Keywords needs-patch removed
Note: See TracTickets for help on using tickets.