Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#26148 closed defect (bug) (fixed)

PHPDoc updates for /wp-includes/user.php

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

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 13 years ago.
26148.1.patch (5.4 KB ) - added by morganestes 13 years ago.
Refreshed patch with updates after other docs added.
26148.2.patch (8.3 KB ) - added by SergeyBiryukov 13 years ago.
26148.3.patch (7.6 KB ) - added by SergeyBiryukov 13 years ago.
26148.4.patch (887 bytes ) - added by SergeyBiryukov 13 years ago.

Download all attachments as: .zip

Change History (20)

@morganestes
13 years ago

#1 @nacin
13 years ago

  • Component Inline DocsUsers
  • Focuses docs added

@morganestes
13 years ago

Refreshed patch with updates after other docs added.

#2 @morganestes
13 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
13 years ago

This patch also addresses #27130

#4 @DrewAPicture
13 years ago

#27130 was marked as a duplicate.

#5 follow-ups: @SergeyBiryukov
13 years ago

  • Milestone Awaiting Review3.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
13 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
13 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
13 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
13 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
13 years ago

Replying to SergeyBiryukov:

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

Moved to #27255.

#11 in reply to: ↑ 7 @SergeyBiryukov
13 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
13 years ago

  • Owner set to DrewAPicture
  • Resolutionfixed
  • Status newclosed

In 27353:

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

Props morganestes, SergeyBiryukov.
Fixes #26148.

#13 @SergeyBiryukov
13 years ago

  • Resolution fixed
  • Status closedreopened

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

26148.4.patch is an additional clarification.

Version 0, edited 13 years ago by SergeyBiryukov (next)

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


13 years ago

#15 @SergeyBiryukov
13 years ago

  • Resolutionfixed
  • Status reopenedclosed

In 27354:

Additional clarification for wp_authenticate_cookie() parameters.

fixes #26148.

Note: See TracTickets for help on using tickets.