This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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' ) ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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!' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Activate the wordpress importer | |
wp plugin activate wordpress-importer --url=http://localhost/example.com/ | |
# Iterate over all of the import files in a given folder. | |
for f in myfolder/*.xml; do wp import $f --authors=skip --skip=attachment --url=localhost/example.com/; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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/>';} |