Skip to content

Instantly share code, notes, and snippets.

View jonwaldstein's full-sized avatar

Jon Waldstein jonwaldstein

View GitHub Profile
@tyxla
tyxla / page.php
Created February 24, 2016 07:31
Displaying nested complex Carbon Fields in the front-end templates
<?php $sections = carbon_get_post_meta( get_the_ID(), 'lk_section', 'complex' ); ?>
<?php if ( ! empty( $sections ) ): ?>
<?php foreach ( $sections as $section ): ?>
<section class="<?php echo esc_attr( $section['class'] ); ?>">
<?php if ( ! empty( $section['lk_row'] ) ): ?>
<?php foreach ( $section['lk_row'] as $row ): ?>
<div class="<?php echo esc_attr( $row['class'] ); ?>">
<?php if ( ! empty( $row['lk_column'] ) ): ?>
@aaronranard
aaronranard / _icons-material-design.scss
Created June 16, 2015 16:03
SCSS: Materialize icons gulp build fix
$font-mdi : 'Material-Design-Icons';
$mdi-prefix : 'mdi-';
@font-face {
font-family: "#{$font-mdi}";
src:url("#{$icons-font-path}#{$font-mdi}.eot?#iefix") format("embedded-opentype"),
url("#{$icons-font-path}#{$font-mdi}.woff2") format("woff2"),
url("#{$icons-font-path}#{$font-mdi}.woff") format("woff"),
url("#{$icons-font-path}#{$font-mdi}.ttf") format("truetype"),
url("#{$icons-font-path}#{$font-mdi}.svg##{$font-mdi}") format("svg");
@ajithrn
ajithrn / soil-nav walker.php
Last active April 20, 2017 02:31
WordPress: Soli Nav walker Modified
<?php
/*
* Modified soil nav walker to add the missing dropdown to the parent li of the ul.sub-menu
*/
namespace Roots\Soil\Nav;
use Roots\Soil\Utils;
/**
@Shelob9
Shelob9 / gist:790bffe185117bc75d57
Created May 12, 2015 06:05
Example Caldera Forms eCommerce form export from https://calderawp.com/?p=2720
{"_last_updated":"Tue, 12 May 2015 05:18:11 +0000","ID":"CF5551769e70a4b","name":"Payment Form","description":"","db_support":1,"pinned":0,"hide_form":1,"check_honey":1,"success":"Form has been successfully submitted. Thank you.","avatar_field":"","form_ajax":1,"custom_callback":"","form_visibility":"all","layout_grid":{"fields":{"fld_3223718":"1:1","fld_8431896":"1:2","fld_4376249":"2:1","fld_8317094":"2:2","fld_1340576":"3:1","fld_5857405":"3:2","fld_4079097":"4:1","fld_3162303":"4:2","fld_5246134":"5:1","fld_3820882":"5:2","fld_1823480":"6:1","fld_4866360":"6:2","fld_5451980":"6:2","fld_8097502":"6:2"},"structure":"8:4|6:6|6:6|6:6|6:6|6:6"},"fields":{"fld_3223718":{"ID":"fld_3223718","type":"html","label":"log_in_message","slug":"log_in_message","caption":"","config":{"custom_class":"","visibility":"public","default":"You must be logged in before making a purchase."},"conditions":{"type":""}},"fld_8431896":{"ID":"fld_8431896","type":"toggle_switch","label":"Login Or Register","slug":"login_or_register","ca
@primozcigler
primozcigler / class-pt-customize-control-range.php
Created March 17, 2015 10:07
Footer widgets layout customizer control.
<?php
/**
* Range Control Class
*/
class WP_Customize_Range_Control extends WP_Customize_Control {
/**
* @access public
* @var string
@fitzhaile
fitzhaile / bem-nav.php
Last active April 17, 2017 15:26
Alternative BEM-based lib/nav.php for Roots Theme
<?php
/**
* Cleaner, BEM-based walker for wp_nav_menu()
*
* (Attempts to adhere more to http://cssguidelin.es.)
*
* NOTE: This apprroach requires substitute arguments to be passed to wp_nav_menu().
*
* 'nav_class' - Class attached to the <nav> element that contains the menu.
* It is used to generate classes for the ul, li and anchor elements. For example,
@alojzije
alojzije / connectHTMLelements_SVG.png
Last active May 31, 2025 12:39
Connect two elements / draw a path between two elements with SVG path (using jQuery)
connectHTMLelements_SVG.png
@natelandau
natelandau / .bash_profile
Last active August 5, 2025 02:53
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@MoOx
MoOx / createElement.js
Last active June 18, 2024 10:23
A tiny helper for document.createElement.
module.exports = function(options) {
var el
, a
, i
if (!options.tagName) {
el = document.createDocumentFragment()
}
else {
el = document.createElement(options.tagName)
if (options.className) {
@forgeandsmith
forgeandsmith / Gravity Forms Reset Styles
Last active June 22, 2021 07:33
Gravity Forms SCSS reset styles for easy style editing and management
///////////////////////////////////////////////
////// GRAVITY FORMS RESET STYLES //////
///////////////////////////////////////////////
// These styles are made in mind to be used with SCSS or LESS
// If you use these styles, you must go to the Gravity Forms settings in the WordPress back end and set Output CSS to No.
////----- Core Containers
.gform_heading,
.gform_body,