Skip to content

Instantly share code, notes, and snippets.

View travismillerweb's full-sized avatar

Travis Miller travismillerweb

View GitHub Profile
@travismillerweb
travismillerweb / remove-empty-p.php
Created September 14, 2014 16:15
PHP - Remove Empty P Tags from WordPress
// Removes P Tags from the_content
// Reference Link: https://coderwall.com/p/vg-i0w
add_filter('the_content', 'remove_empty_p', 20, 1);
function remove_empty_p($content){
$content = force_balance_tags($content);
return preg_replace('#<p>\s*+(<br\s*/*>)?\s*</p>#i', '', $content);
}
@travismillerweb
travismillerweb / replace-text.css
Created September 11, 2014 18:56
CSS - Replace Text via CSS (Hack)
.class {
visibility:hidden;
color:white;
}
.class:before {
content: "[Replaced Content]";
color:black;
visibility:visible;
}
@travismillerweb
travismillerweb / redirect-window.js
Created August 27, 2014 17:52
JS - Redirects & window.open script
/*
JS - Redirects & window.open script
Reference URL: http://davidwalsh.name/window-open
(Thanks David Walsh!)
*/
@travismillerweb
travismillerweb / pulse.css
Created August 9, 2014 22:47
CSS - Pulse CSS3 Animation
@-webkit-keyframes pulse {
0% { color: $slp-green; }
100% { color: lighten($slp-green, 5%);}
}
@-moz-keyframes pulse {
0% { color: $slp-green; }
100% { color: lighten($slp-green, 5%);}
}
@-o-keyframes pulse {
0% { color: $slp-green; }
// Sticky Footer CSS
// http://www.cssstickyfooter.com/
$sticky-footer-height: 80px; // must be same height as the footer
* {
margin: 0;
padding: 0;
}
@travismillerweb
travismillerweb / fire-once.js
Created June 30, 2014 21:40
JS - JavaScript Fire Once Pattern
/*
JavaScript Fire Once Pattern
Courtesy of David Walsh
Reference Link: http://davidwalsh.name/javascript-once
*/
// The "once" wrapper
@travismillerweb
travismillerweb / sass-install-uninstall-edge.md
Last active August 29, 2015 14:01
Sass - Install/Uninstall Bleeding Edge
@travismillerweb
travismillerweb / transform.css
Created May 24, 2014 16:42
CSS - Transform HR at angle
/*
CSS - Transform HR at angle
Found this while trying to figure out how to style a HR. Prettey Decent.
Reference Link http://webdesign.about.com/od/beginningcss/a/style_hr_tag.htm
*/
@travismillerweb
travismillerweb / hor-ver-lines.html
Created April 18, 2014 18:44
HTML - Horizontal and Vertical Lines
<!-- Horizontal Lines -->
<hr style="border-top: 3px dotted #998143">
<!-- Vertical Lines -->
<div style="border-right:3px dotted #998143;height:150px;text-align:center;padding-left:10px"></div>