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 | |
/** | |
* Check for parent and sub categories | |
* | |
* @param int $id | |
* @return bool | |
*/ | |
function ja_is_category_deep( $id = '' ) { | |
if ( !is_category() || empty( $id ) ) | |
return false; |
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 | |
/** | |
* Display default tax name on archives if no headline is provided | |
* | |
* @since 1.0.0 | |
* @param string $headline | |
* @param object $term | |
* @return string | |
*/ | |
function ja_tax_default_headline( $headline, $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 | |
/** | |
* Creates nested date archive list for a specific category | |
* | |
* @since 1.0.0 | |
*/ | |
function ja_category_archive_list() { | |
global $post; |
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 | |
/** | |
* Basic mobile detection for Synthesis accounts with NGINX caching. | |
* | |
* @since 1.0.0 | |
* @return boolean | |
*/ | |
function ja_is_mobile() { | |
if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) |
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
jQuery(document).ready(function($){ | |
// Notice bar | |
// Make sure and enqueue jquery cookie first - https://github.com/carhartl/jquery-cookie | |
var site_notice = $.cookie('site-notice'); | |
if ( site_notice == null ) { | |
$('#site-notice').prependTo('body').slideToggle(); | |
} | |
$('#site-notice .close').on( 'click', function() { | |
$('#sitenotice').slideToggle(); | |
$.cookie('site-notice', 'hide', { expires: 60 }); |
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($){ | |
$.fn.setPlaceholder = function(){ | |
return this.each(function(){ | |
var label = $(this).parent().prev(); | |
label.hide(); | |
var label = $(this).parent().prev().text().replace('*',''); | |
$(this).attr('placeholder',label); | |
}); | |
}; | |
})(jQuery); |
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
jQuery(document).ready(function($){ | |
var showed = false; | |
function floating_header() { | |
if ( $(window).width() > 700 ) { | |
window_scroll = $(this).scrollTop(); | |
if ( window_scroll > 220 ) { | |
if ( showed == false ) { | |
$('#floating-header').slideDown('fast'); | |
//alert('show'); |
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 | |
/** | |
* Inline javascript | |
* | |
* @since 1.0.0 | |
*/ | |
function ja_pinterest_button() { | |
?> | |
<script type="text/javascript"> | |
jQuery(document).ready(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
<?php | |
$url = urlencode( get_permalink() ); | |
$img = urlencode( genesis_get_image( array( 'format' => 'url' ) ) ); | |
$title = urlencode( get_the_title() ); | |
echo '<a href="http://www.facebook.com/sharer/sharer.php?u=' . $url . '&t=' . $title .'" class="share-button facebook" target="_blank">Share on Facebook</a>'; | |
echo '<a href="http://www.twitter.com/intent/tweet?url=' . $url . '&text=' . $title . '" class="share-button twitter" target="_blank">Tweet Me!</a>'; | |
echo '<a href="http://pinterest.com/pin/create/button/?url=' . $url . '&media=' . $img . ' &description=' . $title . '" class="share-button pinterest" target="_blank">Pinterest</a>'; | |
echo '<a href="http://plus.google.com/share?url=' . $url . '" class="share-button google" target="_blank">Google+</a>'; | |
echo '<a href="http://www.linkedin.com/shareArticle?mini=true&url=' . $url . '" class="share-button linkedin" target="_blank">LinkedIn</a>'; | |
echo '<a href="http://www.reddit.com/submit?url=' . $url . '" class="share-button reddit" target="_blank">LinkedIn</ |
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 | |
/** | |
* Checks if current or top level pages has a specific page template set. | |
* | |
* @param string | |
* @return mixed false or page id | |
*/ | |
function ja_is_page_template_deep( $template = '' ) { | |
if ( !empty( $template ) && is_page() ) { | |
$parents = get_post_ancestors( get_the_ID() ); |