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 | |
get_template_part( 'archive' ); |
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 | |
/** | |
* Adds font smoothing to MP6 in the Admin Bar and the entire WP Admin area. | |
* | |
* @print HTML | |
* @action admin_head | |
* @action wp_head | |
*/ | |
function fjarrett_mp6_font_smoothing() { | |
if ( ! is_plugin_active( 'mp6/mp6.php' ) ) |
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 | |
/** | |
* Log handler | |
* @param string $message sprintf-ready error message string | |
* @param array $args sprintf (and extra) arguments to use | |
* @param int $object_id Target object id | |
* @param string $action Action performed (stream_action) | |
* @param int $user_id User responsible for the action | |
* @param array $contexts Contexts of the action |
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 | |
echo -n "Enter a URL to load test: " | |
read URL | |
# Ensure the URL has a trailing slash | |
[[ ${URL:${#URL}-1:1} != "/" ]] && URL="$URL/"; : | |
echo -n "Number of requests: " | |
read REQUESTS |
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 | |
add_action( 'plugins_loaded', function() { | |
add_filter( 'locale', function( $locale ) { | |
return is_admin() ? 'en_US' : $locale; | |
} ); |
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
<div id="top"></div> | |
<p>The purpose of this HTML is to help determine what default settings are with CSS and to make sure that all possible HTML Elements are included in this HTML so as to not miss any possible Elements when designing a site.</p> | |
<hr /> | |
<h1 id="headings">Heading 1</h1> | |
<h2>Heading 2</h2> | |
<h3>Heading 3</h3> | |
<h4>Heading 4</h4> |
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 | |
# | |
# Keep a plugin version between two sites in sync. | |
# If one host has a newer version, the other will | |
# be updated to match. | |
# | |
# EXAMPLE | |
# plugin_version_sync.sh <plugin> <host-1> <host-2> | |
PLUGIN=$1 |
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 | |
/** | |
* Return an array of CSS selectors that have certain properties. | |
* | |
* Example: fjarrett_search_css( 'font-family: "Open Sans"' ) | |
* Result: array( 'h1', 'h2', 'h3', 'h4', 'h5', 'p', 'blockquote' ); | |
* | |
* @param string $path | |
* @param string $search |
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 | |
/** | |
* This class is designed to return a basic value by parsing the dynamic | |
* static method name you call to determine its type and value. | |
* | |
* It's useful for filtering values in WordPress quickly without having | |
* to create a callback function. Think of this as a continuation of the | |
* callback helpers already in WordPress: __return_true(), et al. | |
* |
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
/* Select rows that contain serialized data */ | |
SELECT * FROM `wp_options` WHERE `option_value` RLIKE '(a:[0-9]+:{)|(s:[0-9]+:)|(i:[0-9]+;)|(O:[0-9]+:\")'; | |
/* Select rows that don't contain serialized data */ | |
SELECT * FROM `wp_options` WHERE `option_value` NOT RLIKE '(a:[0-9]+:{)|(s:[0-9]+:)|(i:[0-9]+;)|(O:[0-9]+:\")'; |