WordPress.org

Make WordPress Core

Opened 7 months ago

Closed 6 months ago

#25508 closed defect (bug) (fixed)

Hooks Docs: wp-includes/admin-bar.php

Reported by: swissspidy Owned by: kpdesign
Milestone: 3.8 Priority: normal
Severity: normal Version:
Component: Inline Docs Keywords: has-patch commit
Focuses: Cc:

Description

Patch forthcoming

Attachments (3)

25508.diff (2.3 KB) - added by swissspidy 7 months ago.
25508.2.diff (2.4 KB) - added by swissspidy 6 months ago.
25508.3.diff (2.4 KB) - added by DrewAPicture 6 months ago.
Clean up

Download all attachments as: .zip

Change History (13)

swissspidy7 months ago

comment:1 swissspidy7 months ago

  • Keywords has-patch added; needs-patch removed

First pass at inline docs for this file's hooks.

comment:2 swissspidy7 months ago

#25512 was marked as a duplicate.

comment:3 kpdesign7 months ago

  • Keywords needs-patch added; has-patch removed

@swissspidy: Thanks for the patch. :)

Just a few things that need fixed:

General:

  • All short/long descriptions and @param descriptions need periods at the end.

wp_admin_bar_class:

  • Change @param to @param WP_Admin_Bar The WP_Admin_Bar instance, passed by reference.

wp_before_admin_bar_render:

  • Remove the blank line after @since, as there's no parameters to be listed.

show_admin_bar:

  • s/wheter/whether in short description and @param description.
  • Change long description to say that show_admin_bar is the recommended way to hide the toolbar.
  • Existing long description should be moved to the @param description, like:
* @param bool $show_admin_bar Whether the admin bar should be shown. Default 'false'.
*                             The user's display preference is used for logged in users.

Could you make these changes and upload a new patch please? :)

Also, please do not overwrite your existing patch. If you use the same filename, Trac will append a number to the filename to indicate it's a new version. We like to keep all patch versions for the ticket history.

comment:4 kpdesign7 months ago

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

comment:5 DrewAPicture7 months ago

#25512 was marked as a duplicate.

swissspidy6 months ago

comment:6 swissspidy6 months ago

Just updated the patch to respect your mentioned points.

I only disagree with the wp_admin_bar_classfilter. It doesn't pass the instance by reference, only the name of the class to instantiate.

comment:7 swissspidy6 months ago

  • Keywords has-patch added; needs-patch removed

comment:8 swissspidy6 months ago

  • Cc hello@… added

DrewAPicture6 months ago

Clean up

comment:9 DrewAPicture6 months ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 3.8

25508.3.diff looks good.

comment:10 DrewAPicture6 months ago

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

In 25941:

Inline documentation for hooks in wp-includes/admin-bar.php.

Props swissspidy.
Fixes #25508.

Note: See TracTickets for help on using tickets.