123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- 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 );
- 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 );
- 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( 'admin_head', 'dw_hide' );
- function dw_oembed_filter($html, $url, $attr, $post_ID) {
- $return = '<div class="video-container">'.$html.'</div>';
- $return = str_replace('frameborder="0" allowfullscreen', 'style="border:none"', $return);
- return $return;
- }
- add_filter( 'embed_oembed_html', 'dw_oembed_filter', 10, 4 ) ;
- ?>
|