內容簡介
這是一個供外掛開發人員使用的功能完整的範例插件。
它作為一個啟動代碼,提供以下參考和工作代碼庫:
定義自定義文章類型和分類法
創建管理員頁面
Settings API 的管理頁面實現的示例代碼
註冊啟用/停用鉤子
在頁面上添加 metabox
創建示例短碼
創建示例小部件
創建 AJAX 請求將示例數據存儲在數據庫中
使用 HTTP API 創建 AJAX 請求以獲取遠程數據
正確添加前端樣式/腳本
正確添加管理員樣式/腳本
定義通用常量以供進一步使用
等等。請自由地將其用作插件啟動片段。
將代碼按原樣進行測試和學習,或在創建插件時使用它作為可靠的基礎。可進一步擴展,添加小部件和短碼示例。
外掛標籤
開發者團隊
原文外掛簡介
This is a fully-functional sample skeleton plugin for plugin developers.
It serves as a startup code providing reference and working codebase for:
defining custom post types and taxonomies
creating admin pages
sample code of the Settings API implementation for admin pages
registration of activate/deactivate hooks
adding metaboxes on pages
creating sample shortcode
creating sample widget
creating AJAX requests storing sample data in the database
creating AJAX requests for fetching remote data with the HTTP API
adding frontend styles/scripts the right way
adding admin styles/scripts the right way
defining common constants for further use
and more. Use it freely as your plugin startup snippet.
Take the code as is for test and learning or use it when creating plugins for a solid base. To be extended with
widget and shortcode samples.
