Jump to content
  • Hello visitors, welcome to the Hacker World Forum!

    Red Team 1949  (formerly CHT Attack and Defense Team) In this rapidly changing Internet era, we maintain our original intention and create the best community to jointly exchange network technologies. You can obtain hacker attack and defense skills and knowledge in the forum, or you can join our Telegram communication group to discuss and communicate in real time. All kinds of advertisements are prohibited in the forum. Please register as a registered user to check our usage and privacy policy. Thank you for your cooperation.

    TheHackerWorld Official

WordPress-Plugin-Boilerplate-Tutorial 更为简洁的架构方案

 Share


HACK1949

Recommended Posts

官网: https://wppb.me/
Github: https://github.com/DevinVinson/WordPress-Plugin-Boilerplate

 

Folder Subfolder / File Description
1. root algo-trade.php  加载插件
2. /includes class-algo-trade.php  load_dependencies() 注册实体列表
  class-algo-trade-activator.php  重写activator (Optional)
  class-algo-trade-deactivator.php  重写deactivator (Optional)
  class-algo-trade-i18n.php  load_plugin_textdomain() 加载.mo file
  class-algo-trade-loader.php  注册器 (可忽略)
3. /admin /css  
  /js  
  /partials  不建议使用
  class-algo-trade-admin.php

 enqueue_styles() 加载css

 enqueue_scripts() 加载js

4. /public /css  
  /js  
  /partials  
  class-algo-trade-public.php  
4. /languages    .mo files

 

优点:
/includes 核心组件职责分明。
分隔了/admin和/public。

Link to post
Link to comment
Share on other sites

 Share

discussion group

discussion group

    You don't have permission to chat.
    • Recently Browsing   0 members

      • No registered users viewing this page.
    ×
    ×
    • Create New...