- Restricts router access to explicitly defined endpoint actions

This commit is contained in:
Vlad
2016-08-24 11:23:12 -04:00
parent a8f4779bfe
commit ae6269eb63
5 changed files with 18 additions and 4 deletions

View File

@ -11,6 +11,7 @@ if(!defined('ABSPATH')) exit;
class ViewInBrowser {
const ENDPOINT = 'view_in_browser';
const ACTION_VIEW = 'view';
public $allowed_actions = array(self::ACTION_VIEW);
function view($data) {
$data = $this->_processBrowserPreviewData($data);