PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / trunk
Yoast SEO – Advanced SEO with real-time guidance and built-in AI vtrunk
28.5 28.4 28.3 28.2 28.1 28.0 27.9 27.8 27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 All 129 releases
← All changes | src/services/health-check/links-table-runner.php +4 -26 19.0 → trunk View file →
@@ -34,14 +34,11 @@
34 34 /**
35 35 * Constructor.
36 36 *
37 37 * @param Migration_Status $migration_status Object used to determine whether the links table is accessible.
38 - * @param Options_Helper $options_helper Object used to determine whether the health check should run.
38 + * @param Options_Helper $options_helper Object used to determine whether the health check should run.
39 39 */
40 - public function __construct(
41 - Migration_Status $migration_status,
42 - Options_Helper $options_helper
43 - ) {
40 + public function __construct( Migration_Status $migration_status, Options_Helper $options_helper ) {
44 41 $this->migration_status = $migration_status;
45 42 $this->options_helper = $options_helper;
46 43 }
47 44
@@ -50,34 +47,15 @@
50 47 *
51 48 * @return void
52 49 */
53 50 public function run() {
54 - if ( ! $this->should_run() ) {
55 - return;
56 - }
57 -
58 - $this->links_table_accessible = $this->migration_status->is_version( 'free', WPSEO_VERSION );
51 + $this->links_table_accessible = $this->migration_status->is_version( 'free', \WPSEO_VERSION );
59 52 }
60 53
61 54 /**
62 - * Determines whether the health check should run or not.
63 - *
64 - * @return bool True if the text link counter feature is enabled.
65 - */
66 - public function should_run() {
67 - $text_link_counter_enabled = $this->options_helper->get( 'enable_text_link_counter' );
68 -
69 - if ( ! is_bool( $text_link_counter_enabled ) ) {
70 - return false;
71 - }
72 -
73 - return $text_link_counter_enabled;
74 - }
75 -
76 - /**
77 55 * Returns true if the links table is accessible
78 56 *
79 - * @return bool The boolean indicating if the health check was succesful.
57 + * @return bool The boolean indicating if the health check was successful.
80 58 */
81 59 public function is_successful() {
82 60 return $this->links_table_accessible;
83 61 }