Skip to content

Instantly share code, notes, and snippets.

@kstover
Created July 29, 2015 14:44
Show Gist options
  • Save kstover/da474be4ff50496388fe to your computer and use it in GitHub Desktop.
Save kstover/da474be4ff50496388fe to your computer and use it in GitHub Desktop.
<?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