-
Notifications
You must be signed in to change notification settings - Fork 1
/
functions.php
executable file
·64 lines (55 loc) · 2.11 KB
/
functions.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
// Translations can be filed in the /languages/ directory
load_theme_textdomain( 'html5reset', TEMPLATEPATH . '/languages' );
$locale = get_locale();
$locale_file = TEMPLATEPATH . "/languages/$locale.php";
if ( is_readable($locale_file) )
require_once($locale_file);
// Add RSS links to <head> section
automatic_feed_links();
// Clean up the <head>
function removeHeadLinks() {
remove_action('wp_head', 'rsd_link');
remove_action('wp_head', 'wlwmanifest_link');
}
add_action('init', 'removeHeadLinks');
remove_action('wp_head', 'wp_generator');
function my_custom_login_logo() {
echo '<style type="text/css">
h1 a { height:140px; background-image:url('.get_bloginfo('template_directory').'/images/logo.png) !important; }
</style>';}
<?php //Add Twitter in Author Profile and remove Yahoo IM, Jabber, AIM
function add_twitter_contactmethod( $contactmethods ) {
// Add Twitter
$contactmethods['twitter'] = 'Twitter';
// Remove Yahoo IM
unset($contactmethods['yim']);
// Remove Jabber
unset($contactmethods['jabber']);
// Remove AIM
unset($contactmethods['aim']);
return $contactmethods;
}
add_filter('user_contactmethods','add_twitter_contactmethod',10,1); ?>
add_action('login_head', 'my_custom_login_logo');
if (function_exists('register_sidebar')) {
register_sidebar(array(
'name' => __('Sidebar Widgets','html5reset' ),
'id' => 'sidebar-widgets',
'description' => __( 'These are widgets for the sidebar.','html5reset' ),
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h2>',
'after_title' => '</h2>'
));
}
if ( function_exists( 'register_nav_menus' ) ) {
register_nav_menus(
array(
'main_menu' => 'Main Menu' ,
'footer_menu' => 'Footer Menu'
)
);
}
add_theme_support( 'post-formats', array('aside', 'gallery', 'link', 'image', 'quote', 'status', 'audio', 'chat', 'video')); // Add 3.1 post format theme support.
?>