Opened 6 years ago
Closed 4 years ago
#44203 closed feature request (wontfix)
Native fields for Google reCAPTCHA API key
Reported by: | tazotodua | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Options, Meta APIs | Keywords: | |
Focuses: | Cc: |
Description
I think Captcha-protection is somehow "must-have" thing (I use on all my sites).
I'ts not arguable that most of users use Google ReCaptcha.
However, every new plugin we add, requires us to again and again enter (copy paste) the same key pairs in every individual plugin.
It could have been good, if there were fields in "general options" dashboard settings page (or somewhere), and plugins can access like this:
if ( !get_option("google_recaptcha_secret_key")) echo 'Please, enter ReCaptcha key pairs in <a href="./options-general.php">settings page</a>';
However, it can be done so, as WP clean installation, itself had hidden those fields, but the plugins (any of installed plugin) could make it force WP to show that field, like:
add_filter('admin_shown_fields', function($args){ $args[] = 'GOOGLE_RECAPTCHA'; return $args; } );
also, the concept can be extended and WP can have several ready FIELD PAIRS for other frequently-used APIs too, which can be activated using above filter, and can be obtained with get_option
.
Hi @tazotodua!
While it would be nice if all plugins incorporating Google reCAPTCHA could share a single option (or perhaps even a constant defined in wp-config), I'm not convinced this belongs within WordPress core.
#22046 is related, but that feature request was for full integration without plugins.