Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#14709 closed enhancement (fixed)

WP_User_Query constructor improvements

Reported by: filosofo's profile filosofo Owned by: filosofo's profile filosofo
Milestone: 3.1 Priority: normal
Severity: normal Version: 3.0.1
Component: Users Keywords: has-patch
Focuses: Cc:

Description

  • We should be able to extend the class and invoke the parent constructor agnostic of the particular class name of the parent, e.g. return parent::__construct()
  • We should be able to instantiate the class without querying immediately (currently the constructor has a mandatory query argument).

Attachments (1)

wp_user_query_constructor.diff (1.3 KB) - added by filosofo 13 years ago.

Download all attachments as: .zip

Change History (4)

#1 @scribu
13 years ago

  • Type changed from defect (bug) to enhancement

Good idea.

return $this->construct( $query );

Wouldn't the following be just as good?

$this->construct( $query );

#2 @filosofo
13 years ago

You're right; that's just force of habit. Returning a constructor doesn't do anything.

#3 @scribu
13 years ago

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

(In [15543]) WP_User_Query constructor improvements. Props filosofo. Fixes #14709

Note: See TracTickets for help on using tickets.