CMS Mastering Development Wordpress

How to add and use a custom php script to WordPress REST API?

I have customized the WordPress rest API A bit and added the customization under functions.php. Currently, under (/wp-content/themes/my-theme/js/Ajaxcall.js) I have a JS function that is triggered on click that POST to the name_ajax_front_end_submit function under (ajax_function_edit.php) $(‘#form_submit_1’).on(‘click’,function () { $.ajax({ type: ‘POST’, url: ajaxurl, data: { ‘action’ : ‘name_ajax_front_end_submit’, ‘title’ : title, ‘prop_category’ : prop_category, […]