| Total Complexity | 2 |
| Total Lines | 26 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | class SiteHealthController { |
||
| 21 | /** |
||
| 22 | * Setup. |
||
| 23 | * |
||
| 24 | * @return void |
||
| 25 | */ |
||
| 26 | public function setup() { |
||
| 27 | add_action( 'rest_api_init', array( $this, 'rest_api_init' ) ); |
||
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * REST API init. |
||
| 32 | * |
||
| 33 | * @link https://developer.wordpress.org/rest-api/extending-the-rest-api/adding-custom-endpoints/ |
||
| 34 | * @link https://developer.wordpress.org/reference/hooks/rest_api_init/ |
||
| 35 | * |
||
| 36 | * @return void |
||
| 37 | */ |
||
| 38 | public function rest_api_init() { |
||
| 46 | ) |
||
| 47 | ); |
||
| 50 |