In the magnificPopup window via AJAX, I need to pass a variable, based on the documentation and searching the Internet, I reached the following code:
$('.link_popup').magnificPopup({ type: 'ajax', ajax: { settings: { cache:false, data: { 'route_name': 'zZzzzz', } }, cursor: 'mfp-ajax-cur', // CSS class that will be added to body during the loading (adds "progress" cursor) tError: '<a href="%url%">The content</a> could not be loaded.' // Error message, can contain %curr% and %total% tags if gallery is enabled }, }); But, the variable is not passed
Accept accordingly as follows:
if ( $_POST ) { $route_name = $_POST["route_name"]; }