Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#20624 closed defect (bug) (wontfix)

WP_User_Query filters

Reported by: ninos-ego's profile Ninos Ego Owned by:
Milestone: Priority: normal
Severity: minor Version: 3.1
Component: Users Keywords: close
Focuses: Cc:

Description

the filters 'users_join' and 'users_where' are missing in the WP_User_Query..

Hope you can add this to ne next version (3.4), because it's very important for me..

Change History (5)

#1 @Ninos Ego
13 years ago

also you can maybe add an orderby filter

#2 @Ninos Ego
13 years ago

  • Keywords has-patch needs-testing added

think could fix the problem:
add after line 521 in /wp-includes/user.php

$this->query_where = apply_filters_ref_array('posts_where', array( $this->query_where, &$this ) );
$this->query_from = apply_filters_ref_array('posts_join', array( $this->query_from, &$this ) );

#3 @ocean90
13 years ago

  • Component changed from General to Users
  • Keywords has-patch removed
  • Version changed from 3.4 to 3.1

In your comment you are using the post query filter names. Also for 3.4 it's too late.

#4 @ocean90
13 years ago

  • Keywords close added; needs-testing removed

And you should be able to use the pre_user_query filter.

#5 @scribu
13 years ago

  • Keywords needs-patch removed
  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Yep, pre_user_query gives you access to everything you need.

Note: See TracTickets for help on using tickets.