Skip to content

Instantly share code, notes, and snippets.

Matt Cram cramdesign

Block or report user

Report or block cramdesign

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View hide-editor.php
<?php
/**
* Hide editor on specific pages.
*
*/
function hide_editor() {
global $pagenow;
if( !( 'post.php' == $pagenow ) ) return;
@cramdesign
cramdesign / toggle.js
Last active Aug 29, 2015
A simple javascript function to toggle a class on/off. No need for jquery to build a simple responsive menu or somewhat.
View toggle.js
toggleClass = function( el, className ) {
if ( el.classList ) {
el.classList.toggle( className );
} else {
var classes = el.className.split( ' ' );
var existingIndex = classes.indexOf( className );
@cramdesign
cramdesign / gallery-style.css
Created Apr 16, 2014
WordPress 3.9 ships with the ability to add HTML5 support for galleries which will now use figure and figcaption to display images. This is a huge change for the better! Bonus: br tag used for clearing rows has been cleaned out as well. While all of this is good news for more semantic markup, one might now be left wondering how to style the new …
View gallery-style.css
You can’t perform that action at this time.