Skip to content

Instantly share code, notes, and snippets.

View stoffl6781's full-sized avatar

Christoph Purin - Stoffl/OE9CPV stoffl6781

View GitHub Profile
@stoffl6781
stoffl6781 / install_wp.bat
Last active April 19, 2024 22:41
WordPress BAT XAMPP Installation
@echo off
setlocal enabledelayedexpansion
echo Checking if XAMPP is installed...
if exist "C:\xampp\xampp-control.exe" (
set XAMPP_DIR=C:\xampp
) else (
echo XAMPP not found at the default location.
set /p XAMPP_DIR="Please enter your XAMPP installation path (e.g., D:\xampp): "
if not exist "!XAMPP_DIR!\xampp-control.exe" (
$args = array(
'post_type' => 'event',
'meta_query' => array(
'relation' => 'AND',
'event_start_date_clause' => array(
'key' => '_event_start_date',
'compare' => 'EXISTS',
),
'event_start_time_clause' => array(
'key' => '_event_start_time',
@stoffl6781
stoffl6781 / code.js
Created November 18, 2021 16:32
Get content from an ID and replace as link on another Button
var email = document.getElementById('text_email').innerText;
(function($) {
$(document).ready(function(){
var button_email = document.getElementById('email_button');
button_email.href = "mailto:"+email+" ";
});
}(jQuery));
@stoffl6781
stoffl6781 / gist:e9551af0b20575b1d61e449b4d75cac3
Created November 18, 2021 16:22
Close Elementor menu popup on click - with binding to one popup and not all
This has the advantage that only this popup is closed. All other popups remain open.
If you want all popups to be closed, the CSS class "elementor-location-popup" must be used
Add Script as HTML Widget to Popup
<script>
jQuery(function($){
$(document).on('click','.<<YOUR CSS POPUP CLASS>> a', function(event){
elementorProFrontend.modules.popup.closePopup( {}, event);
});
@stoffl6781
stoffl6781 / Slide Elementor Widget on Click Event
Created October 19, 2021 13:57
how to display a Widget on click event with slide effect
---------------------- JS Script -----------------------------
JS Script (Place in content as HTML Widget under Content Widet!) - Footer is the best place for it.
<script>
var getbutton = document.getElementById("buttonID"); // insert Button ID
getbutton.addEventListener('click', displayContent);
function displayContent() {
@stoffl6781
stoffl6781 / Slide Text Widget
Last active October 19, 2021 12:34
Add slide Animation to any Elementor Widget without any plugin.
---------------------- JS Script -----------------------------
JS Script (Place in content as HTML Widget)
var content = document.getElementById("showpopup01"); // listener to Column or Element
content.addEventListener('mouseover', mouseOver);
content.addEventListener('mouseout', mouseOut);
function mouseOver() {
@stoffl6781
stoffl6781 / custom-animation-Elementor.php
Created October 18, 2021 13:14
Custom Animation for Elementor - Register to "animation dropdown" your own animation settings.
/*
* add to function.php
*/
function my_entrance_animations() {
return array(
'Custom Slide Animations' => [
'customSlideDown' => 'Custom Slide Down', // 'customSlidedown' = CSS class for style.css
'customSlideleft' => 'Custom Slide Left',
'customSlideleft2' => 'Custom Slide small Left',
@stoffl6781
stoffl6781 / gist:d28ed53e2e350e7b89e78c6e2f2471de
Last active October 18, 2021 13:10
Elementor keyframes for Animation
@keyframes bounce{20%,53%,80%,from,to{animation-timing-function:cubic-bezier(.215,.61,.355,1);transform:translate3d(0,0,0)}40%,43%{animation-timing-function:cubic-bezier(.755,.050,.855,.060);transform:translate3d(0,-30px,0)}70%{animation-timing-function:cubic-bezier(.755,.050,.855,.060);transform:translate3d(0,-15px,0)}90%{transform:translate3d(0,-4px,0)}}.bounce{animation-name:bounce;transform-origin:center bottom}
@keyframes flash{50%,from,to{opacity:1}25%,75%{opacity:0}}.flash{animation-name:flash}
@keyframes pulse{from,to{transform:scale3d(1,1,1)}50%{transform:scale3d(1.05,1.05,1.05)}}.pulse{animation-name:pulse}
@keyframes rubberBand{from,to{transform:scale3d(1,1,1)}30%{transform:scale3d(1.25,.75,1)}40%{transform:scale3d(.75,1.25,1)}50%{transform:scale3d(1.15,.85,1)}65%{transform:scale3d(.95,1.05,1)}75%{transform:scale3d(1.05,.95,1)}}.rubberBand{animation-name:rubberBand}
@keyframes shake{from,to{transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{transform:translate3d(-10px,0,0)}20%,40%,60%,80%{transform:t
// [um_user user_id="123" meta_key="cover_photo" ]
add_filter( 'um_profile_query_make_posts', 'custom_um_profile_query_make_posts', 12, 1 );
add_filter("um_user_shortcode_filter__cover_photo","um_user_shortcode_filter__cover_photo", 10, 3);
function um_user_shortcode_filter__cover_photo( $meta_value, $raw_meta_value, $user_id ){
return UM()->uploader()->get_upload_user_base_url( $user_id )."/".$meta_value;
}
add_filter("um_user_shortcode_filter__profile_photo","um_user_shortcode_filter__profile_photo", 10, 3);
function custom_um_profile_query_make_posts( $args = array() ) {
// Change the post type to our liking.
$args['post_type'] = 'jobs';
return $args;
}