I am having a heck of a time finding an answer to this solution. I have googled everything I can think of but I can't find anything. I want to load an inline JavaScript tag in the footer of the admin. When I use the admin_footer action, the code is added before the JS tags that are called by the wp_enqueue_script function. I need this script to be called after those scripts. How can I achieve this?
This is what I am using now:
<?php add_action('admin_footer', 'gallery_js', PHP_INT_MAX);
function gallery_js(){ ?>
<script>
(function($){
$('#deleteSelected').serviceGallery({
ajaxUrl: '<?php echo JZS_PLUGIN_PATH.'/admin/partials/service-gallery-ajax.php';?>'
});
})(jQuery);
</script>
<?php }
See this image for a better explanation: The image is when using the admin_footer action.