Skip to content

Instantly share code, notes, and snippets.

View lancewillett's full-sized avatar

Lance Willett lancewillett

View GitHub Profile
@lancewillett
lancewillett / parse-csv.php
Last active July 28, 2017 14:37
PHP: parse a CSV formatted file (comma-delimited)
<?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
lancewillett / footer-date.php
Created May 2, 2017 16:02
Keep your website footer copyright year always up-to-date with PHP
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
$this->load_theme_functions();
}
- // 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 (https://keybase.io/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:

<wp:commentmeta>
<wp:meta_key>_elasticsearch_indexed_on</wp:meta_key>
<wp:meta_value>.+?</wp:meta_value>
</wp:commentmeta>
(?m: <wp:postmeta>
<wp:meta_key>_elasticsearch_indexed_on</wp:meta_key>
<wp:meta_value>.+?</wp:meta_value>
</wp:postmeta>
)
@lancewillett
lancewillett / gist:7491863
Created November 15, 2013 21:22
Sample welcome screen
<?php
/**
* 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.
DELETE FROM wp_comments WHERE comment_approved = '0';
@lancewillett
lancewillett / gist:6907979
Last active December 25, 2015 03:09
3.7 release, evaluating new default theme bumps
Twenty Thirteen, several important bug fixes
I think this one definitely needs a bump and release with 3.7
http://core.trac.wordpress.org/log/trunk/src/wp-content/themes/twentythirteen/
Twenty Twelve, a few bug fixes (and minor code comment changes)
I suggest a bump and release with 3.7
http://core.trac.wordpress.org/log/trunk/src/wp-content/themes/twentytwelve/
Twenty Eleven, 1 needed bug fix for mobile (and minor code comment changes)
I suggest a bump and release with 3.7
@lancewillett
lancewillett / gist:6427469
Last active December 22, 2015 05:58
List of websites running Further and also having a custom header image.
http://monaandchris.com/
http://deddinordiawan.com/
http://meetdux.com/
http://chelseano5.com/
http://strollwithoutshoes.com/
http://bikinibodypro.wordpress.com/
http://robertofrugone.com/
http://insendems.wordpress.com/
http://designmatters.iida.org/
http://madhyperecords.com/