Skip to content

Instantly share code, notes, and snippets.

View Herm71's full-sized avatar
💭
Fold in a dash of butter to prevent shrivelling.

Jason Chafin Herm71

💭
Fold in a dash of butter to prevent shrivelling.
View GitHub Profile
@Herm71
Herm71 / jc-vscode-settings.json
Created August 19, 2021 17:04
jc-vscode-settings
{
"window.menuBarVisibility": "classic",
"phpformatter.composer": false,
"phpformatter.pharPath": "/home/linuxbrew/.linuxbrew/bin/php-cs-fixer",
"php-docblocker.extra": [
"Description",
"@package",
"@since",
"@author Jason Chafin",
"@link http://www.blackbirdconsult.com",
@Herm71
Herm71 / rh-get-widget-data-for-all-sidebars.php
Created July 22, 2018 18:33 — forked from kingkool68/rh-get-widget-data-for-all-sidebars.php
WordPress function to get raw widget data for all of the widgets in a given sidebar
<?php
function rh_get_widget_data_for_all_sidebars() {
global $wp_registered_sidebars;
$output = array();
foreach ( $wp_registered_sidebars as $sidebar ) {
if ( empty( $sidebar['name'] ) ) {
continue;
}
$sidebar_name = $sidebar['name'];
@Herm71
Herm71 / flexslider.htm
Created June 22, 2016 14:21 — forked from AllThingsSmitty/flexslider.htm
Lazy loading images for FlexSlider
<section class="slider">
<div class="flexslider">
<ul class="slides">
<li><img src="http://imgur.com/..." alt=""></li>
<li><img class="lazy" data-src="http://imgur.com/..." alt=""></li>
<li><img class="lazy" data-src="http://imgur.com/..." alt=""></li>
<li><img class="lazy" data-src="http://imgur.com/..." alt=""></li>
<li><img class="lazy" data-src="http://imgur.com/..." alt=""></li>
</ul>
</div>
@Herm71
Herm71 / gist:916bc9481f62845ddc97248a871cab4a
Last active June 13, 2016 18:31
Replace WordPress jQuery with Google Hosted Libraries
/**
* Replace WordPress jQuery with Google Hosted Libraries
* @author Blackbird Consulting/Jason Chafin
* @link https://gist.github.com/Herm71/916bc9481f62845ddc97248a871cab4a
*/
function bb_modify_jquery(){
if (!is_admin()){
// deregister WordPress JQuery
/**
* Remove Query String from Static Resources
* @author Blackbird Consulting/Jason Chafin
* @link https://gist.github.com/Herm71/47f5d0f14d9ca526c95584c94b0050ec
*
* @param $src
* @return modified query string
*/
function _bb_remove_query_string($src){
@Herm71
Herm71 / gist:aac2656130d8a4a5c8c5
Last active August 29, 2015 14:17
wordpress-plugin-header
<?php
/**
* Plugin Name: Blackbird Custom Functionality
* Plugin URI: https://github.com/Herm71/blackbird-core-functionality-plugin.git
* Description: Contains custom functionality. Theme independent.
* Version: 1.1.0
* Author: Blackbird Consulting
* Author URI: http://www.blackbirdconsult.com/
* License: GPL2
*
@Herm71
Herm71 / create.new.project.repo
Last active August 29, 2015 14:07
Step 2: create bare new project repository on work server
blackbird@computer:~/htdocs$ssh bbdev@blackbirdwork.com
#ssh into work server
bbdev@blackbirdwork.com:~/$ cd git
#change into my git archive directory
bbdev@blackbirdwork.com:~/git$ git init --bare new_project_directory.git
#create new bare repository for our new project
bbdev@blackbirdwork.com:~/git$ exit
@Herm71
Herm71 / gist:6954655
Last active December 25, 2015 09:29
Genesis Framework Enable HTML5 Markup
<?php
//* Do NOT include the opening php tag
//* Add HTML5 markup structure
add_theme_support( 'html5' );
@Herm71
Herm71 / Palette
Created December 22, 2012 21:58
Palette Code Snippet
<div style="Palette2">
<style type="text/css">
.color1 { background-color: #474A53}
.color2 { background-color: #21232A}
.color3 { background-color: #F1F0EB}
.color4 { background-color: #95979C}
.color5 { background-color:#DAC8B3}
.clear {clear:both}
.square {