I’m getting a series of HTTP requests on the front-end of the website that seem unnecessary or consolidatable (is that a word?). Is there any way around ACF loading these files? I feel like 7 requests for visitors not even using select fields, date pickers, etc is just unneeded.
/wp-content/plugins/advanced-custom-fields-pro/assets/js/acf-input.min.js
/wp-content/plugins/advanced-custom-fields-pro/assets/inc/select2/4/select2.full.min.js
/wp-content/plugins/advanced-custom-fields-pro/assets/inc/timepicker/jquery-ui-timepicker-addon.min.js
/wp-content/plugins/advanced-custom-fields-pro/pro/assets/js/acf-pro-input.min.js
/wp-content/plugins/advanced-custom-fields-pro/assets/css/acf-global.css
/wp-content/plugins/advanced-custom-fields-pro/assets/css/acf-input.css
/wp-content/plugins/advanced-custom-fields-pro/pro/assets/css/acf-pro-input.css
Actually, checking if someone is logged in before calling acf_form_head();
took care of all of those and more.
<?php
if(is_user_logged_in()):
if(class_exists('acf')):
acf_form_head();
endif;
endif;
?>