This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action('fluentcrm_subscriber_status_to_unsubscribed', 'emailAfterUnsubscribed', 10, 2); | |
function emailAfterUnsubscribed($subscriber, $oldStatus){ | |
$req = FluentCrm('request'); | |
$reason = sanitize_text_field($req->get('reason')); | |
if ($reason == 'other') { | |
if ($otherReason = $req->get('other_reason')) { | |
$reason = sanitize_text_field($otherReason); | |
} | |
} else if($reason){ | |
if ( method_exists('ExternalPages', 'unsubscribeReasons' ) ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('fluentcrm_disable_email_open_tracking', '__return_true'); | |
add_filter('fluentcrm_track_click', '__return_false'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('fluentform_nonce_verify', '__return_false'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('fluentform_numeric_styles',function($old){ | |
$new['dot_space_style']= array( | |
'value' => 'dot_space_style', | |
'label' => __('EU Style with Decimal (Ex: 123 456,00)', 'fluentform'), | |
'settings' => [ | |
'decimal' => ',', | |
'separator' => ' ', | |
'precision' => 2, | |
'symbol' => '' | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('fluentform_uploaded_file_name', function($file, $originalArray){ | |
unset($file); //Use to remove the uniqid from the file name don't unset this if you want the file name as a unique one | |
return $originalArray; | |
},10,2); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$types = [ | |
'gdpr_agreement', | |
'terms_and_condition', | |
]; | |
foreach($types as $type){ | |
add_filter('fluentform_response_render_'.$type,'changeGdprText',20,4); | |
} | |
function changeGdprText($response, $field, $form_id, $isLabel){ | |
if($form_id=36){ | |
$response = 'True'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('fluentform_insert_response_data', 'ff_custom_response_data_filter_function', 10, 3); | |
function ff_custom_response_data_filter_function($formData, $formId, $inputConfigs) | |
{ | |
if($formId = 12 || 22) { | |
$names = $formData['names'] = array_map('strtoupper', $formData['names']); | |
unset($formData['names']); | |
$others = $formData = array_map('strtoupper', $formData); | |
$others['names'] = $names; | |
return $others; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'fluentcrm_contact_types', 'custom_contact_type' ); | |
function custom_contact_type($array) { | |
return array_merge( $array, array( 'one', 'two' ) ); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('fluentform_step_string', function($text){ | |
$text = __('Step %activeStep% of %totalStep%', 'fluentform'); | |
return $text; | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('fluentform_validate_input_item_input_email', function($errorMessage, $field, $formData, $fields, $form) { | |
$targeted_forms =[22,23,24,25]; | |
$target_form_id = 0; | |
foreach ($targeted_forms as $id){ | |
if($form->id == $id){ | |
$target_form_id = $id; | |
} | |
} | |
if($form->id != $target_form_id ) { |