An animated HTML5 canvas logo. I was toying with the idea of using this for a project, but opted against it.
A Pen by Philip Newborough on CodePen.
<?php | |
if ( ! defined( 'WPINC' ) ) { die('Direct access prohibited!'); } | |
/** | |
* Conditionally include additional CSS and JS for page templates | |
*/ | |
function conditionally_enqueue_scripts() | |
{ | |
// Test for page template | |
if( is_page_template() ) | |
{ |
<?php | |
// Remove buttons from TinyMCE to make a simpler interface | |
function simpler_tinymce_buttons( $buttons ) | |
{ | |
$remove = array( | |
'aligncenter', | |
'alignright', | |
'alignleft', | |
'hr', | |
'wp_more', |
<?php | |
function global_is_user_logged_in() | |
{ | |
global $iewp_crunchstats_logged_in; | |
$is_user_logged_in = false; | |
if ( is_user_logged_in() == true ) | |
{ | |
$is_user_logged_in = true; | |
} | |
} |
#!/bin/bash | |
HOST=`cat /etc/hostname` | |
SUBJECT="Test Email from $HOST" | |
TO="[email protected]" | |
MSG="/tmp/mail-test.msg" | |
echo "This is a test email message from $HOST." > $MSG | |
echo "Please do not respond to this message." >> $MSG | |
mail -s "$SUBJECT" "$TO" < $MSG | |
exit |
<?php | |
// Set-up the loop with all custom post types | |
$post_types = array( 'post', 'link', 'snippet', 'doodle' ); | |
$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1; | |
$args = array( | |
'post_type' => $post_types, | |
'paged' => $paged, | |
'posts_per_page' => 10 | |
); | |
query_posts( $args ); |
<?php | |
/** | |
* WordPress function to fix pagination when combining custom post types in a single loop. | |
*/ | |
function fix_allcustomposts_pagination($qs) | |
{ | |
if( !isset( $qs['post_type'] ) && isset($qs['paged']) ) | |
{ | |
$qs['post_type'] = get_post_types($args = array( | |
'public' => true, |
An animated HTML5 canvas logo. I was toying with the idea of using this for a project, but opted against it.
A Pen by Philip Newborough on CodePen.
An animated HTML5 canvas logo. I was toying with the idea of using this for a project, but opted against it.
A Pen by Philip Newborough on CodePen.
Generates a RFC4122 version 4 compliant UUID which can be used as an API Key. Semantics, heh.
A Pen by Philip Newborough on CodePen.
<?php | |
/** | |
* Kill all emojis | |
* =============== | |
* See: http://wordpress.stackexchange.com/a/185578 | |
*/ | |
function disable_emojis() | |
{ | |
remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); | |
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); |