Plugins are always loaded on demand. only the specific modifiers, functions, resources, etc invoked in the templates scripts will be loaded. moreover, each plugin is loaded only once, even if you have several different instances of smarty running within the same request.
Plug-ins are always loaded as needed. Only specific modifiers, functions, resource plug-ins called in template scripts are loaded. In addition, each plug-in is loaded only once even if several different smarty entities are running in the same request.
Pre/postfilters and output filters are a bit of a special case. since they are not mentioned in the templates, they must be registered or loaded explicitly via API functions before the template is processed. the order in which multiple filters of the same type are executed depends on the order in which they are registered or loaded.
The loading methods of the PRE/fill filter plug-in and the output filter plug-in are somewhat different. Since they are not mentioned in the template, they must be explicitly loaded into the system through API functions before the template is processed. Multiple Filter plug-ins of the same type are executed in different loading order.
The plugins directory can be a string containing a path or an array containing multiple paths. to install a plugin, simply place it in one of the directories and Smarty will use it automatically.
The plug-in directory is a string containing a path or a string array containing multiple paths. When installing the plug-in, put the plug-in under one directory, and Smarty will automatically identify and use it.