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
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
add_filter( 'wpcf7_form_class_attr', 'rl_wpcf7_form_class_attr' ); | |
function rl_wpcf7_form_class_attr( $content ) { | |
$rl_formfind = '/wpcf7-form/'; | |
$rl_formreplace = 'wpcf7-form customClass'; | |
$content = preg_replace( $rl_formfind, $rl_formreplace, $content ); | |
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
// Detect OS and set body class | |
var OSName="os-unknown"; | |
if (navigator.appVersion.indexOf("Win")!=-1) OSName="os-windows"; | |
else if (navigator.appVersion.indexOf("Mac")!=-1) OSName="os-mac"; | |
else if (navigator.appVersion.indexOf("X11")!=-1) OSName="os-unix"; | |
else if (navigator.appVersion.indexOf("Linux")!=-1) OSName="os-linux"; | |
$('body').addClass(OSName); |
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
RewriteEngine On | |
RewriteCond %{HTTPS} !=on | |
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] |
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
/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ | |
// testing a string | |
var PatternEmail = new RegExp(''); | |
var str = '[email protected]'; | |
var res = PatternEmail.test(str); | |
console.log(res); |
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_block_category( $categories, $post ) { | |
return array_merge( | |
$categories, | |
array( | |
array( | |
'slug' => 'custom', | |
'title' => __( 'Custom Blocks', 'custom-blocks' ), | |
), | |
) | |
); |
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_acf_swatches() { | |
?> | |
<script type="text/javascript"> | |
(function($) { | |
acf.add_filter('color_picker_args', function( args, $field ){ | |
// add the hexadecimal codes here for the colors you want to appear as swatches | |
args.palettes = ['#2facbf', '#474747']; |
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
<h1><?php the_field('marker','option'); ?></h1> | |
<?php | |
$location = get_field('google_map'); | |
if( !empty($location) ): | |
?> | |
<div class="acf-map vv"> | |
<div class="marker" data-lat="<?php echo $location['lat']; ?>" data-lng="<?php echo $location['lng']; ?>"></div> | |
</div> | |
<?php endif; ?> |
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
/* disable mobile phone landscape */ | |
@media only screen and (max-device-width: 820px) and (orientation: landscape) { | |
body { | |
width: 100%; | |
height: 100vh; | |
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE5LjIuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkViZW5lXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAxNzggMTc4IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAxNzggMTc4IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPGc+Cgk8Zz4KCQk8cGF0aCBmaWxsPSIjRDJEMkQyIiBkPSJNODguNywxNzAuNUgzMi42Yy0wLjYsMC0xLTAuNC0xLTFWOTUuMWMwLTAuNiwwLjQtMSwxLTFoNTR2LTcuNUgxNWMtOC4zLDAtMTUsNi43LTE1LDE1VjE2MwoJCQljMCw4LjMsNi43LDE1LDE1LDE1aDg2LjdDOTYuMSwxN |