Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#25353 closed enhancement (fixed)

Hook Docs: wp-admin/admin-header.php

Reported by: ericlewis Owned by: DrewAPicture
Priority: normal Milestone: 3.7
Component: Inline Docs Version:
Severity: normal Keywords: has-patch commit
Cc: Focuses:

Description


Attachments (2)

25353.diff (2.7 KB ) - added by ericlewis 13 years ago.
25353.1.diff (3.6 KB ) - added by ericlewis 13 years ago.

Download all attachments as: .zip

Change History (10)

@ericlewis
13 years ago

#1 @ericlewis
13 years ago

attachment:25353.diff adds docblocks for admin_title, admin_enqueue_scripts, admin_print_styles-$hook_suffix, admin_print_styles, admin_print_scripts-$hook_suffix, admin_print_scripts, admin_head-$hook_suffix, admin_head, admin_body_class, in_admin_header, network_admin_notices, user_admin_notices, admin_notices, and all_admin_notices.

#2 follow-up: @DrewAPicture
13 years ago

  • Keywords needs-patch added; has-patch removed
  • Milestone Awaiting Review3.7

Looking at 25353.diff:

  • Space out the specific action lines per coding standards
  • L#199-219, you'll need to convert the if/elseif/else to use curly braces since each conditional is now multi-line with the addition of the docblocks
  • There needs to be a long description in the block for admin_body_class mentioning that this differs from the other *_class filter hooks in that certain admin body classes cannot be filtered out, namely wp-admin wp-core-ui no-js
  • Should be "Fires in <head> for a specific admin page." L#109
  • Should be "Fires in <head> for all admin pages." L#116
  • Generally: "this specific admin page." should be more like "a specific admin page based on $hook_suffix."
Last edited 13 years ago by DrewAPicture (previous) (diff)

#3 in reply to: ↑ 2 ; follow-up: @ericlewis
13 years ago

Replying to DrewAPicture:

  • Space out the specific action lines per coding standards

Do you mean to space out the hook function calls according to coding standards?

#4 in reply to: ↑ 3 @DrewAPicture
13 years ago

Replying to ericlewis:

Replying to DrewAPicture:

  • Space out the specific action lines per coding standards

Do you mean to space out the hook function calls according to coding standards?

Yes, just like we discussed in the weekly chat yesterday.
do_action('admin_head'); becomes do_action( 'admin_head' ); and so on.

@ericlewis
13 years ago

#5 @ericlewis
13 years ago

attachment:25353.1.diff:

  • Adds spacing to match WP PHP coding standards.
  • Converts the admin_notices if block into curly brace blocks for better legibility.
  • Long description for admin_body_class.
  • Add "Fires in" for <head> hooks.
  • Change "specific admin page" to "specific admin page based on $hook_suffix" where applicable.

#6 @ericlewis
13 years ago

  • Keywords has-patch added; needs-patch removed

#7 @DrewAPicture
13 years ago

  • Keywords commit added

Looks good.

#8 @DrewAPicture
13 years ago

  • Owner set to DrewAPicture
  • Resolutionfixed
  • Status newclosed

In 25499:

Inline documentation for hooks in wp-admin/admin-header.php.

props ericlewis. Fixes #25353.

Note: See TracTickets for help on using tickets.