Skip to content

Commit c50becf

Browse files
committed
Merge pull request #68 from brainstormforce/claude-docs-setup
2 parents b20bd41 + 6c319b2 commit c50becf

9 files changed

Lines changed: 449 additions & 233 deletions

File tree

.claude/settings.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(npx grunt:*)",
5+
"Bash(npm install)",
6+
"Bash(composer install)",
7+
"Bash(./vendor/bin/phpcs:*)",
8+
"Bash(git status)",
9+
"Bash(git diff:*)",
10+
"Bash(git log:*)",
11+
"Bash(git branch:*)",
12+
"Bash(git checkout:*)",
13+
"Bash(git add:*)",
14+
"Bash(git commit:*)",
15+
"Bash(git push:*)",
16+
"Bash(git remote:*)",
17+
"Bash(ls:*)",
18+
"Bash(find:*)",
19+
"Bash(cat:*)",
20+
"Bash(wc:*)"
21+
],
22+
"deny": [
23+
"Bash(rm -rf:*)",
24+
"Bash(git push --force:*)",
25+
"Bash(git reset --hard:*)"
26+
]
27+
}
28+
}

.distignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,7 @@ node_modules
3232
package-lock.json
3333
.github
3434
.wordpress-org
35+
36+
.claude
37+
CLAUDE.md
38+
internal-docs

.gitignore

Lines changed: 38 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,38 @@
1-
# ignore PHPStorm extra directories
2-
.idea/
3-
4-
# Leave node_modules from git
5-
node_modules/
6-
7-
# sass cache
8-
.sass-cache
9-
10-
# map files
11-
*.map
12-
13-
# Skip package file from versoning
14-
*.zip
15-
*.sql
16-
*.tar.gz
17-
18-
# ignore git inside subproject
19-
admin/bsf-core/.git
20-
21-
# ignore PHPCS report files
22-
phpcs-summary.log
23-
phpcs-full.log
24-
25-
# Exclude OS specific files
26-
.DS_Store
27-
28-
# Exclude composer's directories
29-
vendor/
30-
31-
# Exclude exported settings
32-
borders-for-default-menu.json
33-
defaults.json
34-
no-toggle-border-fix.json
35-
cghooks.lock
36-
wp-cli.local.yml
1+
# ignore PHPStorm extra directories
2+
.idea/
3+
4+
# Leave node_modules from git
5+
node_modules/
6+
7+
# sass cache
8+
.sass-cache
9+
10+
# map files
11+
*.map
12+
13+
# Skip package file from versoning
14+
*.zip
15+
*.sql
16+
*.tar.gz
17+
18+
# ignore git inside subproject
19+
admin/bsf-core/.git
20+
21+
# ignore PHPCS report files
22+
phpcs-summary.log
23+
phpcs-full.log
24+
25+
# Exclude OS specific files
26+
.DS_Store
27+
28+
# Exclude composer's directories
29+
vendor/
30+
31+
# Exclude exported settings
32+
borders-for-default-menu.json
33+
defaults.json
34+
no-toggle-border-fix.json
35+
cghooks.lock
36+
wp-cli.local.yml
37+
.claude/settings.local.json
38+
config.bat

CLAUDE.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Sidebar Manager
2+
3+
## Project Overview
4+
5+
Sidebar Manager is a WordPress plugin by Brainstorm Force. Create and manage custom sidebars with target rules.
6+
7+
- **Version:** 2.0.0
8+
- **Text Domain:** bsfsidebars
9+
- **Main File:** sidebar-manager.php
10+
- **Requires:** WordPress, PHP 5.6+
11+
12+
## Tech Stack
13+
14+
- **Language:** PHP
15+
- **Platform:** WordPress
16+
- **Build:** Grunt (i18n, readme conversion)
17+
- **Coding Standards:** PHPCS with WordPress standards
18+
19+
## Commands
20+
21+
```bash
22+
# Install dependencies
23+
npm install
24+
composer install
25+
26+
# Build (i18n + readme)
27+
npx grunt
28+
29+
# Generate translations
30+
npx grunt i18n
31+
32+
# Convert readme.txt to README.md
33+
npx grunt readme
34+
35+
# Run PHPCS
36+
./vendor/bin/phpcs .
37+
```
38+
39+
## Architecture
40+
41+
This is a WordPress plugin following standard WordPress patterns:
42+
- Entry point: `sidebar-manager.php`
43+
- Constants defined for version, file path, base, dir, and URI
44+
- Classes loaded via `after_setup_theme` or `plugins_loaded` hook
45+
- Follows WordPress Coding Standards (WPCS)
46+
47+
## Conventions
48+
49+
- Use WordPress hooks (`add_action`, `add_filter`) for extensibility
50+
- Prefix all functions and classes to avoid conflicts
51+
- Use `bsfsidebars` text domain for all translatable strings
52+
- Escape all output (`esc_html`, `esc_attr`, `esc_url`, `wp_kses`)
53+
- Sanitize all input (`sanitize_text_field`, `absint`, etc.)
54+
- Use nonces for form submissions and AJAX requests
55+
- Follow WordPress PHP coding standards

0 commit comments

Comments
 (0)