wip trying to create better options to include scripts with attributes

This commit is contained in:
asus
2024-02-27 01:54:46 +01:00
parent 0177531924
commit 81f3f8a7e7
11 changed files with 60 additions and 18 deletions

View File

@@ -374,6 +374,13 @@ function fipfcard_ajax_handler()
200
);
}
add_action( 'wp_ajax_get_data', 'fipfcard_ajax_handler' );
function fipfcard_menu_endpoint()
{
register_rest_route('', '/get_data', array(
'methods' => 'POST',
'callback' => 'fipfcard_ajax_handler',
));
};
add_action('rest_api_init', 'fipfcard_menu_endpoint');
?>