Skip to content

Instantly share code, notes, and snippets.

@johnbillion
johnbillion / gist:4fa3c4228a8bb53cc71d
Last active February 18, 2025 13:06
WordPress Flow
INITIALISATION
==============
load wp-config.php
set up default constants
load wp-content/advanced-cache.php if it exists
load wp-content/db.php if it exists
connect to mysql, select db
load object cache (object-cache.php if it exists, or wp-include/cache.php if not)
load wp-content/sunrise.php if it exists (multisite only)
#EXTINF:-1,Nickelodeon
http://B29273.cdn.telefonica.com/29273/NICK_SUB.m3u8
#EXTINF:-1,Disney Junior
http://B29285.cdn.telefonica.com/29285/DSNJR_SUB.m3u8
#EXTINF:-1,40TV
http://B31312.cdn.telefonica.com/31312/40TV_SUB.m3u8
#EXTINF:-1,Disney XD
http://B31309.cdn.telefonica.com/31309/DSNYXD_SUB.m3u8
#EXTINF:-1,Canal Cocina
http://B31305.cdn.telefonica.com/31305/COCINA_SUB.m3u8
@Topener
Topener / slack_invite.php
Last active June 26, 2022 03:05
Simple PHP script to invite slack users
<?php
/**
* This is a simple script to invite users to your slack
* Replace the subdomain and token in the variables below.
* Upload a logo called "logo.png" to the same directory for your group
* Upload a logo called "slack.png" to the same directory for slack
*/
define('SUBDOMAIN','{YOUR SUBDOMAIN HERE}');
define('TOKEN','{YOUR API TOKEN HERE}');
?>
@mindctrl
mindctrl / edd-remove-billing-details.php
Created May 13, 2015 13:30
Easy Digital Downloads - Remove billing details section on the checkout screen.
/**
* Removes the billing details section on the checkout screen.
*/
function jp_disable_billing_details() {
remove_action( 'edd_after_cc_fields', 'edd_default_cc_address_fields' );
}
add_action( 'init', 'jp_disable_billing_details' );
@nickcernis
nickcernis / functions.php
Last active September 6, 2020 06:34
Genesis Simple Share Shortcode
<?php
// Adds a [social-icons] shortcode to output Genesis Simple Share icons in posts
// https://wordpress.org/plugins/genesis-simple-share/
// Add the code below to your active theme's functions.php file,
// or use in a site-specific plugin.
// The shortcode takes no attributes; change your icon settings via Genesis → Simple Share.
add_shortcode( 'social-icons', 'gss_shortcode' );
@neilgee
neilgee / less-fields-virtual.php
Last active March 10, 2022 00:36
WooCommerce Remove Address Fields from checkout based on presence of virtual products in cart
<?php
add_filter( 'woocommerce_checkout_fields' , 'virtual_products_less_fields' );
/**
* WooCommerce Remove Address Fields from checkout based on presence of virtual products in cart
* @link https://www.skyverge.com/blog/checking-woocommerce-cart-contains-product-category/
* @link https://docs.woothemes.com/document/tutorial-customising-checkout-fields-using-actions-and-filters/
* @link https://businessbloomer.com/woocommerce-hide-checkout-billing-fields-if-virtual-product-cart/
*/
@johnbillion
johnbillion / wp_mail.md
Last active June 3, 2024 13:31
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

@soderlind
soderlind / a_faster_load_textdomain.php
Created October 26, 2015 22:08
A faster load_textdomain for WordPress
<?php
/*
Plugin Name: A faster load_textdomain
Version: 0.0.1
Description: While we're wating for https://core.trac.wordpress.org/ticket/32052.
Author: Per Soderlind
Author URI: https://soderlind.no
Plugin URI: https://gist.github.com/soderlind/610a9b24dbf95a678c3e
License: GPL
@renventura
renventura / genesis-post-info-with-est-read-time.php
Created October 30, 2015 19:08
Modified Genesis post info with estimated read time
<?php //* Mind this opening php tag
/**
* Display Last Updated date if a post has been updated (Genesis Framework)
* Includes estimated read time via the Estimated Post Reading Time plugin
*
* @author Ren Ventura <EngageWP.com>
* @link http://www.engagewp.com/display-updated-date-instead-of-published-date-in-genesis/
*/
add_filter( 'genesis_post_info', 'rv_post_info_filter_with_est_read_time' );
@polevaultweb
polevaultweb / wpos-copy-hidpi-images.php
Created January 8, 2016 16:03
Restores the functionality of copying of HiDPI (@2x) images during S3 offload of attachments.
<?php
/*
Plugin Name: WP Offload S3 - Copy HiDPI Images
Description: Restores the functionality of copying of HiDPI (@2x) images during S3 offload of attachments.
Author: Delicious Brains
Version: 1.0
Author URI: https://deliciousbrains.com/
*/
add_filter( 'as3cf_attachment_file_paths', 'wpos3_hipdi_add_hidpi_file_paths' );