Closed. This question needs to be more focused. It is not currently accepting answers.admin管理员组文章数量:1024673
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this questionI want to store some conditional logic in custom post types , and then use these in a plugin to generate new content based on the logic.
Eg if a user submits a form with “body temperature”, a conditional logic will tell the user if she has a fever or not, and some extra text.
There will be many such logic elements and I would like to maintain them from the front end.
I was thinking about putting the above into two posts. One with condition field “temperature > 37” and text “you have a fever”. Then in a plugin loop through logic records, take the conditional field and use it as the expression in an if statement.
How to make this work?
Closed. This question needs to be more focused. It is not currently accepting answers.Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this questionI want to store some conditional logic in custom post types , and then use these in a plugin to generate new content based on the logic.
Eg if a user submits a form with “body temperature”, a conditional logic will tell the user if she has a fever or not, and some extra text.
There will be many such logic elements and I would like to maintain them from the front end.
I was thinking about putting the above into two posts. One with condition field “temperature > 37” and text “you have a fever”. Then in a plugin loop through logic records, take the conditional field and use it as the expression in an if statement.
How to make this work?
Share Improve this question asked Apr 4, 2019 at 6:04 KCarterKCarter 113 bronze badges1 Answer
Reset to default 0I asked the question in another group and here I got an answer that has turned out to be useful.
BE AWARE! It must be dealt with with caution as the PHP eval() function can be a significant security risk.
Find the answer here: https://stackoverflow/a/55518496/11309498
Closed. This question needs to be more focused. It is not currently accepting answers.Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this questionI want to store some conditional logic in custom post types , and then use these in a plugin to generate new content based on the logic.
Eg if a user submits a form with “body temperature”, a conditional logic will tell the user if she has a fever or not, and some extra text.
There will be many such logic elements and I would like to maintain them from the front end.
I was thinking about putting the above into two posts. One with condition field “temperature > 37” and text “you have a fever”. Then in a plugin loop through logic records, take the conditional field and use it as the expression in an if statement.
How to make this work?
Closed. This question needs to be more focused. It is not currently accepting answers.Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this questionI want to store some conditional logic in custom post types , and then use these in a plugin to generate new content based on the logic.
Eg if a user submits a form with “body temperature”, a conditional logic will tell the user if she has a fever or not, and some extra text.
There will be many such logic elements and I would like to maintain them from the front end.
I was thinking about putting the above into two posts. One with condition field “temperature > 37” and text “you have a fever”. Then in a plugin loop through logic records, take the conditional field and use it as the expression in an if statement.
How to make this work?
Share Improve this question asked Apr 4, 2019 at 6:04 KCarterKCarter 113 bronze badges1 Answer
Reset to default 0I asked the question in another group and here I got an answer that has turned out to be useful.
BE AWARE! It must be dealt with with caution as the PHP eval() function can be a significant security risk.
Find the answer here: https://stackoverflow/a/55518496/11309498
本文标签: phpUsing custom field content as expression in IF statement
版权声明:本文标题:php - Using custom field content as expression in IF statement 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745611683a2159036.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论