Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function apus_js() {
- if (!is_admin()) {
- wp_deregister_script('wp-embed');
- wp_deregister_script('jquery'); // Bonus: remove jquery too if it's not required
- }
- }
- add_action('init', 'apus_js');
- // hapus WP_EMOJI
- remove_action('wp_head', 'print_emoji_detection_script', 7);
- remove_action('wp_print_styles', 'print_emoji_styles');
- remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
- remove_action( 'admin_print_styles', 'print_emoji_styles' );
- add_filter( 'emoji_svg_url', '__return_false' );
- // Disable REST API link tag
- remove_action('wp_head', 'rest_output_link_wp_head', 10);
- // Disable oEmbed Discovery Links
- remove_action('wp_head', 'wp_oembed_add_discovery_links', 10);
- // Disable REST API link in HTTP headers
- remove_action('template_redirect', 'rest_output_link_header', 11, 0);
- // remove head attribut
- function itsme_disable_feed() {
- wp_die( __( 'No feed available, please visit the <a href="'. esc_url( home_url( '/' ) ) .'">homepage</a>!' ) );}
- add_action('do_feed', 'itsme_disable_feed', 1);
- add_action('do_feed_rdf', 'itsme_disable_feed', 1);
- add_action('do_feed_rss', 'itsme_disable_feed', 1);
- add_action('do_feed_rss2', 'itsme_disable_feed', 1);
- add_action('do_feed_atom', 'itsme_disable_feed', 1);
- add_action('do_feed_rss2_comments', 'itsme_disable_feed', 1);
- add_action('do_feed_atom_comments', 'itsme_disable_feed', 1);
- remove_action( 'wp_head', 'feed_links_extra', 3 );
- remove_action( 'wp_head', 'feed_links', 2 );
- remove_action('wp_head', 'rsd_link');
- remove_action('wp_head', 'wp_generator');
- remove_action('wp_head', 'wlwmanifest_link');
- remove_action('wp_head', 'wp_shortlink_wp_head', 10, 0);
- add_filter( 'start_post_rel_link', 'remove_code');
- add_filter( 'previous_post_rel_link', 'remove_code' );
- add_filter( 'next_post_rel_link', 'remove_code' );
- function remove_code( $data ) {
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement