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 class="home-tweet"> | |
<h6>Latest Tweet</h6> | |
<a class="twitter-timeline" data-dnt="true" href="[[DIRECT TWITTER PROFILE URL]]" data-widget-id="[[TWITTER WIDGET ID]]" | |
data-link-color="#ce2029" data-chrome="nofooter noheader noscrollbar noborders transparent" data-tweet-limit="1"> | |
<script>!function (d, s, id) { | |
var js, fjs = d.getElementsByTagName(s)[0], p = /^http:/.test(d.location) ? 'http' : 'https'; | |
if (!d.getElementById(id)) { | |
js = d.createElement(s); | |
js.id = id; | |
js.src = p + "://platform.twitter.com/widgets.js"; |
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
<script> | |
( function() { | |
"use strict"; | |
// Get headline link URLs | |
var wpdHeadlines = document.getElementsByClassName('headline-link'); | |
// Combine and win | |
var wpdTrackThese = Array.prototype.slice.call(wpdHeadlines); |
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
/* | |
* Meta fields for media uploads | |
*/ | |
/* | |
* @param array $form_fields | |
* @param object $post | |
* | |
* @return array | |
*/ |
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
$blocked = get_option('blacklist_keys'); | |
$blocked = str_replace( "\r", "\n", $blocked ); | |
$blocked_arr = explode( "\n", $blocked ); | |
$blocked_arr = array_map('trim', $blocked_arr); | |
$final_blocked_arr = array(); | |
foreach ($blocked_arr as $ip) { | |
$ip = trim($ip); | |
if ( filter_var( $ip, FILTER_VALIDATE_IP ) ) { |
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
/** | |
* Redirect on mobile UA | |
*/ | |
function tenup_mobile_redirect() { | |
$useragent = $_SERVER['HTTP_USER_AGENT']; | |
// From http://detectmobilebrowsers.com, set 8/9/2013 | |
// We're looking for user agents that are associated with mobile devices | |
if ( preg_match( '/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i', $useragent ) || preg_match( '/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\ |
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
/* | |
* @param array $form_fields | |
* @param object $post | |
* | |
* @return array | |
*/ | |
function tenup_attachment_fields_to_edit ( $form_fields, $post ) | |
{ | |
$form_fields[ "use_as_header_img" ] = array( |
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
/** | |
* Get the various parameters from a URL piece, hash or query | |
* | |
* @param params | |
* | |
* @returns {{}} | |
*/ | |
function parseUrlParams( params ) { | |
'use strict'; |
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 | |
/** | |
* Completely nuke comments support | |
* Need to also also turn off comments/pingbacks at wp-admin > Settings > Discussion | |
* Need to also turn off comments for posts individually (Bulk Edit or DB find/replace) | |
* | |
* Adapted from: https://www.dfactory.eu/wordpress-how-to/turn-off-disable-comments/ | |
* | |
* @package WordPress |
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
/** | |
* Find next available server number | |
* | |
* @param servers | |
* | |
* @return {int} | |
*/ | |
function next_server_number( servers ) { | |
'use strict'; |
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
// Primary colors | |
// http://styleguide.auth0.com/#/design/primary-colors | |
$color-red: #EB5424; | |
$color-blue-light: #44C7F4; | |
$color-blue: #16214D; | |
$color-yellow: #EACA2C; | |
// Secondary colors | |
// http://styleguide.auth0.com/#/design/secondary-colors |