-
-
Notifications
You must be signed in to change notification settings - Fork 110
Description
Is your feature request related to a problem?
A potential possible problem: If you use a txp:php block in a self-made shortcode-tag and that shortcode-tag is used in an article body or excerpt, it will not execute in articles by users without php-in-articles rights. 😳
The newer, safer way to do this is to enable a php function for txp:evaluate in the advanced options prefs (once it has been switched on). That, then, works just fine in a shortcode form when that shortcode tag is used in an article by a user without php rights. 🤓
However, this could present difficulties for theme authors. They can't safely use txp:evaluate query="php-function-here" without first instructing the theme users to add the php function to the permitted functions list in the advanced prefs.
But if they use txp:php it can happen that their shortcode-tags won't function. 🤔
What is the feature?
I'm not sure what's best here:
- Allow "php in shortcodes" to work when used in articles despite "php in articles" not being allowed. One could argue, this is safe given that authors with those rights can't write their own shortcode tags to circumvent the rule.
- Provide a mechanism by which theme authors can activate selected functions for use with txp:evaluate.