1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <?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-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( 'admin_head', 'dw_hide' );
- function dw_hide() {
- ?>
- <style type="text/css" media="screen">
- #footer {display:none;}
- #contextual-help-link-wrap {display: none;}
- #wpadminbar {display: none;}
- body.admin-bar #wpcontent, body.admin-bar #adminmenu {padding-top:0;}
- html.wp-toolbar{padding-top:0;}
- #postexcerpt p {display: none;}
- </style>
- <?php }
- add_action( 'wp_enqueue_scripts', 'dw_scripts' );
- function dw_scripts() {
- global $post;
- wp_deregister_script('jquery');
- wp_enqueue_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js', array(), false, true);
- wp_enqueue_script( 'jquery', '', '', '', true );
- wp_enqueue_style( 'style', get_stylesheet_uri() );
- if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
- wp_enqueue_script( 'comment-reply' );
- }
- }
- ?>
|