-
-
Save Pebblo/ada38c7a10b6839fff20d4bf9b0e67ac to your computer and use it in GitHub Desktop.
Remove Yoast's 'fill_cache' callback from Event Espresso's wpuser_login step ajax request.
This file contains 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 | |
// Remove Yoast fill_cache from EE's wpuser_login ajax request. | |
add_action( 'wp_loaded', 'ee_remove_yoast_fill_cache', 10); | |
function ee_remove_yoast_fill_cache(){ | |
if( wp_doing_ajax() ) { | |
if( | |
class_exists('WPSEO_Options') | |
|| class_exists('EE_Registry') | |
|| EE_Registry::instance()->REQ->get('step', '') === 'wpuser_login' | |
) { | |
$Admin_Columns_Cache_Integration = YoastSEO()->classes->get( 'Yoast\WP\SEO\Integrations\Admin\Admin_Columns_Cache_Integration' ); | |
remove_action( 'admin_init', [ $Admin_Columns_Cache_Integration, 'fill_cache' ], 10 ); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment