function sb_core_style_and_script() { if (sb_core_testing()) { wp_register_script('sb-core', SB_CORE_URL . '/js/sb-core-script.js', array('jquery'), false, true); } else { wp_register_script('sb-core', SB_CORE_URL . '/js/sb-core-script.min.js', array('jquery'), false, true); } wp_localize_script('sb-core', 'sb_core_ajax', array('url' => SB_Core::get_admin_ajax_url())); wp_enqueue_script('sb-core'); }