fredleput
Forum Replies Created
-
Hi, thx for reply.
Here’s my custom conditionnal placeholders function :// conditionnal tag for contact custom field in events function em_event_output_condition_filter($replacement, $condition, $match, $EM_Event){ // Checks for has_contact-nom conditional if(is_object($EM_Event) && preg_match('/^has_(contact-nom)$/', $condition, $matches)){ if(array_key_exists($matches[1], $EM_Event->event_attributes) && !empty($EM_Event->event_attributes[$matches[1]]) ){ $replacement = preg_replace("/\{\/?$condition\}/", '', $match); }else{ $replacement = ''; } } // Checks for has_contact-tel conditional if(is_object($EM_Event) && preg_match('/^has_(contact-tel)$/', $condition, $matches)){ if(array_key_exists($matches[1], $EM_Event->event_attributes) && !empty($EM_Event->event_attributes[$matches[1]]) ){ $replacement = preg_replace("/\{\/?$condition\}/", '', $match); }else{ $replacement = ''; } } // Checks for has_contact-email conditional if(is_object($EM_Event) && preg_match('/^has_(contact-mail)$/', $condition, $matches)){ if(array_key_exists($matches[1], $EM_Event->event_attributes) && !empty($EM_Event->event_attributes[$matches[1]]) ){ $replacement = preg_replace("/\{\/?$condition\}/", '', $match); }else{ $replacement = ''; } } return $replacement; } add_filter('em_event_output_condition', 'em_event_output_condition_filter', 1, 4);
Will try to it by myself but any help is appreciated ??
i have to do it cause i ha ve to delete files from previous host…
Forum: Plugins
In reply to: [Email Subscribers - Group Selector] Duplicate ID _wpnonce detectedCool let me know when you’ll have the plugin updated. And thx
Forum: Plugins
In reply to: [Email Subscribers - Group Selector] Duplicate ID _wpnonce detectedYes it works great ! but i think the problem is the same in other files as far you use wp_nonce_field…
Forum: Plugins
In reply to: [Email Subscribers - Group Selector] Duplicate ID _wpnonce detectedproblem solved and fixed. It’s the code at line 751 of es-af-register.php
original code is :
$es_af = $es_af . wp_nonce_field('es_af_form_subscribers');
and it should be
$es_af = $es_af . wp_nonce_field('es_af_form_subscribers', '_wpnonce', true, false);
see documentation of wp_noncefield for detailsForum: Plugins
In reply to: [Email Subscribers - Group Selector] Duplicate ID _wpnonce detectederror found and fixed. It’s the code which is at line 751 of file es-af-register.php
$es_af = $es_af . wp_nonce_field('es_af_form_subscribers');
should be
$es_af = $es_af . wp_nonce_field('es_af_form_subscribers', '_wpnonce', true, false);
see herewp_nonce_field( $action, $name, $referer, $echo )
last parameter is for echo the field and is true by default so it’s written twice
Forum: Plugins
In reply to: [Email Subscribers - Group Selector] Duplicate ID _wpnonce detectedhi and thx for help, here’s the code i use in my sidebar.php file :
<div id="inscription-wrapper" class="widget"> <h2 class="widget-title"><i class="fa fa-pencil"></i> S'inscrire !</h2> <div class="mail-subscriber"> <?php echo do_shortcode("[email-subscribers-advanced-form id=\"1\"]"); ?> </div> </div>
Forum: Plugins
In reply to: [Email Subscribers - Group Selector] Duplicate ID _wpnonce detectedHi,
I have the same issue with the shortcodedo_shortcode("[email-subscribers-advanced-form id=\"1\"]");
and here is the html which is generated
<div class="inscription"><input type="hidden" value="bd0c5d0698" name="_wpnonce" id="_wpnonce"><input type="hidden" value="/maquettes_cyber/ploubazlanec/" name="_wp_http_referer"><form action="/maquettes_cyber/ploubazlanec/#inscription" id="inscription" method="post"><p>Restez informé des dernières actualités : si une actualité est publiée sur le site vous recevrez un email !</p><p><label for="es_af_txt_em">Votre email<sup>*</sup> :</label><input type="text" maxlength="225" value="" id="es_af_txt_em" name="es_af_txt_em" class="es_af_tb_css form-control"></p><p><input type="submit" value="S'inscrire" id="es_af_btn" name="es_af_btn" class="es_af_bt_css btn btn-block btn-primary"></p><input type="hidden" value="bd0c5d0698" name="_wpnonce" id="_wpnonce"><input type="hidden" value="/maquettes_cyber/ploubazlanec/" name="_wp_http_referer"></form></div>
Please help