diff --git a/src/Managers/CleanupManager.php b/src/Managers/CleanupManager.php index 95c078b..e29d52a 100644 --- a/src/Managers/CleanupManager.php +++ b/src/Managers/CleanupManager.php @@ -63,7 +63,7 @@ public function run() { // Remove comments from the admin menu. add_action( 'admin_menu', array( $this, 'remove_comments_from_admin_menu' ) ); - add_action( 'xmlrpc_enabled', array( $this, 'xmlrpc_enabled' ) ); + add_filter( 'xmlrpc_enabled', array( $this, 'xmlrpc_enabled' ) ); } /** @@ -173,7 +173,7 @@ public function remove_comments_from_admin_menu():void { /** * Enable or disable XML RPC endpoint. */ - public function xmlrpc_enabled(): bool { + public function xmlrpc_enabled():bool { return $this->xml_rpc; } }