From 907ce8c044159ca8da6ccce3ec5362ac61e7c142 Mon Sep 17 00:00:00 2001 From: yehudah Date: Mon, 25 Nov 2019 07:50:30 +0000 Subject: deleted by mistake --- Postman/PostmanAjaxController.php | 68 --------------------------------------- 1 file changed, 68 deletions(-) delete mode 100644 Postman/PostmanAjaxController.php (limited to 'Postman/PostmanAjaxController.php') diff --git a/Postman/PostmanAjaxController.php b/Postman/PostmanAjaxController.php deleted file mode 100644 index ad63464..0000000 --- a/Postman/PostmanAjaxController.php +++ /dev/null @@ -1,68 +0,0 @@ -logger = new PostmanLogger ( get_class ( $this ) ); - } - /** - * - * @param mixed $actionName - * @param mixed $callbackName - */ - protected function registerAjaxHandler($actionName, $class, $callbackName) { - if (is_admin ()) { - $fullname = 'wp_ajax_' . $actionName; - // $this->logger->debug ( 'Registering ' . 'wp_ajax_' . $fullname . ' Ajax handler' ); - add_action ( $fullname, array ( - $class, - $callbackName - ) ); - } - } - - /** - * - * @param mixed $parameterName - * @return mixed - */ - protected function getBooleanRequestParameter($parameterName) { - return filter_var ( $this->getRequestParameter ( $parameterName ), FILTER_VALIDATE_BOOLEAN ); - } - - /** - * - * @param mixed $parameterName - * @return mixed - */ - protected function getRequestParameter($parameterName) { - if (isset ( $_POST [$parameterName] )) { - if ( is_array($_POST [$parameterName] ) ) { - array_walk_recursive( $_POST [$parameterName], 'sanitize_text_field' ); - $value = $_POST [$parameterName]; - } else { - $value = sanitize_text_field($_POST[$parameterName]); - } - - $this->logger->trace ( sprintf ( 'Found parameter "%s"', $parameterName ) ); - $this->logger->trace ( $value ); - - return $value; - } - } - } -} - -require_once ('Postman-Controller/PostmanManageConfigurationAjaxHandler.php'); -- cgit v1.2.3