Opened 8 years ago
Closed 7 years ago
#36315 closed defect (bug) (duplicate)
get_avatar_data filter hook runs twice per request
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.2 |
Component: | Users | Keywords: | |
Focuses: | Cc: |
Description
If you run this test function hooked to get_avatar_data
, you should see $var
gets dumped twice:
add_filter( 'get_avatar_data', function( $args, $id_or_email ) { $var = 'foo'; var_dump( $var ); return $args; }, 10, 2 );
Change History (3)
#2
@
8 years ago
On pages with lots of avatars, wp-admin/users.php for example, this filter will already be running ~10 times, so increasing that figure to ~20 unnecessarily seems inefficient?
#3
@
7 years ago
- Milestone Awaiting Review deleted
- Resolution set to duplicate
- Status changed from new to closed
- Version changed from 4.4.2 to 4.2
As noted in #32572 this is intentional behavior and the performance impact is negligible. https://core.trac.wordpress.org/ticket/32572#comment:23
Note: See
TracTickets for help on using
tickets.
It's intentional, see the discussion in #32572.