Skip to content

Instantly share code, notes, and snippets.

View rodgerthat's full-sized avatar

Joel R Norris rodgerthat

View GitHub Profile
<?php namespace FSM\Themes\Core\Customizer\Controls;
use Timber;
use WP_Customize_Control;
use FSM\Library\Exceptions\BadResponseException;
use FSM\Library\Exceptions\BadConfigException;
/**
* Customize Fonts Class
*
@rodgerthat
rodgerthat / gist:1a95b0e2a1723f5ae11bb638980a1a59
Last active November 18, 2021 15:42
WP Fatal error: Uncaught Error: Class 'WP_Customize_Control' not found in
Fatal error: Uncaught Error: Class 'WP_Customize_Control' not found in /home/**********/public_html/wp-content/themes/fsm-core/classes/FSM/Themes/Core/Customizer/Controls/Font.php:13 Stack trace: #0 /home/**********/public_html/wp-content/themes/fsm-core/vendor/composer/autoload_real.php(69): require() #1 /home/**********/public_html/wp-content/themes/fsm-core/vendor/composer/autoload_real.php(59): composerRequirea9d1e666569764fdee5c26a21d49aab3('f6c6431ae0a5cec...', '/home/******...') #2 /home/**********/public_html/wp-content/themes/fsm-core/vendor/autoload.php(7): ComposerAutoloaderInita9d1e666569764fdee5c26a21d49aab3::getLoader() #3 /home/**********/public_html/wp-content/themes/fsm-core/functions.php(28): require_once('/home/**********...') #4 /home/**********/public_html/wp-settings.php(546): include('/home/*****...') #5 /home/**********/public_html/wp-config.php(90): require_once('/home/**********...') #6 /home/**********k/public_html/wp-load.php(50): require_once in /home/**********/public_html/wp-con
@rodgerthat
rodgerthat / gist:3854960
Created October 8, 2012 21:02
Change / Modify Default WordPress Query from functions.php using pre_get_posts
/*
* Mod Default Query
*
* get at the default query and make your changes before the template ( or whatever is run )
*
*/
function ahso_default_query_mods( $query ) {
// use conditional tags
if ( is_tax('work_cat') ) {
@rodgerthat
rodgerthat / do_color_classes.php
Created May 3, 2012 15:12
Iterating through an array of class names and adding them to the Post Class
/************* ADDING CLASSES TO POST_CLASS **************/
// every post has a few uniquely colored elements, rather than rely on CSS nth-magic, and to keep things smooth
// and not conflict w/ trying to use jQuery nth-magic in tandem w/ the endless scroll,
// the option is to get the server to do the heavy lifting,
// ideally it would be nice to pass the array of classes to iterate thru into the filter,
/**
*
* @param $classes
* @return array