Opened 11 years ago
Closed 10 years ago
#36315 closed defect (bug) (duplicate)
get_avatar_data filter hook runs twice per request
| Reported by: | henry.wright | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Users | Version: | 4.2 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
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
@
11 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
@
10 years ago
- Milestone Awaiting Review
- Resolution → duplicate
- Status new → closed
- Version 4.4.2 → 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
It's intentional, see the discussion in #32572.