Home / Admin / Fix LearnPress conflict that hides AIOSEO tabs on settings pages
Duplicate Snippet

Embed Snippet on Your Site

Fix LearnPress conflict that hides AIOSEO tabs on settings pages

LearnPress hides the tabs of AIOSEO by loading its Vue assets on our pages. This snippet is a temporary fix for the conflict.

<10
Code Preview
php
<?php
add_filter( 'learnpress/admin/can-load-assets/lp-admin', 'aioseoDontLoadLearnPress', 10, 2 );
add_filter( 'learnpress/admin/can-load-assets/lp-admin-notice', 'aioseoDontLoadLearnPress', 10, 2 );
function aioseoDontLoadLearnPress( $canLoad, $currentPage ) {
	if ( false === strpos( $currentPage, 'aioseo' ) ) {
		return $canLoad;
	}
	return false;
}

Comments

Add a Comment