Created
October 20, 2017 12:14
-
-
Save remyperona/88ea8f029b4b834394aa74f3fa9eee59 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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