mirror of
https://github.com/kennethreitz/wordpress-theme-skeleton.git
synced 2026-06-05 23:20:18 +00:00
initial development
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
// Saftey first.
|
||||
if (!empty($_SERVER['SCRIPT_FILENAME']) && 'functions.php' == basename($_SERVER['SCRIPT_FILENAME']))
|
||||
die ('Please do not load this page directly. Thanks!');
|
||||
|
||||
// Plug it
|
||||
header('X-Powered-By: Semantics are everything. me@kennethreitz.com for more info.');
|
||||
|
||||
// Add awesome brower classes to body tag
|
||||
add_filter('body_class','browser_body_class');
|
||||
function browser_body_class($classes) {
|
||||
global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone;
|
||||
|
||||
if($is_lynx) $classes[] = 'lynx';
|
||||
elseif($is_gecko) $classes[] = 'gecko';
|
||||
elseif($is_opera) $classes[] = 'opera';
|
||||
elseif($is_NS4) $classes[] = 'ns4';
|
||||
elseif($is_safari) $classes[] = 'safari';
|
||||
elseif($is_chrome) $classes[] = 'chrome';
|
||||
elseif($is_IE) $classes[] = 'ie';
|
||||
else $classes[] = 'unknown';
|
||||
|
||||
if($is_iphone) $classes[] = 'iphone';
|
||||
return $classes;
|
||||
}
|
||||
|
||||
// Remove usless the_generator meta tag
|
||||
add_filter( 'the_generator', create_function('$a', "return null;") );
|
||||
|
||||
// // Custom Logo
|
||||
// function blueridgephoto_login_logo() {
|
||||
// echo '<style type="text/css">
|
||||
// h1 a { background-image:url('.get_bloginfo('template_directory').'/images/custom-login-logo.gif) !important; }
|
||||
// </style>';
|
||||
// }
|
||||
//
|
||||
// add_action('login_head', 'blueridgephoto_ogin_logo');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user