This file contains 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
#!/bin/bash | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" | |
exit 1 | |
else | |
#Update and Upgrade | |
echo "Updating and Upgrading" | |
apt-get update && sudo apt-get upgrade -y |
This file contains 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
$args = array( | |
'post_type' => 'objekt', | |
'posts_per_page' => -1, | |
'no_found_rows' => true, | |
'suppress_filters' => false, | |
//Se the meta query | |
'meta_query' => array( | |
//comparison between the inner meta fields conditionals | |
'relation' => 'AND', | |
//meta field condition one |
This file contains 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
"terminal.integrated.profiles.windows": { | |
"PowerShell": { | |
"source": "PowerShell", | |
"icon": "terminal-powershell" | |
}, | |
"Command Prompt": { | |
"path": [ | |
"${env:windir}\\Sysnative\\cmd.exe", | |
"${env:windir}\\System32\\cmd.exe" | |
], |
This file contains 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 enqueue_if_block_is_present(){ | |
if(is_singular()){ | |
//We only want the script if it's a singular page | |
$id = get_the_ID(); | |
$theme_version = wp_get_theme()->get( 'Version' ); | |
//load only if the block is on the page | |
if(has_block('acf/slider',$id)){ | |
wp_enqueue_script( 'swiper', get_template_directory_uri() . '/assets/js/swiper-bundle.min.js', | |
array(), $theme_version, |
This file contains 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
// left: 37, up: 38, right: 39, down: 40, | |
// spacebar: 32, pageup: 33, pagedown: 34, end: 35, home: 36 | |
var keys = {37: 1, 38: 1, 39: 1, 40: 1}; | |
function preventDefault(e) { | |
e.preventDefault(); | |
} | |
function preventDefaultForScrollKeys(e) { |
This file contains 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 | |
// for example we start from a variable like this | |
$yyyymmdd = get_field('date'); | |
// set the local time to italian | |
date_default_timezone_set('Europe/Zurich'); | |
$loc_de = setlocale(LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge'); | |
// convert the variable $yyyymmdd to a real date with DateTime |
This file contains 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
// Remove any placeholder from woocommerce filter | |
add_filter ( 'woocommerce_layered_nav_any_label' , 'remove_any' , 10 , 3 ) ; | |
function remove_any ( $sprintf , $taxonomy_label , $taxonomy ) { | |
$sprintf = sprintf ( __ ( '%s' , 'woocommerce' ) , $taxonomy_label ); | |
return $sprintf ; | |
} |
This file contains 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
$found = false; | |
$value = 'Your value'; | |
while ( have_rows( 'your_repeater_field' ) ) : the_row(); | |
if ( get_sub_field( 'your_sub_field' ) == $value ) : | |
$found = true; | |
endif; | |
endwhile; | |
if ( $found ) { | |
// True |
This file contains 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
<!-- Begin Mailchimp Signup Form --> | |
<div id="mc_embed_signup"> | |
<form action="https://sozialprojekte.us20.list-manage.com/subscribe/post?u=c6a36bc935239fbad33999327&id=1e6b4c0434" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate> | |
<div id="mc_embed_signup_scroll"> | |
<div class="mc-field-group"> | |
<input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL" > | |
</div> | |
<div id="mce-responses" class="clear"> | |
<div class="response" id="mce-error-response" style="display:none"></div> | |
<div class="response" id="mce-success-response" style="display:none"></div> |
This file contains 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
.heartbeat { | |
animation: heartbeat 3s infinite; | |
} | |
@keyframes heartbeat { | |
0% { | |
transform: scale(1); | |
} | |
20% { |
NewerOlder