2012-05-29 23:42:46 +02:00
|
|
|
<?php
|
|
|
|
|
2013-10-11 18:26:23 +02:00
|
|
|
/*=Add support for useful stuff
|
|
|
|
----------------------------------------*/
|
|
|
|
|
2012-05-29 23:42:46 +02:00
|
|
|
add_theme_support( 'post-thumbnails' );
|
2012-12-20 22:18:50 +01:00
|
|
|
add_theme_support( 'post-formats', array( 'post' ) );
|
2012-12-20 22:06:54 +01:00
|
|
|
add_theme_support( 'custom-header' );
|
2012-12-20 22:18:50 +01:00
|
|
|
add_theme_support( 'custom-background' );
|
2012-08-24 11:44:15 +02:00
|
|
|
add_post_type_support( 'page', 'excerpt' );
|
2012-05-29 23:42:46 +02:00
|
|
|
|
2013-10-11 18:26:23 +02:00
|
|
|
/*=Remove junk from <head>
|
|
|
|
----------------------------------------*/
|
|
|
|
|
2012-05-29 23:42:46 +02:00
|
|
|
remove_action( 'wp_head', 'rsd_link' );
|
|
|
|
remove_action( 'wp_head', 'wlwmanifest_link' );
|
|
|
|
remove_action( 'wp_head', 'wp_generator' );
|
|
|
|
remove_action( 'wp_head', 'start_post_rel_link' );
|
|
|
|
remove_action( 'wp_head', 'index_rel_link' );
|
|
|
|
remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head' );
|
|
|
|
remove_action( 'wp_head', 'wp_shortlink_wp_head', 10, 0 );
|
|
|
|
|
2013-10-11 18:26:23 +02:00
|
|
|
function remove_comments_rss( $for_comments ) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
add_filter( 'post_comments_feed_link', 'remove_comments_rss' );
|
|
|
|
|
|
|
|
/*=jQuery the right way
|
|
|
|
----------------------------------------*/
|
|
|
|
|
2013-08-06 10:24:03 +02:00
|
|
|
function theme_scripts() {
|
|
|
|
wp_deregister_script( 'jquery' );
|
2013-10-12 13:08:18 +02:00
|
|
|
wp_register_script( 'jquery', ( '//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js' ), false, '1.10.2', true);
|
2013-08-06 10:24:03 +02:00
|
|
|
wp_enqueue_script( 'jquery' );
|
2014-02-21 11:44:42 +01:00
|
|
|
wp_enqueue_script( 'script', get_stylesheet_directory_uri() . '/js/script.js', array( 'jquery' ), null, true );
|
2013-08-06 10:24:03 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
add_action( 'wp_enqueue_scripts', 'theme_scripts' );
|
|
|
|
|
2014-02-21 11:44:42 +01:00
|
|
|
/*=Nav menus
|
2013-10-11 18:26:23 +02:00
|
|
|
----------------------------------------*/
|
2013-01-01 20:09:48 +01:00
|
|
|
|
2014-02-21 11:44:42 +01:00
|
|
|
if ( function_exists( 'register_nav_menus' ) )
|
|
|
|
register_nav_menus(array(
|
|
|
|
'main' => 'Main Navigation'
|
|
|
|
// Add more menus here
|
|
|
|
));
|
|
|
|
|
|
|
|
function my_wp_nav_menu_args( $args = '' ) {
|
|
|
|
$args['container'] = false;
|
|
|
|
$args['container_class'] = false;
|
|
|
|
$args['menu_id'] = false;
|
|
|
|
$args['items_wrap'] = '<ul class="%2$s">%3$s</ul>';
|
|
|
|
return $args;
|
|
|
|
}
|
|
|
|
|
|
|
|
add_filter( 'wp_nav_menu_args', 'my_wp_nav_menu_args' );
|