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
<?php | |
class Bootstrap_Walker_Nav_Menu extends Walker_Nav_Menu { | |
function start_lvl( &$output, $depth ) { | |
//In a child UL, add the 'dropdown-menu' class | |
$indent = str_repeat( "\t", $depth ); | |
$output .= "\n$indent<ul class=\"dropdown-menu\">\n"; |
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
/* Effectively Containing Floats · @shayhowe · http://www.shayhowe.com */ | |
.group:before, | |
.group:after { | |
content: ""; | |
display: table; | |
} | |
.group:after { | |
clear: both; | |
} |
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
@media (min-width:320px) { /* smartphones, portrait iPhone, portrait 480x320 phones (Android) */ } | |
@media (min-width:480px) { /* smartphones, Android phones, landscape iPhone */ } | |
@media (min-width:600px) { /* portrait tablets, portrait iPad, e-readers (Nook/Kindle), landscape 800x480 phones (Android) */ } | |
@media (min-width:801px) { /* tablet, landscape iPad, lo-res laptops ands desktops */ } | |
@media (min-width:1025px) { /* big landscape tablets, laptops, and desktops */ } | |
@media (min-width:1281px) { /* hi-res laptops and desktops */ } |
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
<?php | |
$file = '/path/to/file.png'; | |
$filename = basename($file); | |
$upload_file = wp_upload_bits($filename, null, file_get_contents($file)); | |
if (!$upload_file['error']) { | |
$wp_filetype = wp_check_filetype($filename, null ); | |
$attachment = array( | |
'post_mime_type' => $wp_filetype['type'], | |
'post_parent' => $parent_post_id, |