rebase on oct-10-2023
This commit is contained in:
@@ -41,44 +41,43 @@ function wpcf7_akismet( $spam, $submission ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$c = array();
|
||||
|
||||
$c['comment_author'] = $params['author'];
|
||||
$c['comment_author_email'] = $params['author_email'];
|
||||
$c['comment_author_url'] = $params['author_url'];
|
||||
$c['comment_content'] = $params['content'];
|
||||
|
||||
$c['blog'] = get_option( 'home' );
|
||||
$c['blog_lang'] = get_locale();
|
||||
$c['blog_charset'] = get_option( 'blog_charset' );
|
||||
$c['user_ip'] = $_SERVER['REMOTE_ADDR'];
|
||||
$c['user_agent'] = $_SERVER['HTTP_USER_AGENT'];
|
||||
$c['referrer'] = $_SERVER['HTTP_REFERER'];
|
||||
$c['comment_type'] = 'contact-form';
|
||||
$comment = array(
|
||||
'comment_type' => 'contact-form',
|
||||
'comment_author' => $params['author'],
|
||||
'comment_author_email' => $params['author_email'],
|
||||
'comment_author_url' => $params['author_url'],
|
||||
'comment_content' => $params['content'],
|
||||
'blog' => home_url(),
|
||||
'blog_lang' => get_locale(),
|
||||
'blog_charset' => get_option( 'blog_charset' ),
|
||||
'user_ip' => $submission->get_meta( 'remote_ip' ),
|
||||
'user_agent' => $submission->get_meta( 'user_agent' ),
|
||||
'referrer' => isset( $_SERVER['HTTP_REFERER'] )
|
||||
? $_SERVER['HTTP_REFERER'] : '',
|
||||
);
|
||||
|
||||
$datetime = date_create_immutable(
|
||||
'@' . $submission->get_meta( 'timestamp' )
|
||||
);
|
||||
|
||||
if ( $datetime ) {
|
||||
$c['comment_date_gmt'] = $datetime->format( DATE_ATOM );
|
||||
$comment['comment_date_gmt'] = $datetime->format( DATE_ATOM );
|
||||
}
|
||||
|
||||
if ( $permalink = get_permalink() ) {
|
||||
$c['permalink'] = $permalink;
|
||||
$comment['permalink'] = $permalink;
|
||||
}
|
||||
|
||||
$ignore = array( 'HTTP_COOKIE', 'HTTP_COOKIE2', 'PHP_AUTH_PW' );
|
||||
$server_vars = array_diff_key(
|
||||
$_SERVER,
|
||||
array_flip( array( 'HTTP_COOKIE', 'HTTP_COOKIE2', 'PHP_AUTH_PW' ) )
|
||||
);
|
||||
|
||||
foreach ( $_SERVER as $key => $value ) {
|
||||
if ( ! in_array( $key, (array) $ignore ) ) {
|
||||
$c["$key"] = $value;
|
||||
}
|
||||
}
|
||||
$comment = array_merge( $comment, $server_vars );
|
||||
|
||||
$c = apply_filters( 'wpcf7_akismet_parameters', $c );
|
||||
$comment = apply_filters( 'wpcf7_akismet_parameters', $comment );
|
||||
|
||||
if ( wpcf7_akismet_comment_check( $c ) ) {
|
||||
if ( wpcf7_akismet_comment_check( $comment ) ) {
|
||||
$spam = true;
|
||||
|
||||
$submission->add_spam_log( array(
|
||||
|
||||
@@ -1 +1 @@
|
||||
document.addEventListener("DOMContentLoaded",(t=>{var e;wpcf7_recaptcha={...null!==(e=wpcf7_recaptcha)&&void 0!==e?e:{}};const c=wpcf7_recaptcha.sitekey,{homepage:n,contactform:a}=wpcf7_recaptcha.actions,o=t=>{const{action:e,func:n,params:a}=t;grecaptcha.execute(c,{action:e}).then((t=>{const c=new CustomEvent("wpcf7grecaptchaexecuted",{detail:{action:e,token:t}});document.dispatchEvent(c)})).then((()=>{"function"==typeof n&&n(...a)})).catch((t=>console.error(t)))};if(grecaptcha.ready((()=>{o({action:n})})),document.addEventListener("change",(t=>{o({action:a})})),"undefined"!=typeof wpcf7&&"function"==typeof wpcf7.submit){const t=wpcf7.submit;wpcf7.submit=function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o({action:a,func:t,params:[e,c]})}}document.addEventListener("wpcf7grecaptchaexecuted",(t=>{const e=document.querySelectorAll('form.wpcf7-form input[name="_wpcf7_recaptcha_response"]');for(let c=0;c<e.length;c++)e[c].setAttribute("value",t.detail.token)}))}));
|
||||
document.addEventListener("DOMContentLoaded",(t=>{var e;wpcf7_recaptcha={...null!==(e=wpcf7_recaptcha)&&void 0!==e?e:{}};const c=wpcf7_recaptcha.sitekey,{homepage:n,contactform:a}=wpcf7_recaptcha.actions,o=t=>{const{action:e,func:n,params:a}=t;grecaptcha.execute(c,{action:e}).then((t=>{const c=new CustomEvent("wpcf7grecaptchaexecuted",{detail:{action:e,token:t}});document.dispatchEvent(c)})).then((()=>{"function"==typeof n&&n(...a)})).catch((t=>console.error(t)))};if(grecaptcha.ready((()=>{o({action:n})})),document.addEventListener("change",(t=>{o({action:a})})),"undefined"!=typeof wpcf7&&"function"==typeof wpcf7.submit){const t=wpcf7.submit;wpcf7.submit=function(e){o({action:a,func:t,params:[e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}]})}}document.addEventListener("wpcf7grecaptchaexecuted",(t=>{const e=document.querySelectorAll('form.wpcf7-form input[name="_wpcf7_recaptcha_response"]');for(let c=0;c<e.length;c++)e[c].setAttribute("value",t.detail.token)}))}));
|
||||
@@ -98,7 +98,7 @@ function wpcf7_sendinblue_editor_panels( $panels ) {
|
||||
),
|
||||
wpcf7_link(
|
||||
__( 'https://contactform7.com/sendinblue-integration/', 'contact-form-7' ),
|
||||
__( 'Brevo (formerly Sendinblue) integration', 'contact-form-7' )
|
||||
__( 'Brevo integration', 'contact-form-7' )
|
||||
)
|
||||
);
|
||||
|
||||
@@ -106,7 +106,7 @@ function wpcf7_sendinblue_editor_panels( $panels ) {
|
||||
$templates = $service->get_templates();
|
||||
|
||||
?>
|
||||
<h2><?php echo esc_html( __( 'Brevo (formerly Sendinblue)', 'contact-form-7' ) ); ?></h2>
|
||||
<h2><?php echo esc_html( __( 'Brevo', 'contact-form-7' ) ); ?></h2>
|
||||
|
||||
<fieldset>
|
||||
<legend><?php echo $description; ?></legend>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Brevo (formerly Sendinblue) module main file
|
||||
* Brevo module main file
|
||||
*
|
||||
* @link https://contactform7.com/sendinblue-integration/
|
||||
*/
|
||||
|
||||
@@ -27,7 +27,7 @@ class WPCF7_Sendinblue extends WPCF7_Service {
|
||||
}
|
||||
|
||||
public function get_title() {
|
||||
return __( 'Brevo (formerly Sendinblue)', 'contact-form-7' );
|
||||
return __( 'Brevo', 'contact-form-7' );
|
||||
}
|
||||
|
||||
public function is_active() {
|
||||
@@ -47,7 +47,7 @@ class WPCF7_Sendinblue extends WPCF7_Service {
|
||||
|
||||
public function link() {
|
||||
echo wpcf7_link(
|
||||
'https://www.brevo.com/?tap_a=30591-fb13f0&tap_s=1031580-b1bb1d',
|
||||
'https://www.brevo.com/',
|
||||
'brevo.com'
|
||||
);
|
||||
}
|
||||
@@ -153,7 +153,7 @@ class WPCF7_Sendinblue extends WPCF7_Service {
|
||||
'<p><strong>%s</strong></p>',
|
||||
wpcf7_link(
|
||||
__( 'https://contactform7.com/sendinblue-integration/', 'contact-form-7' ),
|
||||
__( 'Brevo (formerly Sendinblue) integration', 'contact-form-7' )
|
||||
__( 'Brevo integration', 'contact-form-7' )
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
class WPCF7_Stripe_API {
|
||||
|
||||
const api_version = '2022-08-01';
|
||||
const api_version = '2022-11-15';
|
||||
const partner_id = 'pp_partner_HHbvqLh1AaO7Am';
|
||||
const app_name = 'WordPress Contact Form 7';
|
||||
const app_url = 'https://contactform7.com/stripe-integration/';
|
||||
|
||||
Reference in New Issue
Block a user