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
// ----------- | |
// Debugger that shows view port size. Helps when making responsive designs. | |
// ----------- | |
function showViewPortSize(display) { | |
if(display) { | |
var height = jQuery(window).height(); | |
var width = jQuery(window).width(); | |
jQuery('body').prepend('<div id="viewportsize" style="z-index:9999;position:fixed;top:40px;left:5px;color:#fff;background:#000;padding:10px">Height: '+height+'<br>Width: '+width+'</div>'); | |
jQuery(window).resize(function() { |
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
function filter_ptags_on_images($content){ | |
return preg_replace('/<p>\s*(<a .*>)?\s*(<img .* \/>)\s*(<\/a>)?\s*<\/p>/iU', '\1\2\3', $content); | |
} | |
add_filter('the_content', 'filter_ptags_on_images'); |
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
// I needed flatuicolors.com as Sass variables... | |
// In your console, run: | |
$('.color').get().map(function(el) { return "$" + el.classList[1] + ": " + el.getAttribute('data-clipboard-text') + ';' }).join('\r\n'); | |
// Output: | |
// $turquoise: #1abc9c; | |
// $emerland: #2ecc71; | |
// $peter-river: #3498db; | |
// $amethyst: #9b59b6; | |
// $wet-asphalt: #34495e; |
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
$lightgray : #819090; | |
$gray : #708284; | |
$mediumgray : #536870; | |
$darkgray : #475B62; | |
$darkblue : #0A2933; | |
$darkerblue : #042029; | |
$paleryellow : #FCF4DC; | |
$paleyellow : #EAE3CB; | |
$yellow : #A57706; | |
$orange : #BD3613; |
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
$turquoise: #1abc9c; | |
$emerland: #2ecc71; | |
$peter-river: #3498db; | |
$amethyst: #9b59b6; | |
$wet-asphalt: #34495e; | |
$green-sea: #16a085; | |
$nephritis: #27ae60; | |
$belize-hole: #2980b9; | |
$wisteria: #8e44ad; | |
$midnight-blue: #2c3e50; |
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
// Opacity should be on a 100 point scale (0-100 instead of 0.0-1.0) | |
// This should be used to supplement a normal border definition as it | |
// only deals with the 'border-color' property. | |
@mixin border-opacity($color, $opacity) { | |
$opacity: $opacity / 100; | |
// Unsupporting browsers get this | |
border-color: $color; | |
// Browsers that support RGBA will get this instead |
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 | |
// ------------------------------------------------- | |
// Remember to replace the word prefix in the function name and actions/filters to the themes name, use find replace for quick change. | |
// ------------------------------------------------- | |
add_action( 'after_setup_theme', 'prefix_theme_setup' ); | |
function prefix_theme_setup() { | |
global $content_width; |
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 global $current_user; | |
// get_currentuserinfo(); | |
// echo 'Username: ' . $current_user->user_login . "\n"; | |
// echo 'User email: ' . $current_user->user_email . "\n"; | |
// echo 'User first name: ' . $current_user->user_firstname . "\n"; | |
// echo 'User last name: ' . $current_user->user_lastname . "\n"; | |
// echo 'User display name: ' . $current_user->display_name . "\n"; | |
// echo 'User ID: ' . $current_user->ID . "\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
# Require any additional compass plugins here. | |
add_import_path "bower_components/foundation/scss" | |
require 'fileutils' | |
on_stylesheet_saved do |file| | |
if File.exists?(file) && File.basename(file) == "style.css" | |
puts "Moving: #{file}" | |
FileUtils.mv(file, File.dirname(file) + "/../" + File.basename(file)) | |
end | |
end |
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
.hide-text { | |
text-indent: 100%; | |
white-space: nowrap; | |
overflow: hidden; | |
} |