List of arguments is empty when `apply_filters` is returned instead of assigned to variable
LuigiPulcini opened this issue · 1 comments
LuigiPulcini commented
There seems to be a difference in the output between the two following occurrences:
<?php
/**
* My plugin filter assigned to a variable
*
* @param string $first_param This is the first argument
* @param string $second_param This is the second argument
*/
$some_variable = apply_filters( 'my_plugin_filter', $first_param, $second_param );
return $some_variable;
<?php
/**
* My plugin filter directly returned
*
* @param string $first_param This is the first argument
* @param string $second_param This is the second argument
*/
return apply_filters( 'my_plugin_filter', $first_param, $second_param );
In the first case, the full list of arguments is correctly parsed. In the second case, the list of arguments is empty.