WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#26148 closed defect (bug) (fixed)

PHPDoc updates for /wp-includes/user.php

Reported by: morganestes Owned by: DrewAPicture
Milestone: 3.9 Priority: normal
Severity: normal Version: 3.8
Component: Users Keywords: has-patch
Focuses: docs Cc:

Description

Added PHPDoc blocks for two functions introduced in 2.8, and updated signatures in others for better specificity of params and returns.

Attachments (5)

26148.diff (4.8 KB) - added by morganestes 8 years ago.
26148.1.patch (5.4 KB) - added by morganestes 8 years ago.
Refreshed patch with updates after other docs added.
26148.2.patch (8.3 KB) - added by SergeyBiryukov 8 years ago.
26148.3.patch (7.6 KB) - added by SergeyBiryukov 8 years ago.
26148.4.patch (887 bytes) - added by SergeyBiryukov 8 years ago.

Download all attachments as: .zip

Change History (20)

@morganestes
8 years ago

#1 @nacin
8 years ago

  • Component changed from Inline Docs to Users
  • Focuses docs added

@morganestes
8 years ago

Refreshed patch with updates after other docs added.

#2 @morganestes
8 years ago

  • Keywords 2nd-opinion added

Refreshed patch. One thing different is in wp_signon(), where $credentials was set as an optional string, but is actually an array in the function, so I made the signature change to reflect what was actually being used/checked for. I didn't think I was stretching too far in doing so as part of an inline doc update, but if that's not the case I can change back to the previous signature.

#3 @azizur
8 years ago

This patch also addresses #27130

#4 @DrewAPicture
8 years ago

#27130 was marked as a duplicate.

#5 follow-ups: @SergeyBiryukov
8 years ago

  • Milestone changed from Awaiting Review to 3.9

26148.2.patch is another pass.

  • $secure_cookie should remain bool, even if its default value is a string, see 2:ticket:27130.
  • add_filter() in line 105 is redundant since [24848].
  • Removed some obsolete $wpdb references.
  • Some more fixes and additions.

#6 in reply to: ↑ 5 @SergeyBiryukov
8 years ago

Replying to SergeyBiryukov:

add_filter() in line 105 is redundant since [24848].

It should probably be removed in a separate commit to avoid confusion.

#7 follow-ups: @DrewAPicture
8 years ago

  • Keywords needs-patch added; has-patch 2nd-opinion removed

As is the custom in inline-documentation patches, there should not be any code changes that fall outside of basic documentation needs. Basic needs could include things like adding braces to conditionals after adding inline documentation. Those needs would, however, exclude things like unnecessary whitespacing.

So, as in 26148.2.patch:

  • The parameter default change in wp_signon() should be removed.
  • Whitespacing in wp_authenticate_username_password(), and wp_authenticate_cookie() should be removed.

#8 in reply to: ↑ 7 ; follow-up: @SergeyBiryukov
8 years ago

Replying to DrewAPicture:

The parameter default change in wp_signon() should be removed.

Let's reopen #27130 then :)

#9 in reply to: ↑ 8 @DrewAPicture
8 years ago

Replying to SergeyBiryukov:

Replying to DrewAPicture:

The parameter default change in wp_signon() should be removed.

Let's reopen #27130 then :)

Re-opened.

#10 in reply to: ↑ 5 @SergeyBiryukov
8 years ago

Replying to SergeyBiryukov:

add_filter() in line 105 is redundant since [24848].

Moved to #27255.

#11 in reply to: ↑ 7 @SergeyBiryukov
8 years ago

  • Keywords has-patch added; needs-patch removed

Replying to DrewAPicture:

As is the custom in inline-documentation patches, there should not be any code changes that fall outside of basic documentation needs.

26148.3.patch excludes unrelated changes.

#12 @DrewAPicture
8 years ago

  • Owner set to DrewAPicture
  • Resolution set to fixed
  • Status changed from new to closed

In 27353:

Inline documentation improvements for wp-includes/user.php.

Props morganestes, SergeyBiryukov.
Fixes #26148.

#13 @SergeyBiryukov
8 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Just noticed that $username and $password in wp_authenticate_cookie() are always passed.

26148.4.patch is an additional clarification.

Last edited 8 years ago by SergeyBiryukov (previous) (diff)

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


8 years ago

#15 @SergeyBiryukov
8 years ago

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

In 27354:

Additional clarification for wp_authenticate_cookie() parameters.

fixes #26148.

Note: See TracTickets for help on using tickets.