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
/************************************** | |
*// Dynamic Word Wrapping | |
**************************************/ | |
function wrapWords() { | |
var element = document.getElementById('element-id'); // grab entry-title element | |
if (element != null) { // make sure it is on this page | |
var string = element.innerHTML; // grab its contents | |
string = string.replace(/<(?:.|\n)*?>/gm, ''); // strip it of any html elements (i.e. a <br> from previous run through) | |
var array = string.split(" "); // break the string into an array of words | |
element.innerHTML = ""; // delete the element's contents |
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
$(window).resize(function(){ | |
waitForFinalEvent(function(){ | |
yourFunction(); | |
}, 500, "unique id"); | |
}); | |
/************************************** | |
*// Wait For It... | |
**************************************/ | |
var waitForFinalEvent = (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
add_action('wp_head', 'show_template'); | |
function show_template() { | |
global $template; | |
print_r($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
function cdtheme { | |
dir=${PWD##*/} | |
cd wp-content/themes/$dir | |
} |
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 mamptowordpress { | |
dir=/Applications/MAMP/conf/apache | |
rm $dir/httpd.conf | |
ln -s $dir/httpd-wordpress.conf $dir/httpd.conf | |
stopMAMP | |
# startMAMP | |
echo "Happy Wordpress Developing!" | |
} |