PluginProbe
WP Console – WordPress PHP Console powered by PsySH / 2.4.0
WP Console – WordPress PHP Console powered by PsySH v2.4.0
trunk 2.4.0 2.4.1 2.5.0 2.5.1 2.6.0
wp-console / includes / Core / DebugLog / DebugLog.php

DebugLog.php in WP Console – WordPress PHP Console powered by PsySH 2.4.0, at includes/Core/DebugLog/DebugLog.php

32 lines 574 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace WPConsole\Core\DebugLog;
4
5 class DebugLog {
6
7 /**
8 * Class constructor
9 *
10 * @since 1.0.0
11 *
12 * @return void
13 */
14 public function __construct() {
15 add_filter( 'wp_console_rest_controllers', [ $this, 'add_rest_controller' ] );
16 }
17
18 /**
19 * Add REST controller
20 *
21 * @since 1.0.0
22 *
23 * @param array $controllers
24 *
25 * @return void
26 */
27 public function add_rest_controller( $controllers ) {
28 $controllers->debug_log = new RestController();
29 return $controllers;
30 }
31 }
32