Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#25376 closed defect (bug) (fixed)

Hook Docs (82): wp-includes/post.php

Reported by: DrewAPicture Owned by: DrewAPicture
Priority: normal Milestone: 3.9
Component: Posts, Post Types Version:
Severity: normal Keywords: has-patch commit dev-reviewed
Cc: Focuses: docs

Description (last modified by DrewAPicture)

Attached patch documents the following hooks (all):

Actions:

  • registered_post_type
  • before_delete_post
  • delete_post
  • deleted_post
  • after_delete_post
  • wp_trash_post
  • trashed_post
  • untrash_post
  • untrashed_post
  • trash_post_comments
  • trashed_post_comments
  • untrash_post_comments
  • untrashed_post_comments
  • pre_post_update
  • edit_post
  • post_updated
  • save_post_$post_type
  • save_post
  • wp_insert_post
  • edit_post
  • save_post_$post_type (duplicate)
  • save_post (duplicate)
  • wp_insert_post (duplicate)
  • transition_post_status
  • $old_status_to_$new_status
  • $new_status_to_$post_type
  • edit_attachment
  • add_attachment
  • delete_attachment
  • delete_post
  • deleted_post
  • clean_post_cache
  • clean_page_cache
  • clean_attachment_cache
  • private_to_published
  • xmlrpc_publish_post

Filters:

  • get_attached_file
  • update_attached_file
  • _wp_relative_upload_path
  • post_type_labels_$post_type
  • 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
  • wp_count_posts (existing)
  • wp_count_attachments (existing)
  • post_mime_types
  • wp_insert_post_empty_content
  • wp_insert_post_parent
  • wp_insert_post_data
  • wp_unique_post_slug_is_bad_attachment_slug
  • wp_unique_post_slug_is_bad_hierarchical_slug
  • wp_unique_post_slug_is_bad_flat_slug
  • wp_unique_post_slug
  • add_ping
  • get_enclosed
  • get_pung
  • get_to_ping
  • get_pages
  • get_pages (duplicate)
  • get_pages (duplicate)
  • wp_delete_file
  • wp_delete_file (duplicate)
  • wp_delete_file (duplicate)
  • wp_delete_file (duplicate)
  • wp_get_attachment_metadata
  • wp_update_attachment_metadata
  • wp_get_attachment_url
  • wp_get_attachment_thumb_file
  • wp_get_attachment_thumb_url
  • icon_dir
  • icon_dir_uri
  • icon_dirs
  • wp_mime_type_icon
  • get_lastpostdate
  • get_lastpostmodified

Attachments (8)

25376.diff​ (42.9 KB ) - added by DrewAPicture 13 years ago.
First pass (all hooks)
25376.2.diff​ (42.2 KB ) - added by DrewAPicture 13 years ago.
w/ @since + 'enclosure' clarifications
25376.3.diff​ (42.2 KB ) - added by DrewAPicture 13 years ago.
typo
25376.4.diff​ (10.7 KB ) - added by DrewAPicture 13 years ago.
Second pass: Part I.
25376-sanitize.diff​ (4.6 KB ) - added by DrewAPicture 13 years ago.
25376-sanitize.2.diff​ (4.5 KB ) - added by DrewAPicture 13 years ago.
25376.5.diff​ (34.0 KB ) - added by DrewAPicture 13 years ago.
Second pass: Part II.
25376.6.diff​ (34.0 KB ) - added by DrewAPicture 13 years ago.
Third pass: Part II.

Download all attachments as: .zip

Change History (23)

#1 @DrewAPicture
13 years ago

  • Summary Hood Docs: wp-includes/post.php → Hook Docs: wp-includes/post.php

@DrewAPicture
13 years ago

First pass (all hooks)

#2 @DrewAPicture
13 years ago

  • Description modified (diff)
  • Keywords has-patch added; needs-patch removed
  • Milestone Awaiting Review → 3.7

25376.diff​ documents all actions and filters in the file.

TODO:

  • @since versions for all of the above
  • Clarify 'enclosure'-related hook docs

@DrewAPicture
13 years ago

w/ @since + 'enclosure' clarifications

#3 @DrewAPicture
13 years ago

  • Milestone 3.7 → Awaiting Review

This needs some work yet following feedback from nacin and adamsilverstein. Backing off the milestone for the time being.

#4 @kpdesign
13 years ago

#25505 was marked as a duplicate.

#5 @DrewAPicture
13 years ago

  • Summary Hook Docs: wp-includes/post.php → Hook Docs (82): wp-includes/post.php

#6 @jeremyfelt
13 years ago

  • Component Inline Docs → Post Types
  • Focuses docs added

@DrewAPicture
13 years ago

Second pass: Part I.

#7 @DrewAPicture
13 years ago

In 28041:

Part I of inline documenation for hooks in wp-includes/post.php.

Adds docs for the following hooks:

  • get_attached_file
  • update_attached_file
  • _wp_relative_upload_path
  • post_type_labels_{$post_type}
  • 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}
  • wp_count_posts
  • wp_count_attachments
  • post_mime_types
  • wp_insert_post_empty_content

See #25376.

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


13 years ago

#9 @DrewAPicture
13 years ago

In 28042:

Clarify documentation for hooks in sanitize_post_field().

  • edit_post_{$field} pairs with edit_{$field}
  • pre_post_{$field} pairs with pre_{$field}
  • post_{$field} pairs with {$field}

As the above pairs' docs are unnecessarily duplicative, the second sets of docs have been removed. Also, the "duplicates" are purposely not marked as such in this case as the hook names differ. Also remove @deprecated tags mistakenly left in in [28041].

See #25376.

#10 @DrewAPicture
13 years ago

  • Owner set to DrewAPicture
  • Status new → assigned

@DrewAPicture
13 years ago

Second pass: Part II.

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


13 years ago

#12 @DrewAPicture
13 years ago

  • Keywords dev-feedback added
  • Milestone Awaiting Review → 3.9

25376.5.diff​ should cover the rest of wpinc/post.php.

@DrewAPicture
13 years ago

Third pass: Part II.

#13 @DrewAPicture
13 years ago

  • Keywords commit added; dev-feedback removed

25376.6.diff​ incorporates feedback from nacin ​in IRC

untrash_post_comments and untrashed_post_comments filters:

  • Comments are being restored for *a post*

wp_unique_post_slug_is_bad_attachment_slug, wp_unique_post_slug_is_bad_hierarchical_slug, and wp_unique_post_slug_is_bad_flat_slug filters:

  • Standardizes on "bad" terminology instead of "poor"

#14 @nacin
13 years ago

  • Keywords dev-reviewed added

#15 @DrewAPicture
13 years ago

  • Resolution → fixed
  • Status assigned → closed

In 28106:

Part II of inline documentation for hooks in wp-includes/post.php.

Documents all remaining hooks following [28041] and [28042]. Also updates the hash notation style for wp_insert_post().

Props nacin for several hook descriptions.

Fixes #25376.

Note: See TracTickets for help on using tickets.