I hereby claim:
- I am tillkruss on github.
- I am tillkruss (https://keybase.io/tillkruss) on keybase.
- I have a public key whose fingerprint is 6490 DEB6 8D18 F0A3 49BD CB9C 8874 10C6 42BC 23BB
To claim this, I am signing this object:
<?php | |
/* | |
Plugin Name: Disable Developer Plugins | |
Description: Force disables developer plugins in production environments. | |
*/ | |
$dev_plugins = array( | |
'debug-bar/debug-bar.php', | |
'debug-bar-cron/debug-bar-cron.php', | |
'debug-bar-extender/debug-bar-extender.php', |
<?php | |
add_action( 'do_feed_rdf', function() { wp_redirect( home_url(), 301 ); exit; }, 1); | |
add_action( 'do_feed_rss', function() { wp_redirect( home_url(), 301 ); exit; }, 1); | |
add_action( 'do_feed_rss2', function() { wp_redirect( home_url(), 301 ); exit; }, 1); | |
add_action( 'do_feed_atom', function() { wp_redirect( home_url(), 301 ); exit; }, 1); | |
add_action( 'init', function() { | |
remove_action( 'wp_head', 'feed_links', 2 ); | |
remove_action( 'wp_head', 'feed_links_extra', 3 ); | |
}); |
<?php | |
add_action( 'admin_menu', function() { | |
remove_submenu_page( 'edit.php', 'edit-tags.php?taxonomy=post_tag' ); // Remove menu link under "Posts" | |
}); | |
add_action( 'admin_menu', function() { | |
remove_meta_box( 'tagsdiv-post_tag', 'post', 'side'); // Remove metabox on add/edit post screen | |
}); | |
add_filter( 'manage_posts_columns', function($columns) { | |
unset( $columns['tags'] ); // Remove "Tags" column in post listing |
<?php | |
namespace App\Redis; | |
use Redis; | |
use Illuminate\Redis\Database as RedisDatabase; | |
use Illuminate\Contracts\Redis\Database as DatabaseContract; | |
class Database extends RedisDatabase implements DatabaseContract | |
{ |
<?php | |
/* | |
Plugin Name: Redis Test | |
Plugin URI: https://wordpress.org/plugins/redis-cache/ | |
Description: Redis connection test. | |
Author: Till Krüss | |
Version: 1.0 | |
Author URI: https://till.im/ | |
*/ |
I hereby claim:
To claim this, I am signing this object:
<?php | |
add_action( 'template_redirect', function() { | |
global $wp_query; | |
if ( is_home() || $wp_query->is_singular( 'post' ) || $wp_query->is_post_type_archive( 'post' ) ) { | |
header( $_SERVER[ 'SERVER_PROTOCOL' ] . ' 404 Not Found' ); | |
$wp_query->set_404(); | |
} |
<?php | |
add_action( 'pre_option_image_default_link_type', function() { | |
return 'none'; // 'file', 'post' or 'none' | |
}); |
<?php | |
// add query string cache buster to W3TC minified stylesheet links | |
add_action( 'init', function() { | |
// is css minify enabled? | |
if ( isset( $GLOBALS[ '_w3tc_ob_callbacks' ][ 'minify' ] ) && $GLOBALS[ '_w3tc_ob_callbacks' ][ 'minify' ][0]->_config->get_cache_option( 'minify.css.enable' ) ) { | |
// store original minify callback | |
$GLOBALS[ '_w3tc_ob_callbacks' ][ 'minify-org' ] = $GLOBALS[ '_w3tc_ob_callbacks' ][ 'minify' ]; |
<?php | |
// increase `timeout` for `api.wordpress.org` requests | |
add_filter( 'http_request_args', function( $request, $url ) { | |
if ( strpos( $url, '://api.wordpress.org/' ) !== false ) { | |
$request[ 'timeout' ] = 15; | |
} | |
return $request; |