Skip to content

Instantly share code, notes, and snippets.

Avatar

Lance Willett lancewillett

View GitHub Profile
@lancewillett
lancewillett / parse-csv.php
Last active Jul 28, 2017
PHP: parse a CSV formatted file (comma-delimited)
View parse-csv.php
<?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
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 WP.com 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
$this->load_theme_functions();
}
- // Get a list of supported post formats.
- $all_formats = get_post_format_strings();
View keybase.md

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:

View gist:127085c444ec6ff398d1
<wp:commentmeta>
<wp:meta_key>_elasticsearch_indexed_on</wp:meta_key>
<wp:meta_value>.+?</wp:meta_value>
</wp:commentmeta>
View gist:a7c849026e2e403399a0
(?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 Nov 15, 2013
Sample welcome screen
View gist:7491863
<?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.
View gist:7327903
DELETE FROM wp_comments WHERE comment_approved = '0';
@lancewillett
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
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 Dec 22, 2015
List of websites running Further and also having a custom header image.
View gist:6427469
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/