WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 6 years ago

#26979 closed defect (bug) (fixed)

Hook Docs (6): wp-includes/revision.php

Reported by: adamsilverstein Owned by: DrewAPicture
Milestone: 3.9 Priority: normal
Severity: normal Version:
Component: Revisions Keywords: has-patch commit
Focuses: docs Cc:

Description

Lets add some docs for the hooks in wp-includes/revision.php!

Attachments (3)

26979.diff (2.4 KB) - added by adamsilverstein 7 years ago.
26979.2.diff (2.7 KB) - added by adamsilverstein 6 years ago.
docs corrections, cleanup
26979.3.diff (4.5 KB) - added by DrewAPicture 6 years ago.
Final pass.

Download all attachments as: .zip

Change History (11)

#1 @kpdesign
7 years ago

  • Keywords needs-patch added
  • Summary changed from Hook Docs for wp-includes/revision.php to Hook Docs (6): wp-includes/revision.php
  • Type changed from enhancement to defect (bug)

#2 @DrewAPicture
7 years ago

  • Keywords has-patch added; needs-patch removed

#3 @DrewAPicture
7 years ago

  • Owner set to DrewAPicture
  • Status changed from new to reviewing

Thanks for the patch. I'll work up some notes and get back to you.

This ticket was mentioned in IRC in #wordpress-dev by adamsilverstein. View the logs.


6 years ago

#5 follow-up: @DrewAPicture
6 years ago

  • Component changed from General to Revisions
  • Keywords needs-patch added; has-patch removed
  • Version trunk deleted

Here are some notes on 26979.diff:

_wp_post_revision_fields filter:

  • Don't need the hash notation here since it's really just an array of translatable strings. You can just say:

@param array $fields List of fields to revision. Contains 'post_title', 'post_content', and 'post_excerpt' by default.

  • Should only be one space between the @since tag and version

wp_save_post_revision_check_for_changes filter:

  • Need a docs-specific variable for the first parameter. Maybe $changes.
  • s/id/ID in two places

With the above changes should be able to get this in shortly.

@adamsilverstein
6 years ago

docs corrections, cleanup

#6 in reply to: ↑ 5 @adamsilverstein
6 years ago

  • Keywords has-patch dev-feedback added; needs-patch removed

Thanks for the review and feedback; I have (hopefully) addressed all these issues in 26979.2.diff.

Replying to DrewAPicture:

Here are some notes on 26979.diff:

_wp_post_revision_fields filter:

  • Don't need the hash notation here since it's really just an array of translatable strings. You can just say:

@param array $fields List of fields to revision. Contains 'post_title', 'post_content', and 'post_excerpt' by default.

  • Should only be one space between the @since tag and version

wp_save_post_revision_check_for_changes filter:

  • Need a docs-specific variable for the first parameter. Maybe $changes.
  • s/id/ID in two places

With the above changes should be able to get this in shortly.

@DrewAPicture
6 years ago

Final pass.

#7 @DrewAPicture
6 years ago

  • Keywords commit added; dev-feedback removed
  • Milestone changed from Awaiting Review to 3.9

26979.3.diff cleans up some of the wording on the filters in .2 and adds hook docs for all of the actions. Good to go.

#8 @DrewAPicture
6 years ago

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

In 27699:

Inline documentation for hooks in wp-includes/revision.php.

Props adamsilverstein, DrewAPicture.
Fixes #26979.

Note: See TracTickets for help on using tickets.