This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Do NOT include the opening php tag | |
//* Alter the Genesis Search for so that we can change the destination page and our querystring parameter. | |
add_filter( 'genesis_search_form', 'b3m_search_form', 10, 4); | |
function b3m_search_form( $form, $search_text, $button_text, $label ) { | |
$onfocus = " onfocus=\"if (this.value == '$search_text') {this.value = '';}\""; | |
$onblur = " onblur=\"if (this.value == '') {this.value = '$search_text';}\""; | |
$form = '<form role="search" method="get" class="searchform search-form" action="' . home_url() . '/search"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" _ _ " | |
" _ /|| . . ||\ _ " | |
" ( } \||D ' ' ' C||/ { % " | |
" | /\__,=_[_] ' . . ' [_]_=,__/\ |" | |
" |_\_ |----| |----| _/_|" | |
" | |/ | | | | \| |" | |
" | /_ | | | | _\ |" | |
It is all fun and games until someone gets hacked! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add new custom font to Font Family selection in icon box module | |
function zeckart_add_new_icon_set_to_iconbox( ) { | |
$param = WPBMap::getParam( 'vc_icon', 'type' ); | |
$param['value'][__( 'IcoMoon', 'total' )] = 'icomoon'; | |
vc_update_shortcode_param( 'vc_icon', $param ); | |
} | |
add_filter( 'init', 'zeckart_add_new_icon_set_to_iconbox', 40 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Template Name: ajax | |
*/ | |
?> | |
<?php | |
$post = get_post($_GET['id']); | |
?> | |
<?php if ($post) : ?> | |
<?php setup_postdata($post); ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Const | |
const webpack = require('webpack'); //to access built-in plugins | |
const ExtractTextPlugin = require("extract-text-webpack-plugin"); | |
const path = require('path'); | |
// ExtractPlugin - Multiple instances | |
// Configure individual stylesheet generation to use correctly with wp_enqueue_style | |
const extractMain = new ExtractTextPlugin('css/main.min.css'); | |
const extractAdmin = new ExtractTextPlugin('css/admin.min.css'); | |
const extractEditor = new ExtractTextPlugin('css/editor.min.css'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[submodule "chosen"] | |
path = chosen | |
url = git@github.com:harvesthq/chosen.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Make Soliloquy sliders use wp's native responsive images with wp retina | |
function my_theme_soliloquy_output($slider, $data) { | |
return wp_make_content_images_responsive($slider); | |
} | |
add_filter('soliloquy_output', 'my_theme_soliloquy_output', 10, 2); | |
// wp_make_content_images_responsive needs the img tags to have a class with their id | |
function my_theme_soliloquy_image_slide_class($classes, $item, $i, $data, $mobile) { | |
$classes[] = 'wp-image-' . $item['id']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @link http://jsfiddle.net/andyshora/5YVNN/ | |
// @link http://andyshora.com/css-image-container-padding-hack.html | |
$(document).ready(function() { | |
// when the image has loaded | |
$('.image').load(function() { | |
// remove loading class from the wrapper | |
$(this).parent('.image-wrapper--loading').removeClass('image-wrapper--loading'); | |
}); | |
var imagePath = 'http://andyshora.com/assets/img/pages/grumpy-cat.jpg'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -regextype posix-extended -regex ".*-[[:digit:]]{2,4}x[[:digit:]]{2,4}(@2x)?.(jpg|jpeg|png|eps|gif)" -type f -exec rm {} \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# credit from http://stackoverflow.com/questions/6301885/convert-tar-gz-to-zip | |
for f in *.tar.gz | |
do | |
rm -rf ${f%.tar.gz} | |
mkdir ${f%.tar.gz} | |
tar xvzf $f -C ${f%.tar.gz} | |
zip ${f%.tar.gz}.zip -r ${f%.tar.gz} | |
rm -rf ${f%.tar.gz} |