I love how we can define a master key for Gravity Forms within the wp-config. My question, would it be possible to do that with reCAPTCHA private and public keys?
I love how we can define a master key for Gravity Forms within the wp-config. My question, would it be possible to do that with reCAPTCHA private and public keys?
Yep, it's doable. We'll add it to the list & it should make the v1.5 release in a couple of weeks.
Thanks for the suggestion.
So there is not a way to do this currently? If not, I can wait :) thanks for adding that in!
Nope, not a way do it currently but it's already been added to the 1.5 release and tested so will be out as soon as we wrap up the rest of the 1.5 features.
Any update on this? Would love to have this feature for a project I'm currently working on.
This was added to one of the recent 1.5 builds, however I need to check to see what the proper syntax is for adding it to the wp-config.php file. It might be a little bit before I can get back with you on this, the developer who implemented the feature is currently traveling with limited internet access.
Thanks for the update. It would be really handy to have this for me.
The reCAPTCHA keys can be pre-populated by adding the following to your wp-config.php file:
define('GF_RECAPTCHA_PRIVATE_KEY','YOUR_PRIVATE_KEY_GOES_HERE');
define('GF_RECAPTCHA_PUBLIC_KEY','YOUR_PUBLIC_KEY_GOES_HERE');
Please note that these only get applied to new sites activated in multi-site. It won't pre-populate existing sites as it only runs on activation.
You need to be running the latest 1.5 development release for this to work.
I'm sorry, but how do we define a master key in the wp-config.php file? I don't remember seeing mention of that anywhere, and can't find it when I search the forums here and the documentation.
@zatzai:
define(‘GF_LICENSE_KEY’,'YOUR_KEY_GOES_HERE’);
from
http://forum.gravityhelp.com/topic/are-there-global-notification-variables#post-14288
Thanks.
@Carl - is there anything I/you/we can do to apply these global recaptcha keys existing sites?
We have hundreds of sites already, and would *really* like a way to apply the global recaptcha keys to them. :/
The option to add the keys to the wp-config.php file is only triggered when a new site is created. If you wanted to add it to sites that already exist the only option is to do it manually or to write a SQL script to do it directly in the database by duplicating the appropriate wp_options for each site.
I will probably write a plugin to add the option for all sites (will share when done), but I think that if a global key is defined, this part of the form should probably be hidden from the user. I'd like to grant our users the ability to use Re-captcha without 1) exposing our private key to site admins or 2) confusing people with this 'gibberish'
thanks for the reply
(also - how does this option get added during site activation if the plugin isn't active? o_O)
Actually - it seems that adding the stuff to wp-config works fine when you just activate gravity forms on an existing site. (of course I realized this AFTER i wrote a plugin to update all the sites' options ><)
Removing those form fields when global wp_config keys are set still seems like a good idea though.
Any progress on removing this from the end user's view?
I also don't want to have my private key displayed to all my multi-site users.
Having them show up as a password field (like you do with the license key) isn't effective either since the source for the page still displays the value.
We have not removed these from the end users view. But the idea that @UWEX had to hide these when being set globally via the wp_config keys is a good one. We can look at implementing this.
reCAPTCHA keys aren't super sensitive. The reason why we show them now is so each individual site could use their own keys if they would like. But auto-populating these via the wp_config could be a signal we could use to not display these and only rely on the values passed via the wp_config.
We will look into this and see how to best handle this.