123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?php
- if ( ! function_exists( 'dw_setup' ) ):
- function dw_setup() {
- require( get_template_directory() . '/inc/template.php' );
- }
- endif;
- add_action( 'after_setup_theme', 'dw_setup' );
- remove_action('wp_head', 'index_rel_link' );
- remove_action('wp_head', 'rel_canonical');
- remove_action('wp_head', 'start_post_rel_link', 10, 0 );
- remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0);
- remove_action('wp_head', 'wp_shortlink_wp_head', 10, 0 );
- remove_action('wp_head', 'parent_post_rel_link', 10, 0 );
- remove_action('wp_head', 'rsd_link');
- remove_action('wp_head', 'wlwmanifest_link');
- remove_action('wp_head', 'wp_generator');
- remove_action('wp_head', 'feed_links_extra', 3 );
- remove_action('wp_head', 'feed_links', 2 );
- add_editor_style();
- add_theme_support( 'post-thumbnails' );
- set_post_thumbnail_size( 150, 150, true );
- add_image_size( 'post-tiny', 100, 100, true );
- add_image_size( 'post-medium', 250, 175, true );
- add_image_size( 'post-large', 770, 577, true );
- add_theme_support( 'automatic-feed-links' );
- add_theme_support( 'menus' );
- function dw_remove_wp_ver_css_js( $src ) {
- if ( strpos( $src, 'ver=' ) )
- $src = remove_query_arg( 'ver', $src );
- return $src;
- }
- add_filter( 'style_loader_src', 'dw_remove_wp_ver_css_js', 9999 );
- add_filter( 'script_loader_src', 'dw_remove_wp_ver_css_js', 9999 );
- add_action( 'wp_enqueue_scripts', 'dw_scripts' );
- function dw_scripts() {
- global $post;
- wp_enqueue_style( 'style', get_stylesheet_uri() );
- if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
- wp_enqueue_script( 'comment-reply' );
- }
- }
- ?>
|