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
    
  
  
    
  | <?php | |
| //Custom acf endpoint; | |
| function add_acf_field_rest( $request_data ) { | |
| // setup query argument | |
| $args = array( | |
| 'post_type' => 'cpt_territory', | |
| 'posts_per_page' => -1 | |
| ); | 
  
    
      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
    
  
  
    
  | <?php | |
| $html = $block['innerHTML']; | |
| preg_match_all('/<figcaption>(.*?)<\/figcaption>/s', $html, $match); | |
| $legende = $match[0]; | 
  
    
      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
    
  
  
    
  | <?php | |
| $url = 'url'; | |
| parse_str( parse_url( $url, PHP_URL_QUERY ), $my_array_of_vars ); | |
| $videoId= $my_array_of_vars['v']; | 
  
    
      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
    
  
  
    
  | <?php | |
| /** | |
| * Get Vimeo video id from url | |
| * | |
| * Supported url formats - | |
| * | |
| * https://vimeo.com/11111111 | |
| * http://vimeo.com/11111111 | 
  
    
      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
    
  
  
    
  | <?php | |
| // Displays comma separated taxonomy terms. | |
| function entry_terms() { | |
| $terms = get_the_terms( get_the_ID() , 'tags-name' ); | |
| if ( ! empty( $terms ) ) { | |
| echo '<p class="entry-meta"><span class="entry-terms">'; | |
| foreach ( $terms as $term ) { | |
| $entry_terms .= $term->name . ', '; | |
| } | 
  
    
      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
    
  
  
    
  | <?php | |
| // Flux RSS | |
| add_filter( 'request', 'gkp_add_cpts_to_rss_feed' ); | |
| function gkp_add_cpts_to_rss_feed( $args ) { | |
| if ( isset( $args['feed'] ) && !isset( $args['post_type'] ) ) | |
| $args['post_type'] = array('post', 'actualites'); | |
| return $args; | 
  
    
      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
    
  
  
    
  | <?php | |
| function terms_list($taxonomy, $orderby, $order, $empty = true, $type = "radio") | |
| { | |
| $term_args = array( | |
| 'orderby' => $orderby, | |
| 'order' => $order, | |
| 'hide_empty' => $empty, | |
| ); | 
  
    
      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
    
  
  
    
  | // $('.wrapper-big-map').append('<div class="tooltip-svg-click"><div class="tooltip-svg-content"><span class="tooltip-close">X</span><h2 class="tooltip-heading"></h2></div><span class="arrow"></span></div>'); | |
| var tooltip = $('.tooltip-map'); | |
| $('g[id^=region_]').on('click', function (e) { | |
| var tt = $(this).attr('id'); | 
  
    
      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
    
  
  
    
  | addEventListener("DOMContentLoaded", (event) => { | |
| console.log(window._axcb); | |
| (_axcb = window._axcb || []).push(function(sdk) { | |
| sdk.on('cookies:complete', function(choices) { | |
| document | |
| .querySelectorAll('[data-hide-on-vendor-consent]') | |
| .forEach(el => { | |
| const vendor = el.getAttribute('data-hide-on-vendor-consent'); | |
| el.style.display = choices[vendor] ? 'none' : 'inherit'; | |
| }); |