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
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745611685a4635981.html
评论列表(0条)