确保Yoast SEO分析所有高级自定义字段4和5的内容,包括灵活内容和中继器。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

97 lines
2.7 KiB

  1. <?php
  2. /**
  3. * ACF Content Analysis for Yoast SEO plugin file.
  4. *
  5. * @package YoastACFAnalysis
  6. */
  7. /**
  8. * Checks for the required Yoast SEO version.
  9. */
  10. final class Yoast_ACF_Analysis_Dependency_Yoast_SEO implements Yoast_ACF_Analysis_Dependency {
  11. const MINIMAL_REQUIRED_VERSION = 14.9;
  12. /**
  13. * Checks if this dependency is met.
  14. *
  15. * @return bool
  16. */
  17. public function is_met() {
  18. if ( ! defined( 'WPSEO_VERSION' ) ) {
  19. return false;
  20. }
  21. if ( ! $this->has_required_version() ) {
  22. return false;
  23. }
  24. return true;
  25. }
  26. /**
  27. * Registers the notifications to be shown.
  28. */
  29. public function register_notifications() {
  30. if ( ! defined( 'WPSEO_VERSION' ) ) {
  31. add_action( 'admin_notices', [ $this, 'message_plugin_not_activated' ] );
  32. return;
  33. }
  34. if ( ! $this->has_requ