- 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
- Compass - Open source CSS Authoring Framework.
- Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
- Font Awesome - The iconic font designed for Bootstrap.
- Zurb Foundation - Framework for writing responsive web sites.
- SASS - CSS extension language which allows variables, mixins and rules nesting.
- Skeleton - Boilerplate for responsive, mobile-friendly development.
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 | |
/** | |
* Plugin Functions | |
* | |
* @category WP Plugins | |
* @author Jayson T. Cote | |
* @link https://tri.be/shop/wordpress-events-calendar/ | |
*/ | |
if (tribe_is_event() || tribe_is_event_category() || tribe_is_in_main_loop() || tribe_is_view() || 'tribe_events' == get_post_type() || is_singular( 'tribe_events' )) { |
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
add_filter( 'tribe_get_cost', 'gum_wootickets_tribe_get_cost', 10, 3 ); | |
function gum_wootickets_tribe_get_cost( $cost, $postId, $withCurrencySymbol ) { | |
if ( empty($cost) && class_exists('TribeWooTickets') ) { | |
// see if the event has tickets associated with it | |
$wootickets = TribeWooTickets::get_instance(); | |
$ticket_ids = $wootickets->get_Tickets_ids( $postId ); | |
if ( empty($ticket_ids) ) { | |
return ''; |
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
/***** MAINTENANCE *****/ | |
//* Redirect for temp landing page | |
add_action( 'template_redirect', 'gum_redirect_maintenance_page' ); | |
function gum_redirect_maintenance_page() { | |
$redirect = FALSE; | |
$page = home_url( '/maintenance/' ); //slug for wp page | |
if ( $redirect && !is_user_logged_in() && trim( $_SERVER['REQUEST_URI'], '/' ) != 'maintenance' && $_SERVER['REQUEST_URI'] != '/wp-admin/' ) : | |
wp_redirect( $page ); | |
exit; |
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
//Delete old custom capabilities | |
add_action( 'admin_init', 'gum_delete_woo_caps' ); | |
function gum_delete_woo_caps(){ | |
$delete_caps = array( | |
'assign_product_terms', | |
'assign_shop_order_terms', | |
'assign_shop_webhook_terms', | |
'delete_others_products', | |
'delete_others_shop_coupons', | |
'delete_others_shop_orders', |
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
//* Discourage search engines from indexing this site | |
add_action('init', 'gumtheme_set_robots_access'); | |
function gumtheme_set_robots_access(){ | |
if(WP_ENV == 'staging' && get_option('blog_public') == '1') | |
update_option('blog_public', '0'); | |
if(WP_ENV == 'production' && get_option('blog_public') == '0') | |
update_option('blog_public', '1'); | |
} |
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
//* Restore get shortlinks in editor | |
add_filter( 'get_shortlink', 'gumtheme_restore_wp_getshortlink' ); | |
function gumtheme_restore_wp_getshortlink( $shortlink ) { | |
return $shortlink; | |
} |
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
//** Wholesale pricing based on 'wholesaler' role | |
// checks if the current user is capable to have the wholesale pricing | |
function gum_woo_wholesale_pricing_applies(){ | |
return (bool) ( current_user_can('wholesaler') && ( !is_admin() || is_ajax() ) ); | |
} | |
// wholesale price when available for both Simple & Variable product type | |
function gum_woo_wholesale_price_get( $product ) { | |
if( $product->is_type( array('simple', 'variable') ) && get_post_meta( $product->id, '_wholesale_price', true ) > 0 ){ | |
return get_post_meta( $product->id, '_wholesale_price', true ); |
OlderNewer