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
wordpress-seo / src / services / health-check / links-table-runner.php

links-table-runner.php in Yoast SEO – Advanced SEO with real-time guidance and built-in AI trunk, at src/services/health-check/links-table-runner.php

63 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Yoast\WP\SEO\Services\Health_Check;
4
5 use Yoast\WP\SEO\Config\Migration_Status;
6 use Yoast\WP\SEO\Helpers\Options_Helper;
7
8 /**
9 * Runs the Links_Table health check.
10 */
11 class Links_Table_Runner implements Runner_Interface {
12
13 /**
14 * Is set to true when the links table is accessible.
15 *
16 * @var bool
17 */
18 private $links_table_accessible = false;
19
20 /**
21 * The Migration_Status object used to determine whether the links table is accessible.
22 *
23 * @var Migration_Status
24 */
25 private $migration_status;
26
27 /**
28 * The Options_Helper object used to determine whether the health check should run or not.
29 *
30 * @var Options_Helper
31 */
32 private $options_helper;
33
34 /**
35 * Constructor.
36 *
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.
39 */
40 public function __construct( Migration_Status $migration_status, Options_Helper $options_helper ) {
41 $this->migration_status = $migration_status;
42 $this->options_helper = $options_helper;
43 }
44
45 /**
46 * Runs the health check. Checks if the tagline is set to WordPress' default tagline, or to its set translation.
47 *
48 * @return void
49 */
50 public function run() {
51 $this->links_table_accessible = $this->migration_status->is_version( 'free', \WPSEO_VERSION );
52 }
53
54 /**
55 * Returns true if the links table is accessible
56 *
57 * @return bool The boolean indicating if the health check was successful.
58 */
59 public function is_successful() {
60 return $this->links_table_accessible;
61 }
62 }
63