Skip to content

Instantly share code, notes, and snippets.

View alisonmf's full-sized avatar
🏠
Working from home

Alison Fulton alisonmf

🏠
Working from home
View GitHub Profile
@noelboss
noelboss / git-deployment.md
Last active May 2, 2024 15:47
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@webaware
webaware / gravity-forms-fields-above.php
Created May 12, 2014 03:39
Move Gravity Forms field labels from below to above fields in compound fields (e.g. Address, Name)
<?php
/*
Plugin Name: Gravity Forms Fields Above
Plugin URI: https://gist.github.com/webaware/24e1bacb47b76a6aee7f
Description: move field labels from below to above fields in compound fields (e.g. Address, Name)
Version: 1
Author: WebAware
Author URI: http://webaware.com.au/
@link http://www.gravityhelp.com/forums/topic/change-position-of-sub-labels-on-advanced-fields
@alisonmf
alisonmf / gobble-tier.php
Last active October 28, 2022 18:32
WordPress - Get child pages and grandchild page list. Get ancestor list when on grandchild page.
<?php
if(is_page())
{
//Assuming current working page is the parent
//
$the_parent_id = $post->ID;
//Otherwise get the greatest ancestor id
//
@mikejolley
mikejolley / gist:2044101
Last active May 18, 2021 17:02
WooCommerce - Show number of items in cart and total
<a class="cart-contents" href="<?php echo wc_get_cart_url(); ?>" title="<?php _e( 'View your shopping cart' ); ?>"><?php echo sprintf ( _n( '%d item', '%d items', WC()->cart->get_cart_contents_count() ), WC()->cart->get_cart_contents_count() ); ?> - <?php echo WC()->cart->get_cart_total(); ?></a>
@markjaquith
markjaquith / fcc.php
Created July 2, 2011 04:43
I hear the FCC wrote a WordPress plugin. This is what I expected it to be.
<?php
class FCC_Safe_Harbor_Indecency_Plugin {
static $instance;
private $seven_dirty = array(
'shit(s|ty|head)?' => '{BLEEP}$1',
'piss(es|ed|ing)?' => '{BLEEP}$1',
'fuck(s|er|ers|ing|ed)?' => '{BLEEP}$1',
'cunt([ys])?' => '{BLEEP}$1',
'cock(sucker[s]?)' => '{BLEEP}$1',