Skip to content

Instantly share code, notes, and snippets.

@bearded-avenger
bearded-avenger / long-form-helper.php
Last active December 24, 2015 08:39
Long Form Helper - Plugin
<?php
/*
Author: Nick Haskins
Author URI: http://nickhaskins.co
Plugin Name: Long Form Helper
Plugin URI: http://nickhaskins.co
Version: 1.0
Description: A helper plugin for long posts by introducing a "scroll to" floating panel.
*/
@bearded-avenger
bearded-avenger / style.less
Created October 1, 2013 00:48
Long Form Helper - style.less file - goes with https://gist.github.com/bearded-avenger/6772441
.article-wrap {
position: relative;
}
.scroll-nav {
}
.scroll-nav{
@size: 12px;
@bg: @baseContrastSlight;
@bearded-avenger
bearded-avenger / 0_reuse_code.js
Created November 4, 2013 22:34
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
$meta_boxes[] = array(
'title' => __('Flacker Front Page Meta', 'fotos'),
'pages' => 'page',
'show_on' => array( 'page-template' => 'front-page.php' ),
'fields' => array(
array(
'id' => 'flacker_info_module',
'name' => __('Info Module', 'flacker'),
'type' => 'group',
'repeatable' => true,
@bearded-avenger
bearded-avenger / sharedcounts.php
Created December 19, 2013 16:04
Get total share counts of a Wordpress post and cache with transient.
function aesop_share_count(){
$post_id = get_the_ID();
//$url = 'http://nickhaskins.co'; // this one used for testing to return a working result
$url = get_permalink();
$apiurl = sprintf('http://api.sharedcount.com/?url=%s',$url);
@bearded-avenger
bearded-avenger / sslcontrol.php
Created December 19, 2013 16:41
Do SSL only on checkout page in Wordpress.
<?php
/**
* SSL Controls
*/
class flackerSSLControl {
function __construct(){
add_action( 'template_redirect', array($this,'url_change' ),1);
@bearded-avenger
bearded-avenger / Gruntfile.js
Last active January 2, 2016 21:29
CG Cookie GruntFile
'use strict';
module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
grunt.initConfig({
// watch our project for changes
watch: {
compass: {
@bearded-avenger
bearded-avenger / index.html
Last active January 2, 2016 23:29
CrowdHoster Campaign Theme
<!-- Start Aesop Crowdhoster -->
<blockquote>
<p>...one of the most beautiful tools for Wordpress that I&#39;ve seen in a long time.</p>
<cite>- <a href="http://wptavern.com/aesop-story-engine-an-open-source-wordpress-plugin-for-storytelling">WP Tavern</a></cite></blockquote>
<blockquote>
<p>...a potentially seismic shift in content creation and the biggest thing to hit WP for ages.</p>
<cite>- <a href="http://wptavern.com/aesop-story-engine-an-open-source-wordpress-plugin-for-storytelling#comment-50657">Chris Knowles</a></cite></blockquote>
<blockquote>
@bearded-avenger
bearded-avenger / edd-settings-example.php
Last active January 15, 2016 21:03
This sample class shows how 3rd party devs can add a tab to Easy Digital Downloads wp-admin settings tab, along with how to use the EDD Settings API. NOW AS A REPO https://github.com/bearded-avenger/edd-settings-api-sample
<?php
class sampleClass {
function __construct() {
add_filter( 'edd_settings_tabs', array($this,'test_tab' ));
add_action('admin_init', array($this,'edd_register_settings_test'));
}
@bearded-avenger
bearded-avenger / gist:f478639cbf0847c48230
Last active February 27, 2016 09:32
Aesop Story Engine - Full Screen Components in Genesis
.aesop-on-genesis .site-inner{
max-width:100%;
}
.aesop-on-genesis .entry {
padding-left:0;
padding-right:0;
}
.aesop-on-genesis .entry-header,
.aesop-on-genesis .entry-content > *:not(.aesop-component) {
width: 100%;