Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Steven Word stevenkword

🎯
Focusing
View GitHub Profile
@stevenkword
stevenkword / bad-words.txt
Last active Aug 29, 2015
Bad Words & Banned Usernames
View bad-words.txt
www, web, root, admin, main, invite, administrator, files, blog, blogs, members, member, user, users, profile, profiles, presentation, presentations, slide, slides, wordpress, buddypress, sysop, system, mail, ahole, anus, ash0le, ash0les, asholes, ass, Ass Monkey, Assface, assh0le, assh0lez, asshole, assholes, assholz, asswipe, azzhole, bassterds, bastard, bastards, bastardz, basterds, basterdz, Biatch, bitch, bitches, Blow, Job, boffing, butthole, buttwipe, c0ck, c0cks, c0k, Carpet Muncher, cawk, cawks, Clit, cnts, cntz, cock, cockhead, cock-head, cocks, CockSucker, cock-sucker, crap, cum, cunt, cunts, cuntz, dick, dild0, dild0s, dildo, dildos, dilld0, dilld0s, dominatricks, dominatrics, dominatrix, dyke, enema, fag, fag1t, faget, fagg1t, faggit, faggot, fagit, fags, fagz, faig, faigs, fart, flipping the bird, fuck, fucker, fuckin, fucking, fucks, Fudge, Packer, fuk, Fukah, Fuken, fuker, Fukin, Fukk, Fukkah, Fukken, Fukker, Fukkin, g00k, gay, gayboy, gaygirl, gays, gayz, God-damned, h00r, h0ar, h0re, hells,
View fizz-buzz-tweet.php
<?php
// FizzBuzz? Here, let me tweet that to you:
foreach(range(1,100)as$n){echo$n.':'.((0==$n%5)?'Fizz':'').((0==$n%3)?'Buzz':'').'<br/>';}
View bp-remove-subnav-item.php
<?php
// Remove Settings->Notifications SubMenu
function skw_remove_notifications_subnav(){
global $bp;
if ( $bp->current_component == $bp->settings->slug ) {
bp_core_remove_subnav_item( $bp->settings->slug, 'notifications' );
}
}
add_action( 'wp', 'skw_remove_notifications_subnav', 2 );
View bp-remove-notification-item.php
<?php
// Remove Messages->Notices
function skw_remove_notices_subnav() {
global $bp;
if ( $bp->current_component == $bp->messages->slug ) {
bp_core_remove_subnav_item( $bp->messages->slug, 'notices' );
}
}
add_action( 'wp', 'skw_remove_notices_subnav', 11 );
View wp-wildcard-user-search.php
<?php
/**
* Search for users by name and return a JSON object of matches
*
* An example method that demonstrates how to use wildcards (*'s) when
* looking up users. This particular example would be used to create
* a new endpoint that would output a JSON array of returned users.
* Something like this would be useful for JS autocomplete queries.
*/
function skw_user_autocomplete( $search_term ) {
View update-git.sh
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
for FOLDER in $DIR/*/; do cd $FOLDER; echo "Updating " $FOLDER; git pull; cd $DIR; done
echo 'Done!'
View gist:e794874044acb6daf09e
<?php
/*
* Plugin Name: WP Engine GeoIP Debugger
* Version: 0.5
* Description: Debug tool for WP Engine GeoIP
* Author: WP Engine
* Author URI: http://wpengine.com
*
* This will help confirm if GeoIP is returning the correct information. Check the error log after loading the front page of the site.
*/
@stevenkword
stevenkword / gist:443ec86671bdbd511508
Last active Aug 29, 2015
WordPress RSS Unit Tests
View gist:443ec86671bdbd511508
<?php
/**
* test the RSS 2.0 feed by generating a feed, parsing it, and checking that the
* parsed contents match the contents of the posts stored in the database. Since
* we're using a real XML parser, this confirms that the feed is valid, well formed,
* and contains the right stuff.
*
* @group feed
*/
class Tests_Feed_RSS2 extends WP_UnitTestCase {
View WP Head Style Overrides
<?php
/**
* Output style tags in wp_head
*
* @return null
*/
function wpe_action_wp_head_styles() {
// Only add this variable on the enterprise form
if ( is_single( 'enterprise-solutions-contact-form' ) ) {
@stevenkword
stevenkword / gist:59c994b7ca8925d47f61
Created Mar 11, 2015
Change Escaping Method for GUIDs in WordPress
View gist:59c994b7ca8925d47f61
<?php
remove_filter( 'the_guid', 'esc_url' );
function html_escape_the_guid( $guid ) {
return esc_html( $guid );
}
add_filter( 'the_guid', 'html_escape_the_guid' );