Skip to content

Instantly share code, notes, and snippets.

View lisandi's full-sized avatar

Andreas Becker lisandi

View GitHub Profile
@lisandi
lisandi / divi-mobile-submenu-toggles.css
Created March 8, 2018 01:57 — forked from Garconis/divi-mobile-submenu-toggles.css
Divi | WordPress Theme | Mobile Menu Collapsible Submenus via Toggles | CSS & jQuery Tweaks in action: https://i.gyazo.com/93557e9ef5d4aad260e22c6d5896de3b.mp4
/* when mobile menu is open, change hamburger icon to x icon */
#et_mobile_nav_menu .mobile_nav.opened .mobile_menu_bar::before {
content: '\4d';
}
/* makes sub sub menu icon be right arrow instead of down arrow */
#top-menu .menu-item-has-children .menu-item-has-children > a:first-child::after,
#et-secondary-nav .menu-item-has-children .menu-item-has-children > a:first-child::after {
content: '5';
}
@lisandi
lisandi / jpopt.sh
Created September 5, 2016 07:32 — forked from johan/jpopt.sh
jpopt is a convenience shell wrapper around jhead and jpegtran, for losslessly shrinking jpeg files in batch, written by Fredrik Mellström.
#! /bin/sh
# Lossless repacking of JPEG images, to save disk space
# Keeps EXIF tags and comments on digital camera images, otherwise wipes them
# Requires the "jhead" program to function properly
# Keeps file timestamps, or sets file time to EXIF timestamp if present
# Fredrik Mellström <traal@chalmers.se>, Aug 2005
# Usage examples:
# jpopt *.jpg
<?php
$out = '';
// create a new form field (also field wrapper)
$form = $modules->get("InputfieldForm");
$form->action = "./";
$form->method = "post";
$form->attr("id+name",'subscribe-form');
<?php
// ------------------------------ FORM Processing ---------------------------------------
$errors = null;
$success = false;
// helper function to format form errors
function showError($e){
return "<p class='error'>$e</p>";