Skip to content

Instantly share code, notes, and snippets.


Lance Willett lancewillett

View GitHub Profile
lancewillett / parse-csv.php
Last active Jul 28, 2017
PHP: parse a CSV formatted file (comma-delimited)
View parse-csv.php
* This file is use to parse a CSV formatted file (comma-delimited).
// File should be first and only argument.
if ( empty( $argv[1] ) ) {
die( 'Please supply at least one filename.' );
lancewillett / footer-date.php
Created May 2, 2017
Keep your website footer copyright year always up-to-date with PHP
View footer-date.php
View Allow post-formats to be added as items, Jetpack REST API
diff --git a/json-endpoints/class.wpcom-json-api-get-site-endpoint.php b/json-endpoints/class.wpcom-json-api-get-site-endpoint.php
index e6f589f..1a259d3 100644
--- a/json-endpoints/class.wpcom-json-api-get-site-endpoint.php
+++ b/json-endpoints/class.wpcom-json-api-get-site-endpoint.php
@@ -444,19 +444,24 @@ class WPCOM_JSON_API_List_Post_Formats_Endpoint extends WPCOM_JSON_API_Endpoint
- // Get a list of supported post formats.
- $all_formats = get_post_format_strings();

Keybase proof

I hereby claim:

  • I am lancewillett on github.
  • I am lancewillett ( on keybase.
  • I have a public key whose fingerprint is BDF4 5533 7D92 6173 9F1B 6EDB E0D7 0F57 9BBE 1E5A

To claim this, I am signing this object:

View gist:127085c444ec6ff398d1
View gist:a7c849026e2e403399a0
(?m: <wp:postmeta>
lancewillett / gist:7491863
Created Nov 15, 2013
Sample welcome screen
View gist:7491863
* Output Twenty Fourteen welcome panel content.
* @return void
function twentyfourteen_welcome_panel() {
<p class="about-description">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas sed diam eget risus varius blandit sit amet non magna. Aenean lacinia bibendum nulla sed consectetur.
View gist:7327903
DELETE FROM wp_comments WHERE comment_approved = '0';
lancewillett / gist:6907979
Last active Dec 25, 2015
3.7 release, evaluating new default theme bumps
View gist:6907979
Twenty Thirteen, several important bug fixes
I think this one definitely needs a bump and release with 3.7
Twenty Twelve, a few bug fixes (and minor code comment changes)
I suggest a bump and release with 3.7
Twenty Eleven, 1 needed bug fix for mobile (and minor code comment changes)
I suggest a bump and release with 3.7
lancewillett / gist:6427469
Last active Dec 22, 2015
List of websites running Further and also having a custom header image.
View gist:6427469