Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
<?php | |
/** | |
* This little class records how long it takes each WordPress action or filter | |
* to execute which gives a good indicator of what hooks are being slow. | |
* You can then debug those hooks to see what hooked functions are causing problems. | |
* | |
* This class does NOT time the core WordPress code that is being run between hooks. | |
* You could use similar code to this that doesn't have an end processor to do that. | |
* |
#!/bin/sh | |
cd /Users/ajmorris/Dropbox/Websites | |
printf "What would you like to name your new WordPress root directory (i.e. mywpdir)?" | |
read NEWDIR | |
git clone https://github.com/WordPress/WordPress.git $NEWDIR | |
cd $NEWDIR | |
printf "What version of WordPress would you like to use? It must be a non-beta release (i.e. 3.5.1)." | |
read WPVER | |
git checkout $WPVER | |
rm -rf .git |
#content-wrapper | |
+container | |
#about | |
// Default (smallest screens) | |
+column(100%) | |
background-color: #ccc | |
// Respond to other screen widths |
/* | |
Theme Name: Headway Fire Child Theme | |
Theme URI: http://headwaythemes.com | |
Description: A fiery take on a powerful element. This child theme features gradients and rounded corners in all the right places. It also contains separate widget styles, text shadows and a subtle black background. | |
Version: 0.1 | |
Author: Headway Themes | |
Author URI: http://headwaythemes.com | |
Template: headway | |
*/ |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
<?php | |
add_action('headway_html_open', 'aj_add_header'); | |
function aj_add_header() { | |
echo '<div class="aj-header">Hello from the header!</div>'; | |
} | |
add_action('headway_whitewrap_close', 'aj_add_footer'); |
// Add this code snippet after including jQuery | |
// The if statement protects you in case you forget to remove this | |
// once you upgrade to 1.7, or if you try to use it with jQuery 1.3 | |
if (jQuery.event.props[17] === "layerX" ) { | |
jQuery.event.props.splice(17,2); | |
} |
// `Clearfix | |
//-------------------------------------------------- | |
// Can be added to other style rules via: | |
// | |
// #foobar | |
// @extend .clearfix | |
.clearfix | |
zoom: 1 |
// `Clearfix | |
//-------------------------------------------------- | |
// Can be added to other style rules via: | |
// | |
// #foobar | |
// @extend .clearfix | |
.clearfix:before, | |
.clearfix:after |
@mixin ie6 { * html & { @content } } | |
#logo { | |
background-image: url("/images/logo.png"); | |
@include ie6 { background-image: url("/images/logo.gif"); } | |
} |