tweaks.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. remove_action('wp_head', 'index_rel_link' );
  3. remove_action('wp_head', 'rel_canonical');
  4. remove_action('wp_head', 'start_post_rel_link', 10, 0 );
  5. remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0);
  6. remove_action('wp_head', 'wp_shortlink_wp_head', 10, 0 );
  7. remove_action('wp_head', 'parent_post_rel_link', 10, 0 );
  8. remove_action('wp_head', 'rsd_link');
  9. remove_action('wp_head', 'wlwmanifest_link');
  10. remove_action('wp_head', 'wp_generator');
  11. remove_action('wp_head', 'feed_links_extra', 3 );
  12. remove_action('wp_head', 'feed_links', 2 );
  13. function dw_remove_wp_ver_css_js( $src ) {
  14. if ( strpos( $src, 'ver=' ) )
  15. $src = remove_query_arg( 'ver', $src );
  16. return $src;
  17. }
  18. add_filter( 'style_loader_src', 'dw_remove_wp_ver_css_js', 9999 );
  19. add_filter( 'script_loader_src', 'dw_remove_wp_ver_css_js', 9999 );
  20. function dw_hide() {
  21. ?>
  22. <style type="text/css" media="screen">
  23. #footer {display:none;}
  24. #contextual-help-link-wrap {display: none;}
  25. #wpadminbar {display: none;}
  26. body.admin-bar #wpcontent, body.admin-bar #adminmenu {padding-top:0;}
  27. html.wp-toolbar{padding-top:0;}
  28. #postexcerpt p {display: none;}
  29. </style>
  30. <?php }
  31. add_action( 'admin_head', 'dw_hide' );
  32. ?>