Skip to content

Instantly share code, notes, and snippets.

View jamigibbs's full-sized avatar

Jami Gibbs jamigibbs

View GitHub Profile
<?php
// Stylesheet Example
wp_enqueue_style('bootstrap', get_template_directory_uri() . '/assets/css/bootstrap.min.css', array(), null, 'all');
// Script Example
wp_enqueue_script('jquery.countdown', get_template_directory_uri() . '/assets/countdown/jquery.countdown.js', array('jquery'), null, true);
<?php
function my_theme_remove_redux_framework_notification() {
if ( class_exists('ReduxFrameworkPlugin') ) {
remove_filter( 'plugin_row_meta', array( ReduxFrameworkPlugin::get_instance(), 'plugin_metalinks'), null, 2 );
remove_action('admin_notices', array( ReduxFrameworkPlugin::get_instance(), 'admin_notices' ) );
}
}
add_action('init', 'my_theme_remove_redux_framework_notification');
@jamigibbs
jamigibbs / example.php
Last active July 18, 2016 12:40
Using class/function_exists() to check if a plugin exists in the current WordPress installation
<?php
if( function_exists( 'EDD' ) ) {
// EDD is active
}
if( class_exists( 'Easy Digital Downloads' ) ) {
// EDD is active
}
@jamigibbs
jamigibbs / app.js
Last active August 3, 2016 13:18
Use Strict Examples
// Whole-script strict mode syntax
(function($) {
'use strict';
// Author code below
function hello(){
return "Hi! I'm in strict mode!";
}
// Author code below
.inner_sidebar .mc4wp-form, .inner_sidebar .widget p .mc4wp-form {
background-color: #81d742;
}
.home_post .read-more {
color: #81d742;
}
@media screen and (min-width: 64em) {
.top-bar-section ul li .js-generated {
display: none;
}
}
article .entry-meta ul a, article .entry-meta ul {
font-size: 12px;
color: #5a1899;
font-style: italic;
font-weight: 100;
font-family: Arial;
}
.inner_content h2.entry-title a {
color: #5a1899;
font-size: 1.75rem;
font-family: Arial;
}
/* Extra Small Devices, Phones */
@media only screen and (min-width : 480px) {
h1 {
font-size: 12px;
}
}
/* Small Devices, Tablets */
@media only screen and (min-width : 768px) {
h1 {