/** * Request plugin info and output it. */ public function ajaxRequestInfo() { if ($_POST['slug'] !== $this->updateChecker->slug) { return; } $this->preAjaxReqest(); $info = $this->updateChecker->requestInfo(); if ($info !== null) { echo 'Successfully retrieved plugin info from the metadata URL:'; echo '<pre>', htmlentities(print_r($info, true)), '</pre>'; } else { echo 'Failed to retrieve plugin info from the metadata URL.'; } exit; }