Skip to content

Instantly share code, notes, and snippets.

View chuckreynolds's full-sized avatar
building things

Chuck Reynolds chuckreynolds

building things
View GitHub Profile
chuckreynolds / wp-fix-wpseo-noob-stuff.php
Created March 7, 2014 08:16
This will disable the super noob stuff in WordPress SEO by Yoast plugin. Removes the filters on edit posts screen etc.
if (defined('WPSEO_VERSION')) {
add_filter( 'wpseo_use_page_analysis', '__return_false' );
chuckreynolds / mobile-touch-input-fields.htm
Created March 26, 2014 23:21
Make filling in forms less sucky on mobile devices by using the correct input types.
<!-- For most inputs, you should remove autocorrect and autocapitalize -->
<input type="(your input type)" autocapitalize="off" autocorrect="off">
<!-- Email -->
<input type="email">
<!-- Phone number -->
<input type="tel">
<!-- Some numeric input, like credit card number or ZIP code -->
chuckreynolds /
Created April 13, 2014 22:27
validating keybase. nothing important here

Keybase proof

I hereby claim:

  • I am chuckreynolds on github.
  • I am chuckreynolds ( on keybase.
  • I have a public key whose fingerprint is 5D77 7FD4 D61C F075 EC92 97C5 C8E1 4D91 7714 E0E8

To claim this, I am signing this object:

chuckreynolds / add_cpts_to_wordpress_dashboard.php
Created July 25, 2014 20:06
Add all Custom Post Types to the WordPress At a Glance dashboard widget.
add_action( 'dashboard_glance_items', 'add_cpts_to_dashboard_ataglance' );
function add_cpts_to_dashboard_ataglance() {
$args = array(
'public' => true,
'_builtin' => false
$output = 'object';
$operator = 'and';
$post_types = get_post_types( $args, $output, $operator );
chuckreynolds / wordpress-filter-admin-published-default.php
Last active August 29, 2015 14:04 — forked from norcross/filter-pages-admin-link.php
This will make the WordPress admin menu link to posts and pages but with the Published filter active by default.
add_action ( 'admin_menu', 'rkv_filter_admin_published_default' );
function rkv_filter_admin_published_default() {
// call global submenu item
global $submenu;
// edit main link for posts
$submenu['edit.php'][5][2] = 'edit.php?post_status=publish';
chuckreynolds / dradcast-intro.txt
Created August 14, 2014 01:27
My DradCast vidcast/podcast intro for Aug 13th 2014
In a world... absent of SanTan Brewery and crazy right-wing politicians.. coming to you from the land of fog, Automattic, crazy left-wing politicians and poopy sidewalks...
I'm Chuck Reynolds
And the DradCast Starts now.
chuckreynolds / hhvm-php.ini
Created October 23, 2014 20:42
current /etc/hhvm/php.ini
hhvm.log.level = Warning
hhvm.log.always_log_unhandled_exceptions = true
hhvm.log.runtime_error_reporting_level = 8191
hhvm.mysql.typed_results = false
chuckreynolds / gist:f53acd21fd01f0420084
Created February 21, 2015 11:22
WordPress function to unregister a taxonomy.
add_action( 'init', 'unregister_taxonomy_taxname');
function unregister_taxonomy_taxname(){
global $wp_taxonomies;
$taxonomy = 'post_tag'; // tax slug to remove
if ( taxonomy_exists( $taxonomy))
unset( $wp_taxonomies[$taxonomy]);
Verifying that +chuckreynolds is my openname (Bitcoin username).
chuckreynolds / gist:6478b4d2ad8b61ca560f
Last active August 29, 2015 14:20
Get WPSEO title and description for category, taxonomy archives, pages, posts
// access wpseo_frontend class and get the seo title and seo description for output on archive pages
if ( class_exists( 'WPSEO_Frontend' ) ) {
$wpseo_object = WPSEO_Frontend::get_instance();
$headline = $wpseo_object->title( false );
$intro_text = $wpseo_object->metadesc( false );
$headline = sanitize_text_field( $headline );
$intro_text = sanitize_text_field( $intro_text );