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 | |
//do not add in opening php tag | |
/** | |
* Add in ScrollReveal.js in a Genesis Theme | |
* | |
* @package Add in ScrollReveal.js in a Genesis Theme | |
* @author Neil Gee | |
* @link http://wpbeaches.com/using-scrollreveal-js-wordpress-genesis-theme/ |
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 | |
/** | |
* Abstract class for making API routes | |
* | |
* @package @todo | |
* @author Josh Pollock <Josh@JoshPress.net> | |
* @license GPL-2.0+ | |
* @link | |
* @copyright 2015 Josh Pollock | |
*/ |
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 //<~ don't add me | |
<?php if ( get_header_image() ) : ?> | |
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"> | |
<img src="<?php header_image(); ?>" width="<?php echo esc_attr( get_custom_header()->width ); ?>" height="<?php echo esc_attr( get_custom_header()->height ); ?>" alt=""> | |
</a> | |
<?php endif; // End header image check. ?> |
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 | |
if (!function_exists(get_excerpt_by_id)) { | |
/** | |
* Returns excerpt by ID. WP_Post->post_excerpt if it presents, wp_trim_words on other case. | |
* @param mixed $post WP_Post object or post ID. Accepts WP_Post object or post ID (integer or string); | |
* @return string Excerpt | |
*/ | |
function get_excerpt_by_id($post) { | |
$return_excerpt = function($post) { | |
if ($post->post_excerpt == '') |
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
/** | |
* This file is enqueued by means of wp_enqueue_script() - variables are passed | |
* in from PHP by means of wp_localize_script() | |
* | |
*/ | |
/* TM: We use an anonymous function to invoke the JavaScript. Also refactored for proper | |
* WordPress coding standards. | |
*/ | |
(function( $ ) { |
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
/* | |
Compliant with Twitter's Developer Display Requirements: | |
https://dev.twitter.com/terms/display-requirements | |
*/ | |
var linkify_result = function (tweet /* tweet object from the results array */) { | |
var subs = [], | |
last_offset = 0, | |
new_tweet = '', | |
entity, | |
replace = { |
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
function hasClass(element, className) { | |
return element.className && new RegExp("(^|\\s)" + className + "(\\s|$)").test(element.className); | |
} | |
var myDiv = document.getElementById('MyDiv'); | |
hasClass(myDiv, 'active'); | |
// OR |
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
angular.module('itemServices', ['ngResource']) | |
.factory('Item', ['$resource', | |
function ($resource) { | |
return $resource('items/:id', | |
{id: '@id'}, | |
{ | |
query: { | |
isArray: true, | |
method: 'GET', | |
params: {}, |
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 | |
/** | |
* Template Name: Ships | |
*/ | |
get_header(); ?> | |
<div id="primary" class="content-area"> | |
<div id="content" class="site-content" role="main"> |
OlderNewer