PHP8 has been out since 2020, but the make-pot command still doesn't support named parameters in __() function calls. It would be nice to have this feature so we can write more modern code in our plugins and themes.
This works:
__('Oops! Something went wrong!', 'wp-plugin-textdomain');
This does not work:
__(text: 'Oops! Something went wrong!', domain: 'wp-plugin-textdomain');
PHP8 has been out since 2020, but the make-pot command still doesn't support named parameters in
__()function calls. It would be nice to have this feature so we can write more modern code in our plugins and themes.This works:
__('Oops! Something went wrong!', 'wp-plugin-textdomain');This does not work:
__(text: 'Oops! Something went wrong!', domain: 'wp-plugin-textdomain');