Skip to content

Instantly share code, notes, and snippets.

View electricbrick's full-sized avatar

Tom Finley electricbrick

View GitHub Profile
"typography": {
"fontFamilies": [
{
"fontFamily": "\"Macklin Sans\", Frutiger, \"Frutiger Linotype\", Univers, Calibri, \"Gill Sans\", \"Gill Sans MT\", \"Myriad Pro\", Myriad, \"DejaVu Sans Condensed\", \"Liberation Sans\", \"Nimbus Sans L\", Tahoma, Geneva, \"Helvetica Neue\", Helvetica, Arial, sans-serif",
"slug": "macklin-sans",
"name": "Macklin Sans",
"fontFace": [
{
"fontFamily": "Macklin Sans",
"fontWeight": "100 200 300 400 500 600 700 800 900 950",
@electricbrick
electricbrick / gist:9094bb04728f3ee3dd534927b408076b
Created August 11, 2022 16:59
Twitter Mute Words For Restoring Timeline Sanity and Sanitation
suggest_recycled_tweet_inline
suggestrecycledtweet_inline
suggestpyletweet
suggestactivitytweet
suggest_timeline_tweet
suggest_sc_tweet
suggest_ranked_organic_tweet
suggest_activity_highlights
suggest_activity_feed
suggest_activity
@electricbrick
electricbrick / events-widgets.php
Last active December 4, 2021 01:23
The Events Calendar Pro - Cross-site Events Widget
<?php
if ( ! defined( 'ABSPATH' ) ) die('-1');
/*
* WDG-customized version of the Events Calendar Pro mini calendar widget.
* Changes are noted inline.
* Replacing class name: Tribe__Events__Pro__Mini_CalendarWidget
*/
class MultisiteTribeEventsProMiniCalendarWidget extends WP_Widget {
function __construct() {
@electricbrick
electricbrick / move-excerpt.php
Created June 16, 2015 21:19
WordPress - Move Excerpt Above Content Metabox
/* -----------------------------------------
* Put excerpt meta-box before editor
* ----------------------------------------- */
add_action( 'add_meta_boxes', 'my_add_excerpt_meta_box' );
function my_add_excerpt_meta_box( $post_type ) {
if ( in_array( $post_type, array( 'tribe_events' ) ) ) {
add_meta_box(
'contact_details_meta', __( 'Excerpt' ), 'post_excerpt_meta_box', $post_type, 'test', // change to something other then normal, advanced or side
'high'
@electricbrick
electricbrick / reset-acf-metabox.php
Created September 7, 2017 15:48
Reset ACF Metabox Positions
function prefix_reset_metabox_positions(){
delete_user_meta( 1, 'meta-box-order_post' );
delete_user_meta( 1, 'meta-box-order_page' );
delete_user_meta( 1, 'meta-box-order_custom_post_type' );
}
add_action( 'admin_init', 'prefix_reset_metabox_positions' );
@electricbrick
electricbrick / acf-ms-taxonomy-field-v5.php
Created October 6, 2016 15:11
ACF Multisite Taxonomy Field (5.0+)
<?php
class acf_ms_taxonomy extends acf_field
{
/*
* __construct
*
* This function will setup the field type data
*
<?php
/*
Template Name: Restuarant Menu Template
*/
get_header(); ?>
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
/**
* Finds all Pardot form iframes and appends a ?embedded_on= query parameter to the source.
* Very useful for fixing the crappy issues with pardot tracking...
*/
add_filter( 'pardot_content', 'pardot_iframe_src_filter', 99, 1 );
function pardot_iframe_src_filter( $content ) {
global $post;
$permalink_path = wp_make_link_relative( get_permalink( $post->ID ) );
@electricbrick
electricbrick / gist:b281ecebd36e3682dac9258804c59308
Created February 13, 2018 00:20
Events Calendar Pro + Genesis Sandbox Featured Content Widgets Modifications
//* -------------------------------------------------
// ---------- GSFC + TEC Customization --------------- *//
//* Event Secondary Thumbnail Call
add_action ( 'gsfc_before_post_content', 'add_event_thumb', 1);
function add_event_thumb() {
$attr = array(
'class' => "event-thumb", // set custom class
@electricbrick
electricbrick / automatic-post-picker.php
Last active September 22, 2017 20:06
ACF - Automated Recent Post Picker
<section class="row widget-area post-picker auto <?php the_sub_field( 'css_class' ); the_sub_field( 'background_selector' ); ?>" id="<?php the_sub_field ('block_id'); ?>" <?php if( get_sub_field( 'background_image' ) ) { ?> style="background-image: url(<?php the_sub_field( 'background_image' ); ?>);"<?php } ?> >
<div class="wrap">
<?php if( get_sub_field( 'headline' ) ) { ?>
<h3><?php the_sub_field( 'headline' ); ?></h3>
<?php } ?>
<section class="section news-post"><div class="box wrap">