The template_meta_load
function checks that all required arguments for the template
are provided. If any required arguments are missing, it will abort with
an error of class "error_template_missing_args".
It raises an error if the template is not found or if the required arguments are not
provided. The error message will indicate which arguments are missing.
The template_meta_new
function checks that all required arguments for the template
are provided. If any required arguments are missing, it will abort with
an error of class "error_template_missing_args".
It raises an error if the template already exists in the database.
The template_meta_create_or_load
function is a safe way to create
or load template metadata. It first attempts to create a new metadata object
using the provided arguments. If that fails (e.g., if the template already exists),
it will attempt to load the existing metadata object. This is useful for ensuring
that you always have access to the latest metadata for a given template.