WPSEO_Plugin_Conflict

Contains list of conflicting plugins.

Defined (1)

The class is defined in the following location(s).

/admin/class-plugin-conflict.php  
  1. class WPSEO_Plugin_Conflict extends Yoast_Plugin_Conflict { 
  2.  
  3. /** 
  4. * The plugins must be grouped per section. 
  5. * It's possible to check for each section if there are conflicting plugin 
  6. * @var array 
  7. */ 
  8. protected $plugins = array( 
  9. // The plugin which are writing OG metadata. 
  10. 'open_graph' => array( 
  11. '2-click-socialmedia-buttons/2-click-socialmedia-buttons.php',  
  12. // 2 Click Social Media Buttons. 
  13. 'add-link-to-facebook/add-link-to-facebook.php', // Add Link to Facebook. 
  14. 'add-meta-tags/add-meta-tags.php', // Add Meta Tags. 
  15. 'easy-facebook-share-thumbnails/esft.php', // Easy Facebook Share Thumbnail. 
  16. 'facebook/facebook.php', // Facebook (official plugin). 
  17. 'facebook-awd/AWD_facebook.php', // Facebook AWD All in one. 
  18. 'facebook-featured-image-and-open-graph-meta-tags/fb-featured-image.php',  
  19. // Facebook Featured Image & OG Meta Tags. 
  20. 'facebook-meta-tags/facebook-metatags.php', // Facebook Meta Tags. 
  21. 'wonderm00ns-simple-facebook-open-graph-tags/wonderm00n-open-graph.php',  
  22. // Facebook Open Graph Meta Tags for WordPress. 
  23. 'facebook-revised-open-graph-meta-tag/index.php', // Facebook Revised Open Graph Meta Tag. 
  24. 'facebook-thumb-fixer/_facebook-thumb-fixer.php', // Facebook Thumb Fixer. 
  25. 'facebook-and-digg-thumbnail-generator/facebook-and-digg-thumbnail-generator.php',  
  26. // Fedmich's Facebook Open Graph Meta. 
  27. 'header-footer/plugin.php', // Header and Footer. 
  28. 'network-publisher/networkpub.php', // Network Publisher. 
  29. 'nextgen-facebook/nextgen-facebook.php', // NextGEN Facebook OG. 
  30. 'opengraph/opengraph.php', // Open Graph. 
  31. 'open-graph-protocol-framework/open-graph-protocol-framework.php',  
  32. // Open Graph Protocol Framework. 
  33. 'seo-facebook-comments/seofacebook.php', // SEO Facebook Comments. 
  34. 'seo-ultimate/seo-ultimate.php', // SEO Ultimate. 
  35. 'sexybookmarks/sexy-bookmarks.php', // Shareaholic. 
  36. 'shareaholic/sexy-bookmarks.php', // Shareaholic. 
  37. 'sharepress/sharepress.php', // SharePress. 
  38. 'simple-facebook-connect/sfc.php', // Simple Facebook Connect. 
  39. 'social-discussions/social-discussions.php', // Social Discussions. 
  40. 'social-sharing-toolkit/social_sharing_toolkit.php', // Social Sharing Toolkit. 
  41. 'socialize/socialize.php', // Socialize. 
  42. 'only-tweet-like-share-and-google-1/tweet-like-plusone.php',  
  43. // Tweet, Like, Google +1 and Share. 
  44. 'wordbooker/wordbooker.php', // Wordbooker. 
  45. 'wpsso/wpsso.php', // WordPress Social Sharing Optimization. 
  46. 'wp-caregiver/wp-caregiver.php', // WP Caregiver. 
  47. 'wp-facebook-like-send-open-graph-meta/wp-facebook-like-send-open-graph-meta.php',  
  48. // WP Facebook Like Send & Open Graph Meta. 
  49. 'wp-facebook-open-graph-protocol/wp-facebook-ogp.php', // WP Facebook Open Graph protocol. 
  50. 'wp-ogp/wp-ogp.php', // WP-OGP. 
  51. 'zoltonorg-social-plugin/zosp.php', // Zolton.org Social Plugin. 
  52. ),  
  53. 'xml_sitemaps' => array( 
  54. 'google-sitemap-plugin/google-sitemap-plugin.php',  
  55. // Google Sitemap (BestWebSoft). 
  56. 'xml-sitemaps/xml-sitemaps.php',  
  57. // XML Sitemaps (Denis de Bernardy and Mike Koepke). 
  58. 'bwp-google-xml-sitemaps/bwp-simple-gxs.php',  
  59. // Better WordPress Google XML Sitemaps (Khang Minh). 
  60. 'google-sitemap-generator/sitemap.php',  
  61. // Google XML Sitemaps (Arne Brachhold). 
  62. 'xml-sitemap-feed/xml-sitemap.php',  
  63. // XML Sitemap & Google News feeds (RavanH). 
  64. 'google-monthly-xml-sitemap/monthly-xml-sitemap.php',  
  65. // Google Monthly XML Sitemap (Andrea Pernici). 
  66. 'simple-google-sitemap-xml/simple-google-sitemap-xml.php',  
  67. // Simple Google Sitemap XML (iTx Technologies). 
  68. 'another-simple-xml-sitemap/another-simple-xml-sitemap.php',  
  69. // Another Simple XML Sitemap. 
  70. 'xml-maps/google-sitemap.php',  
  71. // Xml Sitemap (Jason Martens). 
  72. 'google-xml-sitemap-generator-by-anton-dachauer/adachauer-google-xml-sitemap.php',  
  73. // Google XML Sitemap Generator by Anton Dachauer (Anton Dachauer). 
  74. 'wp-xml-sitemap/wp-xml-sitemap.php',  
  75. // WP XML Sitemap (Team Vivacity). 
  76. 'sitemap-generator-for-webmasters/sitemap.php',  
  77. // Sitemap Generator for Webmasters (iwebslogtech). 
  78. 'xml-sitemap-xml-sitemapcouk/xmls.php',  
  79. // XML Sitemap - XML-Sitemap.co.uk (Simon Hancox). 
  80. 'sewn-in-xml-sitemap/sewn-xml-sitemap.php',  
  81. // Sewn In XML Sitemap (jcow). 
  82. 'rps-sitemap-generator/rps-sitemap-generator.php',  
  83. // RPS Sitemap Generator (redpixelstudios). 
  84. ),  
  85. 'cloaking' => array( 
  86. 'rs-head-cleaner/rs-head-cleaner.php',  
  87. // RS Head Cleaner Plus https://wordpress.org/plugins/rs-head-cleaner/. 
  88. 'rs-head-cleaner-lite/rs-head-cleaner-lite.php',  
  89. // RS Head Cleaner Lite https://wordpress.org/plugins/rs-head-cleaner-lite/. 
  90. ),  
  91. ); 
  92.  
  93. /** 
  94. * Overrides instance to set with this class as class 
  95. * @param string $class_name Optional class name. 
  96. * @return Yoast_Plugin_Conflict 
  97. */ 
  98. public static function get_instance( $class_name = __CLASS__ ) { 
  99. return parent::get_instance( $class_name ); 
  100.  
  101. /** 
  102. * After activating any plugin, this method will be executed by a hook. 
  103. * If the activated plugin is conflicting with ours a notice will be shown. 
  104. * @param string|bool $plugin Optional plugin basename to check. 
  105. */ 
  106. public static function hook_check_for_plugin_conflicts( $plugin = false ) { 
  107.  
  108. // The instance of itself. 
  109. $instance = self::get_instance(); 
  110.  
  111. // Only add plugin as active plugin if $plugin isn't false. 
  112. if ( $plugin && is_string( $plugin ) ) { 
  113. // Because it's just activated. 
  114. $instance->add_active_plugin( $instance->find_plugin_category( $plugin ), $plugin ); 
  115.  
  116. $plugin_sections = array(); 
  117.  
  118. // Only check for open graph problems when they are enabled. 
  119. $social_options = WPSEO_Options::get_option( 'wpseo_social' ); 
  120. if ( $social_options['opengraph'] ) { 
  121. /** translators: %1$s expands to Yoast SEO, %2%s: 'Facebook' plugin name of possibly conflicting plugin with regard to creating OpenGraph output. */ 
  122. $plugin_sections['open_graph'] = __( 'Both %1$s and %2$s create OpenGraph output, which might make Facebook, Twitter, LinkedIn and other social networks use the wrong texts and images when your pages are being shared.', 'wordpress-seo' ) 
  123. . '<br/><br/>' 
  124. . '<a class="button" href="' . admin_url( 'admin.php?page=wpseo_social#top#facebook' ) . '">' 
  125. /** translators: %1$s expands to Yoast SEO. */ 
  126. . sprintf( __( 'Configure %1$s\'s OpenGraph settings', 'wordpress-seo' ), 'Yoast SEO' ) 
  127. . '</a>'; 
  128.  
  129. // Only check for XML conflicts if sitemaps are enabled. 
  130. $xml_sitemap_options = WPSEO_Options::get_option( 'wpseo_xml' ); 
  131. if ( $xml_sitemap_options['enablexmlsitemap'] ) { 
  132. /** translators: %1$s expands to Yoast SEO, %2$s: 'Google XML Sitemaps' plugin name of possibly conflicting plugin with regard to the creation of sitemaps. */ 
  133. $plugin_sections['xml_sitemaps'] = __( 'Both %1$s and %2$s can create XML sitemaps. Having two XML sitemaps is not beneficial for search engines, yet might slow down your site.', 'wordpress-seo' ) 
  134. . '<br/><br/>' 
  135. . '<a class="button" href="' . admin_url( 'admin.php?page=wpseo_xml' ) . '">' 
  136. /** translators: %1$s expands to Yoast SEO. */ 
  137. . sprintf( __( 'Configure %1$s\'s XML Sitemap settings', 'wordpress-seo' ), 'Yoast SEO' ) 
  138. . '</a>'; 
  139.  
  140. /** translators: %2$s expands to 'RS Head Cleaner' plugin name of possibly conflicting plugin with regard to differentiating output between search engines and normal users. */ 
  141. $plugin_sections['cloaking'] = __( 'The plugin %2$s changes your site\'s output and in doing that differentiates between search engines and normal users, a process that\'s called cloaking. We highly recommend that you disable it.', 'wordpress-seo' ); 
  142.  
  143. $instance->check_plugin_conflicts( $plugin_sections );