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 | |
// Rewrite of "get_the_post_thumbnail" for compatibility with jQuery LazyLoad plugin | |
function my_get_the_post_lazyload_thumbnail( $post_id = false, $size = 'full' ) { | |
if ( $post_id ) { | |
// Get the id of the attachment | |
$attachment_id = get_post_thumbnail_id( $post_id ); | |
if ( $attachment_id ) { | |
$src = wp_get_attachment_image_src( $attachment_id, $size ); | |
if ($src) { | |
$img = get_the_post_thumbnail( $post_id, $size, 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
<?php | |
// Filter for Genesis Parent theme to Customize favicon and add Apple Touch Icons | |
add_filter( 'genesis_pre_load_favicon', 'my_pre_load_favicon'); | |
function my_pre_load_favicon() { | |
echo '<link rel="shortcut icon" href="' . get_stylesheet_directory_uri() . '/lib/images/favicon.ico">'.PHP_EOL | |
.'<link rel="apple-touch-icon" href="touch-icon-iphone.png">'.PHP_EOL | |
.'<link rel="apple-touch-icon" sizes="76x76" href="' . get_stylesheet_directory_uri() . '/lib/images/logo-76.png">'.PHP_EOL | |
.'<link rel="apple-touch-icon" sizes="120x120" href="' . get_stylesheet_directory_uri() . '/lib/images/[email protected]">'.PHP_EOL | |
.'<link rel="apple-touch-icon" sizes="152x152" href="' . get_stylesheet_directory_uri() . '/lib/images/[email protected]">'; | |
} |
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
<!-- | |
Here's our Header "container" partial | |
_header.erb | |
--> | |
<header class="header"> | |
<section class="tool-bar row"> | |
<div class="large-12 columns"> | |
<%= partial "shared/_logo" %> | |
<div class="connect"> |
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
# Turn on Livereload for development to reload your browser atomatically when you save changes to source files. | |
configure :development do | |
activate :livereload | |
end | |
# Turn on CSS and JavaScript minification for your production build files. | |
configure :build do | |
activate :minify_css | |
activate :minify_javascript | |
end |
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
var CS = (function() { | |
var $ = jQuery; | |
return { | |
init: function() { | |
this.setFoundation(); | |
this.setJS(); | |
this.setMenuEvents(); |
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
// text-size-adjust | |
//------------------------------------------------ | |
// | |
// Values: none (default), auto, 100% | |
// | |
// Reference: | |
// https://developer.mozilla.org/en-US/docs/Web/CSS/text-size-adjust | |
// |
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
DROP TABLE %filltext:name=prefix:default=wp:width=6%_commentmeta; | |
DROP TABLE %filltext:name=prefix:default=wp:width=6%_comments; | |
DROP TABLE %filltext:name=prefix:default=wp:width=6%_links; | |
DROP TABLE %filltext:name=prefix:default=wp:width=6%_options; | |
DROP TABLE %filltext:name=prefix:default=wp:width=6%_postmeta; | |
DROP TABLE %filltext:name=prefix:default=wp:width=6%_posts; | |
DROP TABLE %filltext:name=prefix:default=wp:width=6%_term_relationships; | |
DROP TABLE %filltext:name=prefix:default=wp:width=6%_term_taxonomy; | |
DROP TABLE %filltext:name=prefix:default=wp:width=6%_terms; | |
DROP TABLE %filltext:name=prefix:default=wp:width=6%_usermeta; |
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 | |
/** | |
* Handles display of 404 page. | |
* | |
* This file requires the creation of a page with the slug 'page-not-found' | |
*/ | |
function jb_page_404(){ | |
genesis_custom_loop( array('pagename' => 'page-not-found', 'posts_per_page' => 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
/** | |
* truncate_words function to truncate a string of words to a specified number of words | |
* @param string $str The text string to split | |
* @param integer $words The number of words to extract. Defaults to 15 | |
*/ | |
function truncate_words( $str, $words = 15 ) | |
{ | |
$arr = preg_split( '/[\s]+/', $str, $words+1 ); | |
$arr = array_slice( $arr, 0, $words ); | |
return join( ' ', $arr ) . '…'; |
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
/** | |
* mm_show_admin_bar function. | |
* Filter to control which users see the admin bar. | |
* @access public | |
* @return false or true if user is admin. | |
*/ | |
function mm_show_admin_bar() { | |
if (current_user_can('administrator')) { | |
return true; | |
} else { |
NewerOlder