<div class="alignleft"><?php next_posts_link('« Previous Entries'); ?> </div> <div class="alignright"><?php previous_posts_link('Next Entries »'); ?> </div> </div> <?php } ?> <?php } else { // Show 404 message if (function_exists('bb_404')) { bb_404(); } } ?> </div><!-- end #content-main --> <div id="content-sub"> <?php get_sidebar(); ?> </div> <!-- end #content-sub --> </div><!-- end #content --> <?php get_footer();
/** * do a 404 header and check file types * if bad file type then die properly else continue and print 404 message */ function bb_404Response() { header('HTTP/1.1 404 Not Found'); if (!empty($_SERVER['REQUEST_URI'])) { $fileExtension = strtolower(pathinfo($_SERVER['REQUEST_URI'], PATHINFO_EXTENSION)); } else { $fileExtension = ''; } $badFileTypes = array('css', 'txt', 'jpg', 'gif', 'rar', 'zip', 'png', 'bmp', 'tar', 'doc', 'xml', 'js'); $badFileTypes = apply_filters('bb_404BadFileTypes', $badFileTypes); if (in_array($fileExtension, $badFileTypes)) { bb_404(); die; } }