moved get_custom_templates into plugins.js