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
chuckreynolds / disable-wordpress-plugin-update.php
Created February 18, 2015 20:10
WordPress function to disable plugin updates for a specific plugin; using akismet as an example.
/* disable updates for specific plugin in WordPress */
function disable_specific_plugin_updates( $value ) {
unset( $value->response['akismet/akismet.php'] );
return $value;
}
add_filter( 'site_transient_update_plugins', 'disable_specific_plugin_updates' );
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php
*/
$args = array(
@chuckreynolds
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
chuckreynolds / clickerheroes-legit-game-save.txt
Created October 2, 2014 17:27
game saves for clickerheroes.com
egyRJi0tba3dRihBbJE0hQlhcVm99JMqZEXYZLlTbNHUMminOGj8MdzLNwTJIOs4I8nKRRvmd0GPF1saQYmH9JzicL0gtpprbIGjx4zeIGjeohxAMejXQEzxMDCPwAiRdgGa9V0JYUWfxFDKcEmIlh0jcpyRIp60MajjYY4DMDTJkLs8IanUBgyyZjXrZsM7bm2wd7p0bglcRiprbXWfV7z4dsGRFBtWcPCAIp6bM9TvQixFMyjLERySMlzkQuzKMUT7E9z9MbygwBiRdhGq9m0XYtWFxUVVcNGrd1yHY9WcR6lyc6yeIY6DMrTHU31uMkSQw5iAddGj9Z0AYBWBxrQ1cxm7lNtdYtWVxCzZSC27lGs5baGeVekWIqjfoIzzN1CfwjiEdBGDlutWZtWfxxhBcbH0NslOcSyxI36GM2Cuw9icbAGCFVzIdfFvBehrZ92bV1MzbT2dFAktVsGTlQtuZQSOIA6TMnCgwEiSbSWj9AzjdoExNcswabWBNSrwcD1PB0lYcXlINJlCYW2l9JuxZICpI96TMpjIQTs7Ilm9t3vcb5m0daJ6ZNCHIg6IIIicIJsCIRnwR1v9dYG8FEs4Q53jJplHZwGrld01ch11Bo11cQmTNiodYRXINdldZcCkIY6jMkC0w8iqdRmeVsyqck2Vl2vEbjimIx6RNNyqwWiQdxGJ9b0OYgWwxgNbbu2F5klJeRVjNAwfZhWa5u0qICjVonwCLYCmJotUYqXThhErc7HFMcimOrjmgauCMRzgIFx5MiTmAP3WMgDFYI2oNKzuEY3ENJzjVUliK1zAIX3bLbCbJ1zFb73YVjsgcf1CNewXZtWs5g0XIvjJolwmLdChJmzQb83GVGuGZsHmNzFUbzmZFOiqb8GZVTkgIljYpdmEYvWExozhZqStwji0c4HmJepQbsWlFisWUb289T1xbkHsMqiuOZjnEOsCI2mfxAhBcu3aRBM2bC2iFSkfVbGllctqZ3S9I06pMxCywuidbrX4VqzqaTWuNIFz
@chuckreynolds
chuckreynolds / wordpress-terms-checkboxes-keep-nested.php
Created August 19, 2014 01:42
Remove the default WordPress behavior of displaying checked categories all at the top. This will keep the nested structure even when checked.
add_filter( 'wp_terms_checklist_args', 'ryno_wp_terms_checklist_args', 1, 2 );
function ryno_wp_terms_checklist_args( $args, $post_id ) {
$args[ 'checked_ontop' ] = false;
return $args;
}
@chuckreynolds
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
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.
<?php
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
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
chuckreynolds / wordpress-nginx.conf
Last active October 5, 2017 02:33
NGINX config file for wordpress installs - using this install script: https://github.com/chuckreynolds/hhnginx
user www-data;
worker_processes auto;
worker_rlimit_nofile 100000;
pid /run/nginx.pid;
events {
worker_connections 10240;
# multi_accept on;
}
@chuckreynolds
chuckreynolds / permissions.sh
Created April 24, 2014 10:46
permissions.sh shell script for WordPress installs to set file and directory permissions and ownership. Change the path to fit your install. Make sure to 'chmod 700 permissions.sh' before using './permissions.sh' to run it.
#!/bin/bash
find /var/www/public -type d -exec chmod 755 {} +
find /var/www/public -type f -exec chmod 644 {} +
chown -R www-data:www-data /var/www/public