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 | |
// WORDPRESS 3.4 THEME OPTIONS | |
add_action( 'customize_register', 'hg_customize_register' ); | |
function hg_customize_register($wp_customize) | |
{ | |
$colors = array(); | |
$colors[] = array( 'slug'=>'content_bg_color', 'default' => '#ffffff', 'label' => __( 'Content Background Color', 'YOUR_THEME_NAME' ) ); | |
$colors[] = array( 'slug'=>'content_text_color', 'default' => '#000000', 'label' => __( 'Content Text Color', 'YOUR_THEME_NAME' ) ); | |
foreach($colors as $color) |
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
# CANONICALIZATION SNIPPETS | |
<IfModule mod_alias.c> | |
# redirect empty tag requests to homepage | |
RedirectMatch 301 ^/tag/?$ http://example.com/ | |
# redirect empty page requests to homepage | |
RedirectMatch 301 ^/page/?$ http://example.com/ | |
# redirect empty search requests to homepage | |
RedirectMatch 301 ^/search/?$ http://example.com/ |
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 // combine all CSS files | |
header('Content-type: text/css'); | |
$path_to_css = '/css'; // edit path to css directory | |
function get_files($dir = '.', $sort = 0) { | |
$files = scandir($dir, $sort); | |
$files = array_diff($files, array('.', '..')); | |
return $files; | |
} | |
$files = get_files($path_to_css, 1); | |
foreach($files as $file) { |
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
// Break Out of Frames for WordPress | |
function break_out_of_frames() { | |
if (!is_preview()) { | |
echo "\n<script type=\"text/javascript\">"; | |
echo "\n<!--"; | |
echo "\nif (parent.frames.length > 0) { parent.location.href = location.href; }"; | |
echo "\n-->"; | |
echo "\n</script>\n\n"; | |
} | |
} |
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
// ================================================================== | |
// Flexbox | |
// | |
// Implementation based on Chris Coyier's article: | |
// Using Flexbox: Mixing Old and New for the Best Browser Support || http://css-tricks.com/using-flexbox/ | |
// ================================================================== | |
// Flexbox Context (applied to container element of flex items) | |
@mixin flex-display { | |
@include experimental-value(display, box, -moz, -webkit, not -o, -ms, not -khtml, official); // Old |
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
<link href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet"> | |
<div id="wrapper"> | |
<h1><i class='icon-sort-by-attributes'></i> CSS3 <span>Card Deck Drop Down</span></h1> | |
<div class="card-drop"> | |
<a class='toggle' href="#"> | |
<i class='icon-suitcase'></i> | |
<span class='label-active'>Everyting</span> | |
</a> | |
<ul> |
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
<link href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet"> | |
<div id="wrapper"> | |
<h1><i class='icon-sort-by-attributes'></i> CSS3 <span>Card Deck Drop Down</span></h1> | |
<div class="card-drop"> | |
<a class='toggle' href="#"> | |
<i class='icon-suitcase'></i> | |
<span class='label-active'>Everyting</span> | |
</a> | |
<ul> |
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
<span contenteditable> | |
<p>This is a compilation of different usages of text-shadow, and hopefully captures most of them. If something's missing, feel free to message me or just fork it and add it yourself. Also, everything here is contenteditable so feel free to mess around with that.<br/> | |
NOTE: includes ugly ones too.</p> | |
<h1 class="basic">Basic</h1> | |
<h1 class="letterpress">LetterPress</h1> | |
<h1 class="hard-shadow">Hard Shadow</h1> | |
<h1 class="vintage"><span>Vintage</span></h1> | |
<h1 class="distant">Distant</h1> | |
<h1 class="jumbled">Jumbled</h1> | |
<h1 class="large-blur">Large Blur</h1> |
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
<header> | |
<span class="entypo-dot-3 right"></span> | |
<div class="social"> | |
<span class="entypo-facebook"></span> | |
<span class="entypo-twitter"></span> | |
<span class="entypo-gplus"></span> | |
<span class="entypo-tumblr"></span> | |
</div> | |
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
<div class="widget"> | |
<ol class="widget-list" id="managers"> | |
<li> | |
<a class="widget-list-link"> | |
<img src="http://www.gravatar.com/avatar/47?f=y&s=64&d=identicon"> | |
Manager #1 <span>481 followers</span> | |
</a> | |
</li> | |
<li> | |
<a class="widget-list-link"> |
OlderNewer