Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
256 views
in Technique[技术] by (71.8m points)

php - wordpress插件如何保存设置信息? [重复](How does a wordpress plugin save settings information? [duplicate])

How does a WordPress plugin save settings information ?

(WordPress插件如何保存设置信息?)

For example, where does it keep the template information that we enter in WordPress panel ?

(例如,它在哪里保存我们在WordPress面板中输入的模板信息?)

In a database or in define functions?

(在数据库中还是在定义函数中?)

What is the best way?

(什么是最好的方法?)

  ask by irmmr translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The best way is that you can register, save and read the extra information using with WordPress Plugin settings with form.

(最好的方法是,您可以使用带有表单的WordPress插件设置来注册,保存和阅读额外的信息)

You have to follow the steps as mentioned in articles with birfe information.

(您必须按照文章中提到的步骤使用birfe信息。)

First Step, You can "add form to WordPress plugin page" in functions.php file as mentioned in article file.

(第一步,如文章文件中所述您可以在functions.php文件中“将表单添加到WordPress插件页面”。)

- Save WordPress plugin settings with form

(- 使用表单保存WordPress插件设置)

Second Step, you can register the Register WordPress plugin settings to database - Register WordPress plugin settings to database

(第二步,您可以将WordPress插件设置注册到数据库-将WordPress插件设置注册到数据库)

Third Step, you can implement to read WordPress plugin settings from database - Read WordPress plugin settings from database

(第三步,您可以实现从数据库读取WordPress插件设置 -从数据库读取WordPress插件设置)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...