Skip to content

Instantly share code, notes, and snippets.

@jessLundie
jessLundie / expand_access_subscription_downloads.php
Last active December 17, 2020 17:46
Expand access to subscription downloads in WooCommerce Subscriptions based on subscription status
<?php
function expand_access_subscription_downloads( $is_download_permitted, $subscription ) {
if ( $subscription->has_status ( 'cancelled', 'expired' ) ) {
return true;
}
return $is_download_permitted;
}
@kevinwhoffman
kevinwhoffman / resources-web-developers-designers.md
Last active August 1, 2024 06:59
Resources for Web Developers and Designers

Resources for Web Developers and Designers

This is an incomplete list of resources including courses and individuals who publish content that has helped me grow as a web developer and designer. Many of these resources are WordPress-specific as that is my current area of specialization. This list will grow over time. If you've got something to add, send me a link @kevinwhoffman and I'll check it out!

Course Providers

@amboutwe
amboutwe / yoast_seo_sitemap_add_custom_type.php
Last active November 7, 2024 18:34
Filters and example code for Yoast SEO sitemaps
<?php
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/
/* Create a Yoast SEO sitemap for a custom post type
* Credit: Team Yoast
* Last Tested: Unknown
* Documentation: https://developer.yoast.com/features/xml-sitemaps/api/#add-a-custom-post-type
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* HOW TO USE
* Replace TYPE with your custom type
@thehotrod
thehotrod / gist:4c4c4170a735733cd745
Last active February 5, 2016 08:45
Script for Logging Data from Nest and WeatherUnderground to Google Sheets
function doGet() {
// you only need to modify the next six lines of this code then publish web app. Replace the XXXX's with your info
var email = 'XXXXXXXXXX'; //what you use to login to nest
var password = 'XXXXXXX' ////what you use to login to nest
var State = 'XX'; // WeatherUnderground State Name. 2 letter State name or Country ID
var City = 'XXXXXXXXX'; // Enter your WeatherUnderground City Name. Or your local station ID. Should look like this 'pws:localID'
var APIKey = 'XXXXXXXXXXXX' // get your free WeatherUnderground APIKey and enter it here
var sheetid = 'XXXXXXXXXXXXXXXXXX'; //on your spreadsheet url its everything between /d/ <sheet id> /edit
/* to publish web app just:
@GaryJones
GaryJones / readme.md
Last active July 14, 2019 20:46
Custom Featured Post Widget plugin: Skeleton for amending the output of the Genesis Featured Post widget.
@plentz
plentz / nginx.conf
Last active November 16, 2024 14:10
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@norcross
norcross / login-string-check.php
Created December 20, 2012 01:15
check login URL for specific query string
<?php
/*
* Check the URL of the WordPress login
* page for a specific query string
*
* assumes login string is
* http://mysite.com/wp-login.php?question=answer
*/
function rkv_login_stringcheck() {
<?php
/**
* Add Column Classes to Display Posts Shortcodes
* @author Bill Erickson
* @link http://www.billerickson.net/code/add-column-classes-to-display-posts-shortcode
*
* Usage: [display-posts columns="2"]
*
* @param array $classes
* @param object $post