Skip to content

Instantly share code, notes, and snippets.

@bryceadams
bryceadams / 0_reuse_code.js
Created June 17, 2014 02:17
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
.content p {
white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
white-space: pre-wrap; /* css-3 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
word-break: break-all;
white-space: normal;
}
<div class="dashicons dashicons-welcome-add-page"></div>
add_action( 'wp_enqueue_scripts', 'ba_load_dashicons' );
function ba_load_dashicons() {
wp_enqueue_style( 'dashicons' );
}
@bryceadams
bryceadams / gist:22439ae2efd3433ca29a
Last active August 29, 2015 14:03
Remove Styles from Recipe Hero
add_filter( 'recipe_hero_enqueue_styles', '__return_false' );
@bryceadams
bryceadams / gist:818c241a0d226247dfba
Last active August 29, 2015 14:03
Hide Location Name
.locations-display .locations-single .location-name {
display: none;
}
svn add --force * --auto-props --parents --depth infinity -q
@bryceadams
bryceadams / gist:44462148015a0351ea2f
Created July 3, 2014 09:59
Change Default Admin Color Scheme for WordPress
/**
<?php
* Default Admin Color Scheme
*
* @package Captain Admin
* @author Captain Theme <info@captaintheme.com>
* @since 1.4.5
*/
add_filter( 'woocommerce_variable_free_price_html', 'hide_free_price_notice' );
add_filter( 'woocommerce_free_price_html', 'hide_free_price_notice' );
add_filter( 'woocommerce_variation_free_price_html', 'hide_free_price_notice' );
// Hides the 'Free!' price notice
function hide_free_price_notice( $price ) {
return 'Send Your Quote';
}
<?php
/**
* Check if WooCommerce is active
**/
if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
// Put your plugin code here
}