IncognitoCEO
Forum Replies Created
-
Sorry to have posted this. I found the place on your website to purchase preset calculators and tutorials on implementation. I don’t see how to delete this post ?? Thank you
This didn’t work. The prefix i added was made up. _amsynd_ I used the custom functions plugin. I changed some of the keys so i’m not posting the exact key here for safety.
<?php
/**
* Implementing Google’s ReCaptcha on All Give Forms
*
* To effectively use this snippet, please do the following:
* 1. Get your Google ReCAPTCHA API Key here: https://www.google.com/recaptcha/
* 2. In each function and action, replace “_amsynd_” with your own custom prefix
* 3. Put your “Secret Key” where it says “MYSECRETKEY” in the $recaptcha_secret_key string
* 4. Put your “Site Key” where it says “MYSITEKEY” in TWO areas below
*/
/**
* Validate ReCAPTCHA
*
* @param $valid_data
* @param $data
*
* @return array $valid_data
*/
function give_amsynd_validate_recaptcha( $valid_data, $data ) {
$recaptcha_url = ‘https://www.google.com/recaptcha/api/siteverify’;
$recaptcha_secret_key = ‘MYSECRETKEY’; // 6LrtXRYXMLVIRUSCOmKzgSQ94lc1234FGPbDqI4h $recaptcha_response = wp_remote_post( $recaptcha_url . ‘?secret=’ . $recaptcha_secret_key . ‘&response=’ . $data[‘g-recaptcha-response’] . ‘&remoteip=’ . $_SERVER[‘REMOTE_ADDR’] );
$recaptcha_data = wp_remote_retrieve_body( $recaptcha_response );
if ( ! isset( $recaptcha_data->success ) && ! $recaptcha_data->success == true ) {
// User must have validated the reCAPTCHA to proceed with donation.
if ( ! isset( $data[‘g-recaptcha-response’] ) || empty( $data[‘g-recaptcha-response’] ) ) {
give_set_error( ‘g-recaptcha-response’, __( ‘Please verify that you are not a robot.’, ‘give’ ) );
}
}
return $valid_data;
}
add_action( ‘give_checkout_error_checks’, ‘give_amsynd_validate_recaptcha’, 10, 2 );
/**
* Enqueue ReCAPTCHA Scripts
*/
function give_amsynd_recaptcha_scripts() {
wp_register_script( ‘give-captcha-js’, ‘https://www.google.com/recaptcha/api.js’ );
// If you only want to enqueue on single form pages then uncomment if statement
// if ( is_singular( ‘give_forms’ ) ) {
wp_enqueue_script( ‘give-captcha-js’ );
// }
}
add_action( ‘wp_enqueue_scripts’, ‘give_amsynd_recaptcha_scripts’ );
/**
* Print Necessary Inline JS for ReCAPTCHA
*
* This function outputs the appropriate inline js ReCAPTCHA scripts in the footer
*/
function give_amsynd_print_my_inline_script() {
// Uncomment if statement to control output
// if ( is_singular( ‘give_forms’ ) ) {
?>
<script type=”text/javascript”>
jQuery( document ).on( ‘give_gateway_loaded’, function() {
grecaptcha.render( ‘give-recaptcha-element’, {
‘sitekey’: ‘MYSITEKEY’ // 6LxmlvirusXRERFLDSGHJnnwBX67Z60Dnof_voTTcCsBk } );
} );
</script>
<?php
// }
}
add_action( ‘wp_footer’, ‘give_amsynd_print_my_inline_script’ );
/**
* Custom ReCAPTCHA Form Field
*
* This function adds the reCAPTCHA field above the “Donation Total” field.
*
* Don’t forget to update the sitekey!
*
* @param $form_id
*/
function give_amsynd_custom_form_fields( $form_id ) {
// 6LdmXRYXMLVIRUSnnwBX67Z7Dnof_voTTcCsBk
?>
<div id=”give-recaptcha-element” class=”g-recaptcha” data-sitekey=”MYSITEKEY”
style=”margin-bottom:1em”></div>
<?php
}
add_action( ‘give_donation_form_before_submit’, ‘give_amsynd_custom_form_fields’, 10, 1 );* To effectively use this snippet, please do the following:
* 1. Get your Google ReCAPTCHA API Key here: https://www.google.com/recaptcha/
* 2. In each function and action, replace “_myprefix_” with your own custom prefix
* 3. Put your “Secret Key” where it says “MYSECRETKEY” in the $recaptcha_secret_key string
* 4. Put your “Site Key” where it says “MYSITEKEY” in TWO areas belowHey so i figured this out except for one thing. It says to add my own custom prefix. _myprefix_ I’m not sure where to get this custom prefix. Or do i just make up any word? Also, do i leave the underscore before and after?
Warmly, Chuck
Postscript-I zoomed with Amanda this morning and she is fabuloso!
Why am I getting this? Are you suggesting I did something wrong? Was asking for help too much? I don’t get it. I’m giving to forward this to others in the WordPress community. I’m more concerned about those in foreign countries stealing, and deceiving Americans. I’ll deactivate the plug in. Find my email and send me back my money for the paid version.
I can place [sppro id=’123′ text=’click here’] in the page but it sets up a basic button. We are wanting to implement this in a Power Builder button module.
Forum: Plugins
In reply to: [Sticky Spotlight Video Player] Not displaying properly (pro)This plugin is a SCAM!
Matt you still there?
Forum: Plugins
In reply to: [Press This] Featured Image SelectionWhy in the world did they screw with such a central tool in WordPress? The plugin is HORRIBLE! Featured image doesn’t work, chosen images don’t move to library, no way to use as bookmark… WTF?! One star doesn’t quite describe the uselessness of this new plugin compared to the old tool. And Brandon I appreciate you bro. This isn’t about your work really unless you are the one who decided to yank this without warning and transparency. WE NEED MATT!
- This reply was modified 7 years ago by IncognitoCEO.
I installed the code using the “My Custom Functions” plugin from the directions. Here’s a link to a screenshot of what id did. Thank you so much Matt:-) https://americansyndicate.org/wp-content/uploads/2017/11/custom-php.jpg
I used the php inserter plugin and it still displays “Show Terms.” https://americansyndicate.org
Forum: Plugins
In reply to: [Show Stock Quotes by 99 Robots] Prices not showingHi. The prices are not showing. This happened after we set up COMODO SSL cert. The plugin is used at https://contemporarytrader.com/the-peoples-portfolio/
Thanks
Forum: Reviews
In reply to: [rtMedia for WordPress, BuddyPress and bbPress] Can not upgrade databaseVery scary guy this Rahul. Be very careful with him and the plugin.
Forum: Reviews
In reply to: [rtMedia for WordPress, BuddyPress and bbPress] New upgrade works great!No, that’s not true. After upgrading, to get your script to work, you asked for $100. Seems like your create upgrades that don’t work to generate revenues. Very tricky!
Then when hundreds complain in public you show up with the fix. How much money did you drag out of small site owners who had no choice but to pay you, or have their site shut down?
Forum: Plugins
In reply to: [BuddyPress Links] [Plugin: BuddyPress Links] Link won't save.WordPress
3.4.2