File tree Expand file tree Collapse file tree
wordpress/wp-content/themes/les-verts Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6969 "key" : " field_5b6c097794180" ,
7070 "label" : " Email" ,
7171 "name" : " email" ,
72- "type" : " email " ,
72+ "type" : " text " ,
7373 "instructions" : " " ,
7474 "required" : 0 ,
7575 "conditional_logic" : 0 ,
Original file line number Diff line number Diff line change 61736173 'label ' => __ ( 'Email ' , 'lesverts ' ),
61746174 'name ' => 'email ' ,
61756175 'aria-label ' => '' ,
6176- 'type ' => 'email ' ,
6176+ 'type ' => 'text ' ,
61776177 'instructions ' => '' ,
61786178 'required ' => 0 ,
61796179 'conditional_logic ' => 0 ,
Original file line number Diff line number Diff line change 222222require_once __DIR__ . '/twig/functions/image-handling.php ' ;
223223
224224// filters
225+ require_once __DIR__ . '/twig/filters/shortcode.php ' ;
225226require_once __DIR__ . '/twig/filters/email.php ' ;
226227require_once __DIR__ . '/twig/filters/phone.php ' ;
227228require_once __DIR__ . '/twig/filters/social_link.php ' ;
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace SUPT ;
4+
5+ use Twig \TwigFilter ;
6+
7+ add_filter ( 'get_twig ' , function ( $ twig ) {
8+ $ twig ->addFilter (
9+ new TwigFilter ( 'shortcode ' , function ( $ string ) {
10+ if ( ! empty ( $ string ) && is_string ( $ string ) ) {
11+ return do_shortcode ( $ string );
12+ }
13+ return $ string ;
14+ } )
15+ );
16+
17+ return $ twig ;
18+ } );
Original file line number Diff line number Diff line change 11{% if ' email' == acf_fc_layout %}
2- <a href =" {{email | email| hexencode}}" class =" a-contact a-contact--email" >{{email | hexencode}}</a >
2+ {% if ' [' in email %}
3+ {# Shortcode detected - let plugin handle everything #}
4+ <div class =" a-contact a-contact--email" >{{email | shortcode| raw }}</div >
5+ {% else %}
6+ {# Plain email - create normal link #}
7+ <a href =" {{email | email| hexencode}}" class =" a-contact a-contact--email" >{{email | hexencode}}</a >
8+ {% endif %}
39{% endif %}
410
511{% if ' phone' == acf_fc_layout %}
6- <a href =" {{phone | phone}}" class =" a-contact a-contact--phone" >{{phone }}</a >
12+ {% if ' [' in phone %}
13+ {# Shortcode detected - let plugin handle everything #}
14+ <div class =" a-contact a-contact--phone" >{{phone | shortcode| raw }}</div >
15+ {% else %}
16+ {# Plain phone - create normal link #}
17+ <a href =" {{phone | phone}}" class =" a-contact a-contact--phone" >{{phone }}</a >
18+ {% endif %}
719{% endif %}
820
921{% if ' website' == acf_fc_layout %}
You can’t perform that action at this time.
0 commit comments