Skip to content

Instantly share code, notes, and snippets.

View psahalot's full-sized avatar

Puneet Sahalot psahalot

View GitHub Profile
@johnbillion
johnbillion / wp_mail.md
Last active January 27, 2024 14:06
WordPress Emails

WordPress Emails

This document lists all the situations where WordPress sends an email, along with how to filter or disable each email.

This documentation has moved here: https://github.com/johnbillion/wp_mail

<?php
/*
Plugin Name: Primux Mailchimp
Plugin URI: http://primux.dk/
Description: Add new users to a Mailchimp list
Version: 1.0
Author: Primux Media
Author URI: http://primux.dk/
*/
@micc83
micc83 / skip-to-check-out.php
Last active April 11, 2024 00:13
Skip cart and redirect to direct checkout on WooCommerce
<?php
/**
* Skip cart and redirect to direct checkout
*
* @package WooCommerce
* @version 1.0.0
* @author Alessandro Benoit
*/
// Skip the cart and redirect to check out url when clicking on Add to cart
@thomasgriffin
thomasgriffin / gist:9219422
Created February 25, 2014 22:35
Add the image title as a caption below the image in the gallery display.
<?php
add_filter( 'envira_gallery_output_after_link', 'tgm_envira_gallery_caption', 10, 5 );
/**
* Adds a caption below each image in the gallery.
*
* @since 1.0.0
*
* @param string $output String of gallery output.
* @param mixed $id The ID of the gallery.
* @param array $item Array of data about the image.
@malarkey
malarkey / Contract Killer 3.md
Last active April 16, 2024 21:44
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

@mattonomics
mattonomics / skin-sample.php
Created October 9, 2012 21:38
Adding a skin specific box to the boxes queue
<?php
class example_skin_class extends thesis_skin {
// list of box classes you want to add to the queue
// do not give these strings for keys or everything will blow up
public $boxes_class_list = array(
'box_class_one',
'box_class_two',
'box_class_three',
'box_class_four',
@mattonomics
mattonomics / gist:3834218
Created October 4, 2012 15:08
Reset all the things
<?php
// drop this in your custom.php file. run it ONCE or it will continue to reset everything.
// for now, this only works for Thesis Classic
include_once(dirname(__FILE__) . '/seed.php');
$options = array(
'boxes', 'templates', 'packages', 'snippets', 'vars', 'css', 'custom_css'
);
<?php
/**
* Template Name: Custom Loop
*
* @package BE Genesis Child
* @author Bill Erickson <bill@billerickson.net>
* @copyright Copyright (c) 2011, Bill Erickson
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
*
*/
@pdewouters
pdewouters / gist:2870362
Created June 4, 2012 19:35
WordPress dropdown select element for mobile navigation
<?php
class Walker_Nav_Menu_Mobile extends Walker_Nav_Menu{
var $to_depth = -1;
function start_lvl(&$output, $depth){
$output .= '</option>';
}
function end_lvl(&$output, $depth){