Update functions.php
This commit is contained in:
parent
3348793fbc
commit
99aad04b4a
|
@ -1,11 +1,17 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
/*=Add support for useful stuff
|
||||||
|
----------------------------------------*/
|
||||||
|
|
||||||
add_theme_support( 'post-thumbnails' );
|
add_theme_support( 'post-thumbnails' );
|
||||||
add_theme_support( 'post-formats', array( 'post' ) );
|
add_theme_support( 'post-formats', array( 'post' ) );
|
||||||
add_theme_support( 'custom-header' );
|
add_theme_support( 'custom-header' );
|
||||||
add_theme_support( 'custom-background' );
|
add_theme_support( 'custom-background' );
|
||||||
add_post_type_support( 'page', 'excerpt' );
|
add_post_type_support( 'page', 'excerpt' );
|
||||||
|
|
||||||
|
/*=Remove junk from <head>
|
||||||
|
----------------------------------------*/
|
||||||
|
|
||||||
remove_action( 'wp_head', 'rsd_link' );
|
remove_action( 'wp_head', 'rsd_link' );
|
||||||
remove_action( 'wp_head', 'wlwmanifest_link' );
|
remove_action( 'wp_head', 'wlwmanifest_link' );
|
||||||
remove_action( 'wp_head', 'wp_generator' );
|
remove_action( 'wp_head', 'wp_generator' );
|
||||||
|
@ -14,6 +20,15 @@ remove_action( 'wp_head', 'index_rel_link' );
|
||||||
remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head' );
|
remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head' );
|
||||||
remove_action( 'wp_head', 'wp_shortlink_wp_head', 10, 0 );
|
remove_action( 'wp_head', 'wp_shortlink_wp_head', 10, 0 );
|
||||||
|
|
||||||
|
function remove_comments_rss( $for_comments ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
add_filter( 'post_comments_feed_link', 'remove_comments_rss' );
|
||||||
|
|
||||||
|
/*=jQuery the right way
|
||||||
|
----------------------------------------*/
|
||||||
|
|
||||||
function theme_scripts() {
|
function theme_scripts() {
|
||||||
wp_deregister_script( 'jquery' );
|
wp_deregister_script( 'jquery' );
|
||||||
wp_register_script( 'jquery', ( '//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js' ), false, '1.7.1', true);
|
wp_register_script( 'jquery', ( '//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js' ), false, '1.7.1', true);
|
||||||
|
@ -23,10 +38,8 @@ function theme_scripts() {
|
||||||
|
|
||||||
add_action( 'wp_enqueue_scripts', 'theme_scripts' );
|
add_action( 'wp_enqueue_scripts', 'theme_scripts' );
|
||||||
|
|
||||||
function remove_comments_rss( $for_comments ) {
|
/*=Register bog-standard sidebar
|
||||||
return;
|
----------------------------------------*/
|
||||||
}
|
|
||||||
add_filter( 'post_comments_feed_link', 'remove_comments_rss' );
|
|
||||||
|
|
||||||
if ( function_exists( 'register_sidebar' ) )
|
if ( function_exists( 'register_sidebar' ) )
|
||||||
register_sidebar();
|
register_sidebar();
|
||||||
|
|
Loading…
Reference in New Issue