Skip to content

Instantly share code, notes, and snippets.

@remyperona
Created October 20, 2017 12:14
Show Gist options
  • Save remyperona/88ea8f029b4b834394aa74f3fa9eee59 to your computer and use it in GitHub Desktop.
Save remyperona/88ea8f029b4b834394aa74f3fa9eee59 to your computer and use it in GitHub Desktop.
<?php
defined( 'ABSPATH' ) or die();
/**
* Plugin Name: WP Rocket | Fix Polylang conflict
* Description: Prevent warning when adding a new translation with Polylang
* Author: WP Rocket Support Team
* Author URI: https://wp-rocket.me/
* License: GNU General Public License v3 or later
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
*/
function wp_rocket_fix_polylang_term_bug() {
remove_action( 'create_term', 'rocket_clean_domain' );
add_action( 'create_term', 'wp_rocket_create_term_clean_domain' );
}
add_action( 'wp_rocket_loaded', 'wp_rocket_fix_polylang_term_bug' );
function wp_rocket_create_term_clean_domain() {
rocket_clean_domain();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment