Scripts that is used within the plugin is located in the ResursBank\Module\Data class.
|Default loaders that is usually added to the user sections for WordPress.|
|Scripts that is only loaded in the head, at checkout section.|
|Script loaded in the admin section.|
Every script that has dependencies in other scripts should be added here. For example if some of the basic scripts needs jquery it is added like this:
|As the regular dependency variable above, but for admin section.|
|Every css that needs to be loaded.|
|Css that resides in the admin section.|
The built in colleciton of scripts provides a few scripts for handling the basic calls of the plugins. The bundled scripts are listed below.
|js/resursbank.js||Default front page script. Customer based non admin.|
|js/resursbank_admin.js||Admin (wp-admin) based scripts. Nothing peculiar actually, it's just code that doesn't have to be used in the front to save performance, etc.|
Global script. Loaded both with admin and front page. Contains amongst others an ajaxfier.
We could create separate ajax calls for each thing we'd like to do, but that will in the end cost more space and the calls may look different each time they are used. I don't see why we would need that.
See below in the AJAX calls section how this works.