简体   繁体   English

如何在WordPress中为现有的非WordPress应用程序创建自定义管理面板

[英]How to create a custom admin panel in WordPress for an existing non-WordPress application

I have an existing PHP/MySQL application (non-WP). 我有一个现有的PHP / MySQL应用程序(非WP)。 I'm showing bits and pieces of this application via iframes in a WP site. 我通过WP站点中的iframe显示了这个应用程序的各个部分。 Right now the client has two admins; 现在客户端有两个管理员; WP and my own custom admin and it's inconvenient for them. WP和我自己的自定义管理员,这对他们来说很不方便。

What I want to achieve is to be able to show my custom admin inside WP. 我想要实现的是能够在WP中显示我的自定义管理员。 Every section of my admin is quite simple and with few controls so I don't mind doing a re-write to adapt this code to WP. 我的管理员的每个部分都非常简单,几乎没有控件,所以我不介意重新编写以使此代码适应WP。

Having never really developed anything related to WordPress I need to know conceptually how to approach this. 从未真正开发过与WordPress相关的任何内容,我需要从概念上了解如何处理这个问题。 I don't need for code samples but rather the steps involved in all of this. 我不需要代码示例,而是需要所有这些步骤。 Any gotchas from experienced WP developers are quite welcome too. 来自经验丰富的WP开发人员的任何问题都非常受欢迎。

I think you can develop a WordPress plugin for your non-WP application. 我认为你可以为你的非WP应用程序开发一个WordPress插件。

Here's the approach I would try (you only say your app is quite simple, so I'm just assuming it's made of few pages/forms): 这是我会尝试的方法(你只说你的应用程序很简单,所以我只是假设它是由几页/表格组成):

  • Create a plugin that leverage WP authentication 创建一个利用WP身份验证的插件
  • Show your app inside iframes in the WP admin panel 在WP管理面板中的iframe中显示您的应用
  • Change your app UI in order to match or use the WP admin panel one. 更改您的应用UI以匹配或使用WP管理面板。

I did this in the past and having an iframe to be showed in the WP admin it's quite easy and users are happy to have just one authentication point. 我过去做过这个并且在WP管理员中显示iframe非常简单,用户很高兴只有一个身份验证点。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM