Skip to content

Instantly share code, notes, and snippets.

View joshmoto's full-sized avatar

J O S H M O T O joshmoto

View GitHub Profile
@joshmoto
joshmoto / input.scss
Created November 5, 2020 01:48
Generated by SassMeister.com.
$sizes_1: (
sm: 768px,
md: 1024px,
lg: 1200px,
xl: 1600px,
gutter: 48px
);
$sizes_2: (
sm: 768,
@joshmoto
joshmoto / input.scss
Created November 5, 2020 01:45
Generated by SassMeister.com.
$sizes_1: (
sm: 768px,
md: 1024px,
lg: 1200px,
xl: 1600px,
gutter: 48px
);
$sizes_2: (
sm: 768,
@joshmoto
joshmoto / input.scss
Last active November 5, 2020 16:28
Generated by SassMeister.com.
$sizes_1: (
sm: 768px,
md: 1024px,
lg: 1200px,
xl: 1600px,
gutter: 48px
);
$sizes_2: (
sm: 768,
<!DOCTYPE html>
<html lang="en">
<head>
<title>Page</title>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
var url = window.location.pathname;
var filename = url.substring(url.lastIndexOf('/')+1);
$("html").addClass( filename.split('.')[0] );
@joshmoto
joshmoto / functions.php
Created September 13, 2019 14:09
Lazy loading images on admin columns for the acf-crop image field using instanceof ACA\ACF\Column
<?php
add_filter('ac/column/value', 'ac_product_img_lazy_loading', 10, 3 );
add_action('admin_footer', 'ac_product_img_lazy_loading_script');
function ac_product_img_lazy_loading( $value, $id, $column ) {
if ( $column instanceof ACA\ACF\Column ) {
$acf_type = $column->get_acf_field_option( 'type' ); // Get the ACF field type
$acf_value = $column->get_raw_value( $id );
@joshmoto
joshmoto / functions.php
Last active September 13, 2019 14:09
Lazy loading images on admin columns for the acf-crop image field using instanceof ACP\Column\CustomField
<?php
add_filter('ac/column/value', 'ac_product_img_lazy_loading', 10, 3 );
add_action('admin_footer', 'ac_product_img_lazy_loading_script');
function ac_product_img_lazy_loading( $value, $id, $column ) {
// if the column is custom field instance
if ( $column instanceof ACP\Column\CustomField ) {
[
-0.7279565557837485,
51.89562541071972
],
[
-0.7281872257590294,
51.89547665114061
],
[
-0.7290029525756836,
@joshmoto
joshmoto / _forms.scss
Last active September 21, 2017 12:46
Gravity Forms SASS overides inconjunction with Jay Hoffmann's `add_bootstrap_container_class` php function.
/**
* @description Gravity Forms SASS overides inconjunction with Jay Hoffmann's add_bootstrap_container_class
*
* @author Jay Hoffmann (modified by Josh Cranwell)
*
* @source https://jayhoffmann.com/using-gravity-forms-bootstrap-styles/
*
* @instructions
* - Gravity Form settings: HTML 5 [true], CSS OUTPUT [false].
* - Repsonsive column classes must be added to each field in the admin to control inputs .col-[screen-size]-[column-count]
@joshmoto
joshmoto / SassMeister-input-HTML.html
Last active February 21, 2016 15:28
Generated by SassMeister.com.
<div class="container-fluid">
<div class="page-header">
<h1 class="fw-300">Lord of the lady dancers</h1>
</div>
<div class="page-header">
<h1 class="fw-300">Lord of the lady dancers</h1>
</div>
@joshmoto
joshmoto / functions.php
Last active August 29, 2015 13:57
fastest way to get array block based on value contained within the block
<?php
// results generator
function node_modify_riders_array($rider_id)
{
$fields = get_field("rider_series_data", $rider_id);
foreach($fields as $field_key => $field_val)
{
$new_fields[$field_val["series"]] = $field_val;