Sin descripción

seo-tools.php 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. * Requires User Connection: No
  10. * Auto Activate: No
  11. * Module Tags: Social, Appearance
  12. * Feature: Traffic
  13. * Additional Search Queries: search engine optimization, social preview, meta description, custom title format
  14. *
  15. * @package automattic/jetpack
  16. */
  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. 'seo-by-rank-math/rank-math.php',
  24. 'autodescription/autodescription.php',
  25. 'slim-seo/slim-seo.php',
  26. 'wp-seopress/seopress.php',
  27. 'wp-seopress-pro/seopress-pro.php',
  28. );
  29. foreach ( $jetpack_seo_conflicting_plugins as $seo_plugin ) {
  30. if ( Jetpack::is_plugin_active( $seo_plugin ) ) {
  31. // Disable all custom meta tags that SEO tools manages.
  32. add_filter( 'jetpack_disable_seo_tools', '__return_true' );
  33. // Also disable default meta tags.
  34. add_filter( 'jetpack_seo_meta_tags_enabled', '__return_false' );
  35. break;
  36. }
  37. }
  38. /** This filter is documented in modules/seo-tools/jetpack-seo-utils.php */
  39. if ( ! apply_filters( 'jetpack_disable_seo_tools', false ) ) {
  40. require_once __DIR__ . '/seo-tools/jetpack-seo.php';
  41. new Jetpack_SEO();
  42. }