File manager - Edit - /var/www/wordpress_preproduction/wp-content/mu-plugins/mu-frontoffice.php
Back
<?php if (! defined('ABSPATH')) die('Restricted Area'); /* * Plugin Name: Front-Office Enhancements * Description: Tweaks for WordPress (front-office). * Version: 20160612 * Author: Aurélien Denis (Neticpro) * Author URI: https://neticpro.fr/ */ /* Cleaning WordPress <head> */ function ntp_head_clean() { 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', 'wlwmanifest_link'); remove_action('wp_head', 'index_rel_link'); remove_action('wp_head', 'parent_post_rel_link', 10, 0); 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_generator'); } add_action('init', 'ntp_head_clean'); /* Removing WordPress Version from Feed */ function ntp_rss_version() { return''; } add_filter('the_generator', 'ntp_rss_version'); /* Remove emoji */ remove_action('wp_head', 'print_emoji_detection_script', 7); remove_action('admin_print_scripts', 'print_emoji_detection_script'); remove_action('wp_print_styles', 'print_emoji_styles'); remove_action('admin_print_styles', 'print_emoji_styles'); /* Remove hentry CSS Class */ function ntp_remove_hentry($classes) { if (! is_single() || is_main_query()) { $classes = array_diff($classes, array('hentry')); } return $classes; } add_filter('post_class','ntp_remove_hentry'); /* Prevent Sub-Domains Tracking as External Link */ function ntp_prevent_subdomains() { return "window.addEventListener('load', function () { var links = document.querySelectorAll('a'); for (let i = 0; i < links.length; i++) { links[i].addEventListener('click', function(e) { var n = this.href.includes('catalunyaexperience.fr'); if (n == false) { gtag('event', 'click', {'event_category': 'external links','event_label' : this.href}); } }); } });"; } add_filter('seopress_gtag_link_tracking_ev', 'ntp_prevent_subdomains');
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.03 |
proxy
|
phpinfo
|
Settings