This file contains hidden or 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 | |
/* Return the ultimate ancestor of a post */ | |
function get_post_ancestor($postID) { | |
$post = get_post($postID); | |
if (!is_object($post)) return; | |
while ($post->post_parent != 0): $post = get_post($post->post_parent); endwhile; | |
return $post; | |
} |
This file contains hidden or 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 | |
class My_Shortcode extends Shortcode { | |
public function main($atts, $content) { | |
echo "This is a really easy way to add shortcodes!"; | |
} | |
} | |
$My_Shortcode = new My_Shortcode; | |
$My_Shortcode->add(); |
This file contains hidden or 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 include_font_awesome() { | |
wp_enqueue_style('font_awesome', '//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css'); | |
} | |
/* When 'wp_enqueue_scripts' takes place, trigger this function */ | |
add_action('wp_enqueue_scripts', 'include_font_awesome', 100); |
This file contains hidden or 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
#!/bin/bash | |
blue="\e[0;34m" | |
purple="\e[0;35m" | |
orange="\e[0;33m" | |
green="\e[0;32m" | |
white="\e[0;37m" | |
red="\e[0;31m" | |
echo "-------------------------------------------" |
This file contains hidden or 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
.branding { | |
display: block; | |
.between(@grid-float-breakpoint, @screen-md, { | |
display: none; | |
}); | |
} | |
.between(@min, @max, @rules) { | |
@media screen and (min-width: @min) and (max-width: @max) { |
This file contains hidden or 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
calculateWidthOld: function (elem) { | |
var tr, values, transform, | |
a, b, | |
angle, width, height, | |
adjustedWidth; | |
transform = [ | |
elem.css('-webkit-transform'), | |
elem.css('-moz-transform'), | |
elem.css('-ms-transform'), |
This file contains hidden or 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
zip -r <project_name>.zip Site -x *.git* -x *node_modules* |
This file contains hidden or 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 set for homebrew | |
export PATH="/usr/local/bin:$PATH" | |
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ " | |
export CLICOLOR=1 | |
export LSCOLORS=ExFxBxDxCxegedabagacad | |
alias ls='ls -GFh' | |
alias lwj='cd /Volumes/CC\&A\ LIVE\ WEB\ JOBS/' | |
alias reinit='cd "`pwd`"' |
OlderNewer