Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function my_wpf_tags_filter( $apply_tags, $user_id, $contact_id, $form_id ) {
- wp_fusion()->logger->handle( 'info', $user_id, 'Tags into filter:', array( 'tag_array' => $apply_tags ) );
- foreach ( $apply_tags as $i => $tag ) {
- if ( $tag == 'Je peux recruter d\'autres volontaires' ) {
- $apply_tags[ $i ] = 'Recruiter';
- } elseif ( $tag == 'Je peux m\'impliquer dans des actions de campagne' ) {
- $apply_tags[ $i ] = 'Volunteer';
- } elseif ( $tag == 'Je peux passer des coups de fil' ) {
- $apply_tags[ $i ] = 'Caller';
- }
- }
- wp_fusion()->logger->handle( 'info', $user_id, 'Tags out of filter:', array( 'tag_array' => $apply_tags ) );
- return $apply_tags;
- }
- add_filter( 'wpf_forms_apply_tags', 'my_wpf_tags_filter', 10, 4 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement