#14658 closed defect (bug) (invalid)
image_downsize filter always gets only false argument, other are not passed
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | 3.0.1 |
| Severity: | normal | Keywords: | image_downsize |
| Cc: |
Description
I'm in progress of developing some theme for WordPress and realized that:
add_filter( 'image_downsize', 'mk_image_downsize' );
function mk_image_downsize()
{
var_dump( func_get_args() );
}
always prints false. image_downsize returns right values, but arguments are not passed to the filter functions.
I think this is caused by line 142 in wp-includes/media.php file.
if ( $out = apply_filters('image_downsize', false, $id, $size) )
False is passed to filter function, but $id and $size are not.
Change History (2)
Note: See
TracTickets for help on using
tickets.

If you want more than one argument passed to your callback, you need to tell WordPress in your add_filter() call.
add_filter( $filter, $callback, $priority = 10, $number_of_args = 1 );