wip debug redirections
This commit is contained in:
@@ -13,8 +13,8 @@ if (!defined('ABSPATH')) {
|
||||
/*
|
||||
* menu plugin
|
||||
*/
|
||||
function cipfcard_plugin_menu()
|
||||
{
|
||||
function cipfcard_plugin_menu() {
|
||||
PLGNTLS_class::debug_infos();
|
||||
add_menu_page
|
||||
(
|
||||
'cipf_card', // webpage title
|
||||
@@ -28,14 +28,9 @@ add_action('admin_menu', 'cipfcard_plugin_menu');
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* it means someone outside wp is accessing the file, in this case kill it.
|
||||
*/
|
||||
if (!defined('ABSPATH')) {
|
||||
die('You can not access this file!');
|
||||
}
|
||||
|
||||
function cipfcard_plugin_content() {
|
||||
PLGNTLS_class::debug_infos();
|
||||
$cipfcard = new PLGNTLS_class();
|
||||
|
||||
$my_css = '
|
||||
@@ -66,12 +61,12 @@ ajax
|
||||
- to access the content of the data object properties of the ajax call :
|
||||
use $_POST['property_name']
|
||||
*/
|
||||
function cipfcard_menu_fetch_handler()
|
||||
{
|
||||
function cipfcard_menu_fetch_handler() {
|
||||
PLGNTLS_class::debug_infos();
|
||||
return new WP_REST_Response('hello', 200);
|
||||
}
|
||||
function cipfcard_menu_endpoint()
|
||||
{
|
||||
function cipfcard_menu_endpoint() {
|
||||
PLGNTLS_class::debug_infos();
|
||||
register_rest_route('plgntls', '/get_data', array(
|
||||
'methods' => 'POST',
|
||||
'callback' => 'cipfcard_menu_fetch_handler',
|
||||
|
||||
Reference in New Issue
Block a user