πŸ”ž ADULT: Ticket/ - Full Archive

Opened 12 years ago

Closed 12 years ago

#25514 closed defect (bug) (fixed)

Hook Docs (47): wp-includes/query.php

Reported by: dougwollison's profile dougwollison Owned by: drewapicture's profile DrewAPicture
Milestone: 3.9 Priority: normal
Severity: normal Version:
Component: Query Keywords: has-patch commit
Focuses: docs Cc:

Description

Added hook documentation for the following actions/filters found in wp-includes/query.php:

  • parse_query
  • parse_tax_query
  • pre_get_posts
  • posts_where
  • posts_join
  • comment_feed_join
  • comment_feed_where
  • comment_feed_groupby
  • comment_feed_orderby
  • comment_feed_limits
  • posts_where_paged
  • posts_groupby
  • posts_join_paged
  • posts_orderby
  • posts_distinct
  • post_limits
  • posts_fields
  • posts_clauses
  • posts_selection
  • posts_where_request
  • posts_groupby_request
  • posts_join_request
  • posts_orderby_request
  • posts_distinct_request
  • posts_fields_request
  • post_limits_request
  • posts_clauses_request
  • posts_request
  • split_the_query
  • posts_request_ids
  • posts_results
  • comment_feed_join
  • comment_feed_where
  • comment_feed_groupby
  • comment_feed_orderby
  • comment_feed_limits
  • the_preview
  • the_posts
  • found_posts_query
  • found_posts
  • loop_start
  • loop_end
  • comment_loop_start
  • the_post

Attachments (8)

WP_Query-hook-docs.diff​ (18.6 KB) - added by dougwollison 12 years ago.
Revised original diff; fixed consistency when mentioning "WP_Query object"
WP_Query-hook-docs-rev1.diff​ (22.4 KB) - added by dougwollison 12 years ago.
Updated revised diff; fixed consistency when mentioning "WP_Query object"
WP_Query-hook-docs.2.diff​ (18.7 KB) - added by dougwollison 12 years ago.
Updated "object" to "instance" when talking about $this.
WP_Query-hook-docs.3.diff​ (20.2 KB) - added by dougwollison 12 years ago.
Updated with requested changes.
WP_Query-hook-docs.4.diff​ (20.9 KB) - added by dougwollison 12 years ago.
Updated descriptions for clause related hooks.
WP_Query-hook-docs.5.diff​ (20.9 KB) - added by dougwollison 12 years ago.
Also fixed missing () on function names.
WP_Query-hook-docs.6.diff​ (21.1 KB) - added by dougwollison 12 years ago.
Spelling corrections; updated notes on pre_get_posts hook.
25514.diff​ (20.9 KB) - added by DrewAPicture 12 years ago.
Cleanup + fixed @since versions

Download all attachments as: .zip

Change History (34)

#1 @johnbillion
12 years ago

  • Type changed from defect (bug) to enhancement

The formatting for the arguments documented in WP_Query-hook-docs.diff​ isn't quite correct.

Arguments in array format (ie. those passed to apply_filters_ref_array() and do_action_ref_array() should use hash notation. See ​http://make.wordpress.org/core/handbook/inline-documentation-standards/php-documentation-standards/#4-hooks-actions-and-filters

#2 @dougwollison
12 years ago

Attached revised version, but I thought these were to be documented for how the hooks should be used; any hook callbacks using these won't be passed an array, but the individual items within the array (e.g. "posts_where" receives the arguments $where and $wp_query; not array($where, $wp_query)).

Also, my other patch (#25495