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 | |
$slides = new WP_Query( | |
array( | |
'post_type' => 'slideshow', | |
'posts_per_page' => -1, | |
'orderby' => 'menu_order', | |
'order' => 'asc', | |
) | |
); |
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 | |
/** | |
* Plugin Name: Multiple Roles per User | |
* Description: Allows anyone who can edit users to set multiple roles per user. In a default WordPress environment that wouldn't have much of an effect, since the user would have the privileges of the top-privileged role that you assign to him. But if you have custom roles with custom privileges, this might be helpful. | |
* Version: 1 | |
* Author: nikolov.tmw | |
* Author URI: http://paiyakdev.com/ | |
* License: GPL2 | |
*/ | |
/* |
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 | |
$listings = array( | |
array( | |
'address' => '3410 Taft Blvd', | |
'city' => 'Wichita Falls', | |
'state' => 'Tx', | |
'zip' => 76308 | |
) | |
); |
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 | |
/** | |
* Auto-versioning CSS and JavaScript in WordPress | |
* @author Eric Binnion | |
* http://manofhustle.com | |
*/ | |
add_action("wp_enqueue_scripts", "auto_version_scripts", 20); | |
function auto_version_scripts() { | |
// Get last modified timestamp of CSS file in /css/style.css |
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
#http:\/\/manofhustle.com\/(\S*\.(?:jpe?g|png|gif|ttf|otf|svg|woff|xml))# => http://cdn.manofhustle.com/$1 | |
#http:\/\/manofhustle.com\/(\S*js)# => http://js.manofhustle.com/$1 | |
#http:\/\/manofhustle.com\/(\S*css)# => http://css.manofhustle.com/$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
<?php | |
/** | |
* The base configurations of the WordPress. | |
* | |
* This file has the following configurations: MySQL settings, Table Prefix, | |
* Secret Keys, WordPress Language, and ABSPATH. You can find more information | |
* by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing | |
* wp-config.php} Codex page. You can get the MySQL settings from your web host. | |
* | |
* This file is used by the wp-config.php creation script during the |
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
PATH=$PATH:~/bin | |
export PATH | |
alias ll='ls -lah' | |
# Git aliases | |
alias softreset='git reset --soft HEAD^' | |
alias hardreset='git reset --hard HEAD^' | |
# Following http://viget.com/inspire/terminal-aliases-for-git |
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 | |
/* From https://www.usps.com/send/official-abbreviations.htm */ | |
$us_state_abbrevs_names = array( | |
'AL'=>'ALABAMA', | |
'AK'=>'ALASKA', | |
'AS'=>'AMERICAN SAMOA', | |
'AZ'=>'ARIZONA', | |
'AR'=>'ARKANSAS', |
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 | |
function foundation_pagination() { | |
global $wp_query; | |
$big = 999999999; | |
$links = paginate_links( array( | |
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), | |
'format' => '?paged=%#%', |
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
module.exports = function(grunt) { | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
sass: { | |
dist: { | |
options: { | |
sourceComments: 'map', | |
includePaths: require('node-bourbon').includePaths, |