WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#27715 closed defect (bug) (fixed)

Hook Docs (35): wp-includes/functions.php

Reported by: GaryJ Owned by: DrewAPicture
Milestone: 3.9 Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch dev-reviewed
Focuses: docs Cc:

Description

Documentation needed for the following hooks:

*date_i18n *number_format_i18n *status_header *nocache_headers *robots_txt *upload_dir *wp_upload_bits *ext2type *getimagesize_mimes_to_exts *wp_check_filetype_and_ext *mime_types *upload_mimes *wp_die_ajax_handler *wp_die_xmlrpc_handler *wp_die_handler *load_default_widgets *deprecated_function_trigger_error *deprecated_file_trigger_error *deprecated_argument_trigger_error *doing_it_wrong_trigger_error *iis7_supports_permalinks *global_terms_enabled *extra_{$context}_headers *kses_allowed_protocols *wp_checkdate *wp_auth_check_load *wp_auth_check_same_domain

*do_feed_{$feed} *do_robotstxt *deprecated_function_run *deprecated_file_included *deprecated_argument_run *doing_it_wrong_run

Attachments (5)

27715.diff (1.5 KB) - added by jesin 5 years ago.
Docs for robots_txt, wp_checkdate and wp_auth_check_load
27715.2.diff (1.5 KB) - added by jesin 5 years ago.
Corrected version of 27715.diff
27715-filters.diff (14.6 KB) - added by GaryJ 5 years ago.
Remaining filters
27715.3.diff (16.8 KB) - added by GaryJ 5 years ago.
Remaining filters and actions
27715.4.diff (18.9 KB) - added by DrewAPicture 5 years ago.
2nd pass.

Download all attachments as: .zip

Change History (14)

@jesin
5 years ago

Docs for robots_txt, wp_checkdate and wp_auth_check_load

@jesin
5 years ago

Corrected version of 27715.diff

#1 @GaryJ
5 years ago

I'm working on the other hooks within this file.

#2 @DrewAPicture
5 years ago

  • Owner set to GaryJ
  • Status changed from new to assigned

@GaryJ
5 years ago

Remaining filters

#3 @GaryJ
5 years ago

  • Keywords dev-feedback added

27715-filters.diff is first pass at remaining filters.

(First diff created via git, so let me know if it's not compatible.)

@GaryJ
5 years ago

Remaining filters and actions

#4 @GaryJ
5 years ago

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

27715.3.diff added which replaces my 27715-filters.diff file as it adds in the action docs as well. Assuming all is well, you'd need to apply 27715.3.diff and jesin's 27715.2.diff to document the all of the hooks in the file.

@DrewAPicture
5 years ago

2nd pass.

#5 @DrewAPicture
5 years ago

  • Milestone changed from Awaiting Review to 3.9
  • Owner changed from GaryJ to DrewAPicture
  • Reporter changed from DrewAPicture to GaryJ
  • Status changed from assigned to reviewing

Hi Gary, thanks for the patches here. I've iterated on your last patch with 27715.4.diff.

Notable changes included standardizing some of the language across similar hooks, removing some jargon, one set of hook docs had a missing parameter, there was a missed filter, and a few other things.

#6 @GaryJ
5 years ago

+1 on those changes Drew.

Line 3330 of your patch has an indentation issue (which came from my patch). Probably accidental spaces instead of a tab in there.

#7 @nacin
5 years ago

I noticed line 3330 as well.

In wp_die(), extra line breaks are added before the start of the documentation blocks. These are not needed if the doc block is indented an additional level beyond the line preceding it (namely, the start of a function or in this case inside if conditions).

That's it, though — good for commit.

#8 @nacin
5 years ago

  • Keywords dev-reviewed added

#9 @DrewAPicture
5 years ago

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

In 28109:

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

Props jesin, GaryJ.
Fixes #27715.

Note: See TracTickets for help on using tickets.