Hi chooo!
Thanks :D.
The SEO Framework indeed checks for NextScripts SNAP, and will deactivate its Open Graph functionality upon detection.
I will present you with three solutions for future reference, one is “hard and easy”, the other one is “hard and difficult”, and a personalized one named “subtle and difficult”. 🙂
Those solutions use filters, if you don’t know where to place filters, please check out this guide.
I suggest using the personalized “subtle and difficult” solution, so The SEO Framework will still check for other conflicts.
If you truly wish to disable “ANY other plugin” from being detected, you should use the “Hard and Difficult” solution.
Please note, none of the filters below have been tested; so if there are any issues, please let me know!
Hard and Easy:
Completely disable the detection for Open Graph plugins.
The issue with this is not only that it will ignore detection, and although fewer lines are used, it will still check for all plugins. So it’s quite a redundant filter but it’s implemented for its easy of use :).
add_filter( 'the_seo_framework_og_plugin_detected', '__return_false' );
Hard and Difficult:
This will also completely disable the detection for Open Graph plugins, however, it will do so by eliminating the checks before they run.
add_filter( 'the_seo_framework_conflicting_plugins_type', 'my_filter_conflicting_plugins', 10, 2);
/**
* Filters the conflicting plugin detection list of The SEO Framework.
*
* @since The SEO Framework 2.6.0 (undocumented, sorry!)
* @param array $conflicting_plugins The conflicting plugins list.
* @param string $type The dection type
*/
function my_filter_conflicting_plugins( $conflicting_plugins = array(), $type = '' ) {
switch ( $type ) :
case 'seo_tools' :
//* Filter SEO solution plugins.
break;
case 'sitemaps' :
//* Filter sitemap plugins.
break;
case 'open_graph' :
//* Filter open graph plugins.
//* We wish to completely disable the Open Graph detection.
$conflicting_plugins = array();
break;
case 'twitter_card' :
//* Filter twitter_card plugins.
break;
default:
break;
endswitch;
//* Return the filtered list.
return $conflicting_plugins;
}
Subtle and Difficult:
This is a more personalized solution for your needs. Based on “Hard and Difficult”, this filter will only remove the NextScript SNAP plugin detection.
add_filter( 'the_seo_framework_conflicting_plugins_type', 'my_filter_conflicting_plugins', 10, 2);
/**
* Filters the conflicting plugin detection list of The SEO Framework.
*
* @since The SEO Framework 2.6.0 (undocumented, sorry!)
* @param array $conflicting_plugins The conflicting plugins list.
* @param string $type The dection type
*/
function my_filter_conflicting_plugins( $conflicting_plugins = array(), $type = '' ) {
if ( 'open_graph' === $type ) {
//* Only disable NextScripts SNAP
unset( $conflicting_plugins['NextScripts SNAP'] );
//* Or, disable them all (commented out):
// $conflicting_plugins = array();
}
//* Return the filtered list.
return $conflicting_plugins;
}
I hope this will work out! Cheers 🙂