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( 'wpcf7_form_elements', 'rl_wpcf7_form_elements' ); | |
| function rl_wpcf7_form_elements( $content ) { | |
| // replace element with preg_replace | |
| $rl_pfind = '/<label>/'; | |
| $rl_preplace = '<label class="wpcf7-label">'; | |
| $content = preg_replace( $rl_pfind, $rl_preplace, $content, 2 ); | |
| return $content; | |
| } | 
  
    
      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
    
  
  
    
  | <select name="countryChoice"> | |
| <option value="Schweiz">Schweiz</option> | |
| <option value="Deutschland">Deutschland</option> | |
| <option value="Österreich">Österreich</option> | |
| <option value="Italien">Italy</option> | |
| <option value="">...</option> | |
| <option value="Afghanistan">Afghanistan</option> | |
| <option value="Ägypten">Egypt</option> | |
| <option value="Aland">Åland Islands</option> | |
| <option value="Albanien">Albania</option> | 
  
    
      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
    
  
  
    
  | function add_file_types_to_uploads($file_types){ | |
| $new_filetypes = array(); | |
| $new_filetypes['svg'] = 'image/svg+xml'; | |
| $file_types = array_merge($file_types, $new_filetypes ); | |
| return $file_types; | |
| } | |
| add_action('upload_mimes', 'add_file_types_to_uploads'); | 
  
    
      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
    
  
  
    
  | @-moz-keyframes bounce { | |
| 0%, 20%, 50%, 80%, 100% { | |
| -moz-transform: translateY(0); | |
| transform: translateY(0); | |
| } | |
| 40% { | |
| -moz-transform: translateY(-10px); | |
| transform: translateY(-10px); | |
| } | |
| 60% { | 
  
    
      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
    
  
  
    
  | //Enable Google API key for ACF | |
| function my_acf_google_init() { | |
| acf_update_setting('google_api_key', 'XXXXXXXXXXXXXXXXXXX'); | |
| } | |
| add_action('acf/init', 'my_acf_google_init'); | 
  
    
      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
    
  
  
    
  | function custom_gutenberg_category( $categories, $post ) { | |
| return array_merge( | |
| $categories, | |
| array( | |
| array( | |
| 'slug' => 'custom', | |
| 'title' => __( 'Custom', 'custom' ), | |
| ), | |
| ) | |
| ); | 
  
    
      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 | |
| // Remove Unnecessary Code from wp_head | |
| remove_action('wp_head', 'rsd_link'); | |
| remove_action('wp_head', 'wlwmanifest_link'); | |
| remove_action('wp_head', 'wp_generator'); | |
| remove_action( 'wp_head', 'wp_shortlink_wp_head'); | |
| remove_action('wp_head', 'start_post_rel_link'); | |
| remove_action('wp_head', 'index_rel_link'); | |
| remove_action('wp_head', 'adjacent_posts_rel_link'); | 
  
    
      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
    
  
  
    
  | // with post object by id | |
| $post = get_post(12); // specific post ID | |
| $the_content = apply_filters('the_content', $post->post_content); | |
| if ( !empty($the_content) ) { | |
| echo $the_content; | |
| } | 
  
    
      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
    
  
  
    
  | /* Convert hexdec color string to rgb(a) string */ | |
| function hex2rgba($color, $opacity = false) { | |
| $default = 'rgb(0,0,0)'; | |
| //Return default if no color provided | |
| if(empty($color)) | |
| return $default; | |
| //Sanitize $color if "#" is provided |