Skip to content

Instantly share code, notes, and snippets.

👨‍👦
I'd have more time for coding if I wasn't a parent!

Cameron Jones cameronjonesweb

👨‍👦
I'd have more time for coding if I wasn't a parent!
Block or report user

Report or block cameronjonesweb

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@davewarfel
davewarfel / default-wordpress-blocks-sass.scss
Last active May 29, 2019
WordPress Blocks Styles - Cleaned Up, Commented & Sassified
View default-wordpress-blocks-sass.scss
/**
* WordPress Blocks
*
* Default block styling included with WordPress core.
* Provides a better starting point for WordPress theme developers,
* especially when using Sass.
*
* @link https://github.com/WordPress/WordPress/blob/master/wp-includes/css/dist/block-library/style.css
*
* Most styles from the above file are included.
@EricBusch
EricBusch / deploy.sh
Last active Jun 4, 2019
Deploy your plugin to the WordPress.org SVN plugin repository from your GitHub Repository.
View deploy.sh
#! /bin/bash
#
# Script to deploy from Github to WordPress.org Plugin Repository
# A modification of a number of different sources:
# @link https://github.com/deanc/wordpress-plugin-git-svn
# @link https://github.com/GaryJones/wordpress-plugin-svn-deploy
# @link https://github.com/thenbrent/multisite-user-management/blob/master/deploy.sh
#
# Accompanying Tutorial Here:
# @link https://ericbusch.net/?p=106
@galbaras
galbaras / insert_ad_after_block.php
Last active Nov 22, 2017
Insert Google ad after specific top-level text block in WordPress post
View insert_ad_after_block.php
/*
* This code is for WordPress and should be used in functions.php of the active theme.
*
* Before using it, replace "ADVERTISER ID" with your own advertiser ID and "SLOT ID" with your own slot ID
* (you can get both in Google AdSense). For best results, use a reponsive ad unit.
*
* If your posts contain "pre", "noscript" or some other type of HTML block, add them to $block_tags.
*
* You can change the insertion point by changing $after_block.
*
@pento
pento / rainbow-bar.php
Last active Sep 26, 2017
WordPress Rainbow Bar
View rainbow-bar.php
<?php
/*
* Plugin Name: Rainbow Bar!
*/
function rainbow_bar() {
?>
<style type="text/css">
#wpadminbar {
@timothyjensen
timothyjensen / functions.php
Last active Oct 13, 2019
Retrieves all post meta data according to the structure in the $config array. Provides a convenient and more performant alternative to ACF's `get_field()`. This function is especially useful when working with ACF repeater and flexible content fields. See details at https://www.timjensen.us/acf-get-field-alternative.
View functions.php
<?php
/**
* Retrieves all post meta data according to the structure in the $config
* array.
*
* Provides a convenient and more performant alternative to ACF's
* `get_field()`.
*
* This function is especially useful when working with ACF repeater fields and
* flexible content layouts.
@OriginalEXE
OriginalEXE / pe-customize-controls.css
Last active Sep 27, 2019
Extending WordPress Customizer Panels and Sections to allow nesting
View pe-customize-controls.css
.in-sub-panel #customize-theme-controls .customize-pane-child.current-panel-parent,
#customize-theme-controls .customize-pane-child.current-section-parent {
-webkit-transform: translateX(-100%);
-ms-transform: translateX(-100%);
transform: translateX(-100%);
}
@scottbuscemi
scottbuscemi / woo-gist.php
Created Jul 13, 2016
WooCommerce minimum order amount for subtotal only (don't include shipping+tax)
View woo-gist.php
// Add to your functions.php file
add_action( 'woocommerce_checkout_process', 'wc_minimum_order_amount' );
add_action( 'woocommerce_before_cart' , 'wc_minimum_order_amount' );
function wc_minimum_order_amount() {
// Set this variable to specify a minimum order value
$minimum = 50;
if ( WC()->cart->subtotal < $minimum ) {
@spivurno
spivurno / gw-gravity-forms-skip-registration-for-logged-in-users.php
Created Nov 16, 2015
Gravity Wiz // Gravity Forms // Skip Registration for Logged in Users
View gw-gravity-forms-skip-registration-for-logged-in-users.php
<?php
/**
* Skip Registration for Logged In Users
* http://gravitywiz.com/2012/04/24/skip-user-registration-for-logged-in-users/
* Works for GF User Registration 3.0 and greater.
*/
add_filter( 'gform_is_delayed_pre_process_feed', 'maybe_delay_feeds', 10, 4 );
function maybe_delay_feeds( $is_delayed, $form, $entry, $slug ) {
if ( is_user_logged_in() && $slug == 'gravityformsuserregistration' ) {
return gf_user_registration()->has_feed_type( 'create', $form );
@johnbillion
johnbillion / wp_mail.md
Last active Aug 30, 2019
WordPress Emails
View wp_mail.md

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

@maddisondesigns
maddisondesigns / cookie-policy.md
Last active Sep 6, 2019
eCommerce Terms & Conditions and Privacy Templates
View cookie-policy.md
You can’t perform that action at this time.