Skip to content

Instantly share code, notes, and snippets.

View bhubbard's full-sized avatar
:octocat:
Hello

Brandon Hubbard bhubbard

:octocat:
Hello
View GitHub Profile
.gform_wrapper {
ul {
@extend .list-unstyled;
}
li {
@extend .form-group;
}
if ($http_referer ~* "semalt\.com") {
return 444;
}
$$
$$$$$ $$$
$$$$$ $$$$$
$$$$$$ $$$$$$$ DD $$$$$$$ $$$$$ $$$$$ $$$$$$$ $$$$
$$$$$$ $$$$$$$$$ $$ $$$ $$$ $$ $$$ $$$ $$$$$
$$$$$$ $$$$$ DD DDDDDDDDDD $$ $$ $$ $$ $$ $$ $$ $$
$$$$$$$$$$ $$$$$$ DD DD DD DDD $$$$$$ $$ $$ $$$$$$$ $$ $$ $$
$$$$$$$$$$ ?$$$$$$$ DD DD DD DD $$ $$ $$ $$ $$ $$ $$$$$$$
$$$$$$$$$ $$$$$$$$$ DD DD DD DD $$ $$$ $$$ $$ $$$ $$$$$$$$$ $$
git log --oneline --decorate --color
<?php
// Remove all evidence of WP Engine from the Dashboard, unless the logged in user is "wpengine"
$user = wp_get_current_user();
if ( $user->user_login != 'wpengine' ) {
add_action( 'admin_init', 'jpry_remove_menu_pages' );
add_action( 'admin_bar_menu', 'jpry_remove_admin_bar_links', 999 );
}
/**
@bhubbard
bhubbard / archive-slug.php
Created August 18, 2014 17:19
Here are php examples on how to rename slugs for WooCommerce Our Team Plugin.
<?php
/* Change 'Our Team' Archive Slug */
function woothemes_our_team_custom_archive_slug( $archive_slug ) {
$new_archive_slug = _x( 'agents', 'post archive url slug', 'our-team-by-woothemes' );
return $new_archive_slug;
}
add_filter( 'woothemes_our_team_archive_slug', 'woothemes_our_team_custom_archive_slug' );
<?php
// Prefetch For Speed Up
function dns_prefetch() {
$prefetch = 'on';
echo "\n <!-- DNS Prefetching Start --> \n";
echo '<meta http-equiv="x-dns-prefetch-control" content="'.$prefetch.'">'."\n";
if ($prefetch != 'on') {
<?php
################################################################################
// Enable Entry Deletion
################################################################################
class RW_Delete_Entry {
function __construct() {
if( ! property_exists( 'GFCommon', 'version' ) || ! version_compare( GFCommon::$version, '1.8.5.8', '>=' ) )
return;
add_filter( 'gform_tooltips', array( $this, 'add_delete_tooltip') );
add_theme_support( 'jetpack-responsive-videos' );
@bhubbard
bhubbard / gist:f2d271165bebbc1e6ead
Created October 21, 2014 22:21
Change Related Posts Header for Properties CPT
################################################################################
// Change Related Posts Header for Properties CPT
################################################################################
function jetpackme_related_posts_headline( $headline ) {
if ( is_singular( 'properties' ) ) {
$headline = sprintf(
'<h3 class="jp-relatedposts-headline"><em>%s</em></h3>',
esc_html( 'Similar Listings' )
);
return $headline;