Multiple plugins linked to same settings page

I have several custom plugins that do very different things but I use on each of them (or almost) the Jenkins and Mantis

I have several custom plugins that do very different things but I use on each of them (or almost) the Jenkins and Mantis Rest APIs. For the moment, the API settings (as URL or tokens) are hard coded in the plugin codes, but I would like to centralize this information on a settings page.

I found a good tutorial to add a plugin settings page but it would require a settings page for each plugin when the information would be the same...

Would anyone have a solution?

I have several custom plugins that do very different things but I use on each of them (or almost) the Jenkins and Mantis Rest APIs. For the moment, the API settings (as URL or tokens) are hard coded in the plugin codes, but I would like to centralize this information on a settings page.

I found a good tutorial to add a plugin settings page but it would require a settings page for each plugin when the information would be the same...

Would anyone have a solution?

Share Improve this question asked May 24, 2019 at 12:54 ninagathninagath 1033 bronze badges 1
  • How about a global (theme level) options page? codex.wordpress/Creating_Options_Pages – jdm2112 Commented May 24, 2019 at 15:55
Add a comment  | 

1 Answer 1

Reset to default 0

Perhaps you could create a dedicated settings plugin, which you would use to add single settings page and register separate section and setting for each token/url/etc.

As the settings are saved to the database you can get them with get_option( 'setting_name' ) in any other plugin whenever you need.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745464490a4628856.html

相关推荐

  • Multiple plugins linked to same settings page

    I have several custom plugins that do very different things but I use on each of them (or almost) the Jenkins and Mantis

    4小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信