/**
	 * Enqueues Admin JavaScript for include/admin.js and js/admin.js and js/admin-<tabname>-tab.js (minified if present)
	 *
	 * @used-by \SLP_BaseClass_Admin::add_hooks_and_filters     for WP Hook: admin_enqueue_scripts [10]
	 *
	 * @see https://docs.storelocatorplus.com/development/2022/07/13/debugging-add-locations-w-power-uncaught-syntaxerror-redeclaration-of-const-wp_data/
	 *
	 * @param string $hook
	 */

Generic admin.js script loading

Admin Tab Specific script loading

This loads up javascript files , if they exist, for specific tabs such as “info” or “experience”.

The tab name is simplified by stripping SLP_ADMIN_PAGEPRE . ‘slp_’ from the hook name for the page.

SLP_ADMIN_PAGEPRE is set in the main Store Locator Plus plugin loader.php file as

defined( 'SLP_ADMIN_PAGEPRE' ) || define( 'SLP_ADMIN_PAGEPRE', 'store-locator-plus_page_' );

As of 2501.06.01 this will also check and strip “toplevel_page_slp_” from the hook name to decide it is should enqueue a tab-specific script.