Make WordPress Core

Opened 5 years ago

Closed 9 months ago

Last modified 9 months ago

#50654 closed enhancement (fixed)

Fix the filter docs in sanitize_post_field()

Reported by: johnbillion's profile johnbillion Owned by: drewapicture's profile DrewAPicture
Milestone: 6.7 Priority: normal
Severity: normal Version: 2.3
Component: Posts, Post Types Keywords: has-patch
Focuses: docs Cc:

Description

The sanitize_post_field() function calls nine separate filters on its data depending on various conditions. The documentation for these need improving, and documentation for the missing filters need adding.

Need to be careful about accuracy here because of the very general names of these filters and their dynamic portions.

Attachments (1)

50654.diff (6.0 KB) - added by johnbillion 5 years ago.

Download all attachments as: .zip

Change History (8)

@johnbillion
5 years ago

#1 @johnbillion
5 years ago

Partial patch attached. Needs some more work and needs checking for accuracy.

#2 @DrewAPicture
9 months ago

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

#3 @DrewAPicture
9 months ago

  • Milestone changed from Awaiting Review to 6.7
  • Version set to 2.3

#4 @DrewAPicture
9 months ago

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

In 59045:

Docs: Add possible filter names to the hook docs for the following filters in sanitize_post_field():

  • edit_{$field}
  • {$field_no_prefix}_edit_pre
  • edit_post_{$field}
  • pre_{$field}
  • {$field_no_prefix}_save_pre
  • pre_post_{$field}
  • {$field}_pre
  • {$field}
  • post_{$field}

Props johnbillion, DrewAPicture.
Fixes #50654

This ticket was mentioned in PR #7393 on WordPress/wordpress-develop by @mukesh27.


9 months ago
#5

  • Keywords has-patch added; needs-patch removed

Trac ticket: https://core.trac.wordpress.org/ticket/50654

Follow-up to https://core.trac.wordpress.org/changeset/59045, Missed the @since and @param docblock.

#6 @DrewAPicture
9 months ago

In 59050:

Docs: Add missing @since and @param annotations for the edit_post_{$field} hook doc.

Props mukesh27
See #50654

Note: See TracTickets for help on using tickets.