Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
/.idea
/.idea
.DS_Store
.claude/
AGENTS.md
openspec/
vendor/
/.phpunit.cache/
19 changes: 19 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
<!-- OPENSPEC:START -->
# OpenSpec Instructions

These instructions are for AI assistants working in this project.

Always open `@/openspec/AGENTS.md` when the request:
- Mentions planning or proposals (words like proposal, spec, change, plan)
- Introduces new capabilities, breaking changes, architecture shifts, or big performance/security work
- Sounds ambiguous and you need the authoritative spec before coding

Use `@/openspec/AGENTS.md` to learn:
- How to create and apply change proposals
- Spec format and conventions
- Project structure and guidelines

Keep this managed block so 'openspec update' can refresh the instructions.

<!-- OPENSPEC:END -->

# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Expand Down
59 changes: 46 additions & 13 deletions bot-cat.php
Original file line number Diff line number Diff line change
@@ -1,22 +1,55 @@
<?php
/**
* Plugin Name: Bot Cat
* Plugin URI: https://ericwu.asia/plugins/bot-cat
* Description: Simply send chatbot notifications via plugins
* Requires at least: 6.4.2
* Requires PHP: 8.2
* Author: Eric Wu
* Author URI: https://ericwu.asia/
* Version: 1.1.6
* Plugin Name: bot-cat
* Plugin URI: https://bot-cat.com
* Description: LINE Official Account push-notification plugin for content sites. Sends a LINE message to your subscribers every time a post is published.
* Version: 1.0.0
* Requires at least: 7.0
* Requires PHP: 8.1
* Author: bot-cat
* Author URI: https://bot-cat.com
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: bot-cat
* Domain Path: /languages
*
* @package BotCat
*/

namespace BotCat;

defined( 'ABSPATH' ) || exit;

if ( defined( 'BOT_CAT_FILE' ) ) {
return;
}

define( 'BOT_CAT_FILE', __FILE__ );
define( 'BOT_CAT_DIR', plugin_dir_path( __FILE__ ) );
define( 'BOT_CAT_URL', plugin_dir_url( __FILE__ ) );
define( 'BOT_CAT_VERSION', '1.3.0' );
define( 'BOT_CAT_MIN_PHP', '8.1' );
define( 'BOT_CAT_MIN_WP', '7.0' );

if ( ! file_exists( BOT_CAT_DIR . 'vendor/autoload.php' ) ) {
add_action(
'admin_notices',
static function () {
printf(
'<div class="notice notice-error"><p>%s</p></div>',
esc_html__( 'bot-cat: Composer dependencies are missing. Run "composer install" inside the plugin directory.', 'bot-cat' )
);
}
);
return;
}

require_once BOT_CAT_DIR . 'vendor/autoload.php';

require_once __DIR__ . '/includes/BotCatConstants.php';
require_once __DIR__ . '/vendor/autoload.php';
register_activation_hook( __FILE__, array( \BotCat\Foundation\Activator::class, 'activate' ) );
register_deactivation_hook( __FILE__, array( \BotCat\Foundation\Deactivator::class, 'deactivate' ) );

BotCatInitializer::bot_cat_init();
add_action(
'plugins_loaded',
static function () {
\BotCat\Foundation\Plugin::boot( BOT_CAT_FILE );
}
);
64 changes: 37 additions & 27 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,40 @@
{
"name": "eric0324/bot-cat",
"description": "",
"license": "GPL-2.0",
"keywords": [],
"homepage": "https://ericwu.asias/",
"type": "wordpress-plugin",
"authors": [
{
"name": "EricWu",
"email": "smart032410@gmail.com"
"name": "bot-cat/bot-cat",
"description": "LINE Official Account push-notification plugin for WordPress.",
"type": "wordpress-plugin",
"license": "GPL-2.0-or-later",
"require": {
"php": ">=8.1",
"woocommerce/action-scheduler": "^3.7"
},
"require-dev": {
"phpunit/phpunit": "^10.5",
"brain/monkey": "^2.6",
"mockery/mockery": "^1.6",
"squizlabs/php_codesniffer": "^3.10",
"wp-coding-standards/wpcs": "^3.1",
"phpcompatibility/phpcompatibility-wp": "^2.1",
"dealerdirect/phpcodesniffer-composer-installer": "^1.0"
},
"autoload": {
"psr-4": {
"BotCat\\": "src/"
}
],
"support": {
"issues": "https://wordpress.org/support/plugin/bot-cat/"
},
"config": {
"platform": {
"php": "8.2.1"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"require": {},
"autoload": {
"psr-4": {
"BotCat\\": "includes/"
},
"autoload-dev": {
"psr-4": {
"BotCat\\Tests\\": "tests/"
}
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
},
"sort-packages": true
},
"scripts": {
"test": "phpunit",
"lint": "phpcs",
"fix": "phpcbf"
}
}
}
}
Loading