seo-tools.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * Module Name: SEO Tools
  4. * Module Description: Better results on search engines and social media.
  5. * Sort Order: 35
  6. * Recommendation Order: 15
  7. * First Introduced: 4.4
  8. * Requires Connection: Yes
  9. * Auto Activate: No
  10. * Module Tags: Social, Appearance
  11. * Feature: Traffic
  12. * Additional Search Queries: search engine optimization, social preview, meta description, custom title format
  13. * Plans: business, premium
  14. */
  15. include dirname( __FILE__ ) . '/seo-tools/jetpack-seo.php';
  16. include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
  17. // Suppress SEO Tools output if any of the following plugins is active.
  18. $jetpack_seo_conflicting_plugins = array(
  19. 'wordpress-seo/wp-seo.php',
  20. 'wordpress-seo-premium/wp-seo-premium.php',
  21. 'all-in-one-seo-pack/all_in_one_seo_pack.php',
  22. 'all-in-one-seo-pack-pro/all_in_one_seo_pack.php',
  23. 'autodescription/autodescription.php',
  24. );
  25. foreach( $jetpack_seo_conflicting_plugins as $seo_plugin ) {
  26. if ( Jetpack::is_plugin_active( $seo_plugin ) ) {
  27. // Disable all custom meta tags that SEO tools manages.
  28. add_filter( 'jetpack_disable_seo_tools', '__return_true' );
  29. // Also disable default meta tags.
  30. add_filter( 'jetpack_seo_meta_tags_enabled', '__return_false' );
  31. break;
  32. }
  33. }
  34. new Jetpack_SEO;