https://github.com/j7-dev/wp-plugin
https://github.com/j7-dev/wp-plugin
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/j7-dev/wp-plugin
- Owner: j7-dev
- License: gpl-2.0
- Created: 2024-01-11T15:57:54.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2025-06-17T07:32:09.000Z (9 months ago)
- Last Synced: 2025-06-17T08:31:40.482Z (9 months ago)
- Language: JavaScript
- Size: 187 KB
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# My Plugin | 我的 WordPress 外掛
一句話講完 My Plugin :
> 這是一個 WordPress 外掛的範本,可以用來開發新的外掛。
## ⚡ 主要功能
#### 1. 整合 TGM Plugin
功能: 方便你依賴其他外掛,詳情可以參考[說明](http://tgmpluginactivation.com/configuration/)
#### 2. 整合 plugin-update-checker
功能: 當你在 github release 時,可以自動通知使用者更新,詳情可以參考[說明](https://github.com/YahnisElsts/plugin-update-checker)
## 用法
#### 請先執行 composer install 安裝依賴
#### 如果你依賴多個 plugins ,需要在 `check_required_plugins` 判斷是否都已經啟用
```php
public function check_required_plugins()
{
self::$is_all_plugins_activated = \class_exists(self::WOOCOMMERCE_CLASS);
if (self::$is_all_plugins_activated) {
new Bootstrap();
}
}
```
#### 在 Utils 定義常數
```php
const APP_NAME = 'My Plugin';
const KEBAB = 'my-plugin';
const SNAKE = 'my_plugin';
const GITHUB_REPO = 'https://github.com/j7-dev/wp-plugin';
```