admin管理员组

文章数量:1335620

So, I've done a lot of searching around and there doesn't appear to be any form of Boiler Plate for creating Custom Forms, Dropdowns and that kind of thing within a custom Wordpress plugin. Although, from what I can tell the Wordpress admin panel has its own particular style that I would like to match.

My question is, is there any form of default templates to go off for creating Plugin Admin Options or should I build them from a fresh menu similar to how you would a fresh HTML page?

So, I've done a lot of searching around and there doesn't appear to be any form of Boiler Plate for creating Custom Forms, Dropdowns and that kind of thing within a custom Wordpress plugin. Although, from what I can tell the Wordpress admin panel has its own particular style that I would like to match.

My question is, is there any form of default templates to go off for creating Plugin Admin Options or should I build them from a fresh menu similar to how you would a fresh HTML page?

Share Improve this question asked Jun 28, 2020 at 19:12 A. FletcherA. Fletcher 1113 bronze badges 1
  • Have you checked this one out? github/JoeSz/WordPress-Plugin-Boilerplate-Tutorial – Tony Djukic Commented Jun 29, 2020 at 16:28
Add a comment  | 

1 Answer 1

Reset to default 1

This is a great question. I have never seen any kind of framework inside Wordpress for building forms, and after a bit of searching now to verify this, I don't think there is one, although I'm sure others will correct me if there is ;-)

So, you probably need to hand code forms as you would with a fresh HTML page.

However, there are a bunch of guidelines out there around coding standards and other bits and bobs that might make your life much easier with other issues around building plugins such as boilerplate PHP for integrating with admin hooks, and things you need to know about e.g. naming conventions.

I know this wasn't your question and you may have seen this, but for reference here's a couple of useful links that might help you go faster with other plugin/PHP boilerplate code:

  • Wordpress Plugin Best Practices: https://developer.wordpress/plugins/plugin-basics/best-practices/
  • Wordpress Plugin Boilerplate: https://github/DevinVinson/WordPress-Plugin-Boilerplate
  • Use wp-cli to quickly generate a skeleton plugin: https://developer.wordpress/cli/commands/scaffold/plugin/

本文标签: templatesPlugin Admin Menu Boiler Plate