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 | |
add_filter( 'template_include', 'var_template_include', 1000 ); | |
function var_template_include( $t ){ | |
$GLOBALS['current_theme_template'] = basename($t); | |
return $t; | |
} | |
function get_current_template( $echo = false ) { | |
if( !isset( $GLOBALS['current_theme_template'] ) ) |
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
// Start with a mixin | |
@mixin iconfont { | |
font-family: "foundation-icons"; // whatever your icon fonts name is | |
font-style: normal; | |
font-weight: normal; | |
font-variant: normal; | |
text-transform: none; | |
line-height: 1; | |
-webkit-font-smoothing: antialiased; | |
display: inline-block; |
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
<form id="contact" name="contact" method="post"> | |
<fieldset> | |
<label for="name" id="name">Name<span class="required">*</span></label> | |
<input type="text" name="name" id="name" size="30" value="" required/> | |
<label for="email" id="email">Email<span class="required">*</span></label> | |
<input type="text" name="email" id="email" size="30" value="" required/> | |
<label for="phone" id="phone">Phone</label> | |
<input type="text" name="phone" id="phone" size="30" value="" /> |
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 MODULE_update_7200() { | |
if( module_exists('MODULE')) { | |
module_disable(array('MODULE')); | |
drupal_uninstall_modules(array('MODULE')); | |
} | |
} |
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 todo_restrict_manage_posts() { | |
global $typenow; | |
$args=array( 'public' => true, '_builtin' => false ); | |
$post_types = get_post_types($args); | |
if ( in_array($typenow, $post_types) ) { | |
$filters = get_object_taxonomies($typenow); | |
foreach ($filters as $tax_slug) { | |
$tax_obj = get_taxonomy($tax_slug); | |
wp_dropdown_categories(array( | |
'show_option_all' => __('Show All '.$tax_obj->label ), |
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 | |
global $wp_query; | |
query_posts( | |
array_merge( | |
$wp_query->query, | |
array( | |
'order' => 'ASC', | |
'orderby'=>'title', | |
'posts_per_page' => 20, | |
) |
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
# Requre a specific version in this file: | |
# gem 'zurb-foundation', '=4.3.1' | |
require 'zurb-foundation' | |
# Require any additional compass plugins here. | |
# IE 9 and below only support up to 4095 CSS selectors | |
# This class will split all selectors after that point | |
class CssSplitter | |
def self.split(infile, outdir = File.dirname(infile), max_selectors = 4095) |
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($) { | |
$('a[href*=".jpg"], a[href*=".jpeg"], a[href*=".png"], a[href*=".gif"]').each(function(){ | |
//single image popup | |
if ($(this).parents('.gallery').length == 0) { | |
$(this).magnificPopup({type:'image'}); | |
} | |
}); | |
//gallery popup | |
$('.gallery').each(function() { | |
$(this).magnificPopup({ |
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
wp-config.php | |
wp-content/uploads/ | |
wp-content/blogs.dir/ | |
wp-content/upgrade/ | |
wp-content/backup-db/ | |
wp-content/advanced-cache.php | |
wp-content/wp-cache-config.php | |
sitemap.xml | |
*.log | |
wp-content/cache/ |
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 | |
$args = array( | |
'numberposts' => -1, // Using -1 loads all posts | |
'orderby' => 'menu_order', // This ensures images are in the order set in the page media manager | |
'order'=> 'ASC', | |
'post_mime_type' => 'image', // Make sure it doesn't pull other resources, like videos | |
'post_parent' => $post->ID, // Important part - ensures the associated images are loaded | |
'post_status' => null, | |
'post_type' => 'attachment' |