admin管理员组文章数量:1122832
A client wants to be able to partly customize the template output of a plugin in the admin area. This means he will see html / php code in an editor field.
I plan to strip out the tags listed here, but not sure what other measures I can take to prevent him from doing something stupid?
The part I struggle with is the best way to deal with the multilingual part. I thought of two possible routes.
Save the templates in the database with an unique language id for each version. If he needs to have the templates in German, Spanish and English, then he will need to create 3 versions and assign the correct language to it.
Save the custom templates in the /wp-uploads/my-plugin/ folder and use esc_html__() in the template code to make it translatable in different languages.
Anyone who ever had to deal with a request like this from a client?
Having executable code in the wp-uploads folder is probably not the way to go, but having x copies of the same template code in the database with only some words being in a different language also feels wrong.
What's the recommended way to deal with this?
本文标签: multi languageClient wants to be able to customize template with multilingual support
版权声明:本文标题:multi language - Client wants to be able to customize template with multilingual support 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736298737a1930289.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论