Skip to content

Instantly share code, notes, and snippets.

View dwainm's full-sized avatar
💸
WooCommerce Payments https://woocommerce.com/payments/

Dwain Maralack dwainm

💸
WooCommerce Payments https://woocommerce.com/payments/
View GitHub Profile
add_action( 'sensei_before_main_content', 'sensei_conditional_lesson_display', 10 );
function sensei_conditional_lesson_display() {
if( !is_singular('course') ) return;
global $post, $current_user, $woothemes_sensei, $sensei_modules;
$is_user_taking_course = WooThemes_Sensei_Utils::user_started_course( $post->ID, $current_user->ID );
if ( ! ( $is_user_taking_course || sensei_all_access() ) ) {
remove_action( 'sensei_course_single_lessons', 'course_single_lessons', 10 );

OS X Preferences


#Disable window animations
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false

#Enable repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
@dwainm
dwainm / gist:a60340429d206d145db6
Last active August 29, 2015 14:13 — forked from growdev/gist:ad915038172511975fbd
Remove the WooThemes helper admin notice.
<?php
add_action( 'init', 'custom_remove_helper_admin_notice' );
/**
* Remove the Woothemes Helper admin install notice
*/
function custom_remove_helper_admin_notice() {
remove_action( 'admin_notices', 'woothemes_updater_notice' );
}
@dwainm
dwainm / function.php
Last active January 2, 2016 02:48 — forked from woogist/function.php
add_action('woocommerce_before_shop_loop','custom_text_shop_page');
function custom_text_shop_page(){
if ( is_shop() ){
?>
<div class="nav_box"><a class="active_link" href="http://www.woonb.com/shop/">All</a><a href="http://www.woonb.com/shop/responsive/">Responsive</a><a href="http://www.woonb.com/shop/app-ecommerce">App/eCommerce</a><a href="http://www.woonb.com/shop/blog-tumblog/">Blog/Tumblog</a><a href="http://www.woonb.com/shop/business/">Business</a><a href="http://www.woonb.com/shop/magazine-news/">Magazine/News</a><a href="http://www.woonb.com/shop/multimedia/">Multimedia</a><a href="http://www.woonb.com/shop/personal">Personal</a><a href="http://www.woonb.com/shop/portfolio/">Portfolio</a></div>
<?php
}
}
global $woo_options;
$title_before = '<h1 class="title">';
$title_after = '</h1>';
$page_link_args = apply_filters( 'woothemes_pagelinks_args', array( 'before' => '<div class="page-link">' . __( 'Pages:', 'woothemes' ), 'after' => '</div>' ) );
woo_post_before();
?>
<?php if ( woo_active_sidebar( 'widget-page-template' ) ) { ?>
<div class="widget-page-content">
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php
*/
$args = array(