Closed ckaklamanos closed 2 years ago
Hello.
This is an issue that is not resolved yet.
Although you have added the 2 arguments in the filter, they are being added after the filter declaration. Therefore, it is impossible to override them with the filter.
Please look at
badgeos-nomination-submission-add-on/includes/submission-actions.php, Line 1771.
// Available filter for changing the language
$defaults = apply_filters( 'badgeos_submission_form_language', $defaults );
// Patch in our achievement and user IDs
$defaults['achievement_id'] = isset( $args["achievement_id"] ) ? absint( $args["achievement_id"] ) : "";
$defaults['user_id'] = $user_ID;
The line
$defaults = apply_filters( 'badgeos_submission_form_language', $defaults );
Should go after the "achivement_id" and "user_id" declaration, so that a developer will be able to override them.
This is a hack I always do when I update your plugin, otherwise, my customizations will not work.
Thanks for re-considering it.
PS: Is there s Github repo for this plugin, so that I can provide a Pull Request? Thanks.
Add 2 arguments in "badgeos_submission_form_language" filter: "$achievement_id" and "$user_ID"