Created
July 29, 2015 14:44
-
-
Save kstover/da474be4ff50496388fe to your computer and use it in GitHub Desktop.
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 | |
function nf_test_exclude_plugins( $plugins ) { | |
if ( !defined( 'DOING_AJAX' ) || !DOING_AJAX || !isset( $_REQUEST['action'] ) || ( 'nf_output_field_settings_html' != $_REQUEST['action'] && 'ninja_forms_new_field' != $_REQUEST['action'] ) ) return $plugins; | |
foreach( $plugins as $key => $plugin ) { | |
if ( false !== strpos( $plugin, 'ninja-forms' ) ) continue; | |
unset( $plugins[$key] ); | |
} | |
return $plugins; | |
} | |
add_filter( 'option_active_plugins', 'nf_test_exclude_plugins' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment