admin管理员组文章数量:1426047
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
1 Answer
Reset to default 0Perhaps 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.
本文标签: Multiple plugins linked to same settings page
版权声明:本文标题:Multiple plugins linked to same settings page 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745464490a2659472.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论