Skip to content

Commit d8767d6

Browse files
committed
Merge pull request #75 from brainstormforce/claude-docs-setup
2 parents 8b10a4f + b02b763 commit d8767d6

13 files changed

Lines changed: 2691 additions & 2483 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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,7 @@ node_modules
3131
*.tar.gz
3232
*.zip
3333
.github
34-
.wordpress-org
34+
.wordpress-org
35+
.claude
36+
CLAUDE.md
37+
internal-docs

‎.github/workflows/phpcs.yml‎

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
name: PHP_CodeSniffer
2-
3-
on: pull_request
4-
5-
jobs:
6-
phpcs:
7-
runs-on: ubuntu-latest
8-
steps:
9-
- name: Checkout
10-
uses: actions/checkout@v2
11-
12-
- name: Setup PHP
13-
uses: shivammathur/setup-php@v2
14-
with:
15-
php-version: '8.0'
16-
coverage: none
17-
tools: composer
18-
19-
- name: Install dependencies
20-
run: composer install --prefer-dist --no-suggest --no-progress
21-
22-
- name: Detect coding standard violations
1+
name: PHP_CodeSniffer
2+
3+
on: pull_request
4+
5+
jobs:
6+
phpcs:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v2
11+
12+
- name: Setup PHP
13+
uses: shivammathur/setup-php@v2
14+
with:
15+
php-version: '8.0'
16+
coverage: none
17+
tools: composer
18+
19+
- name: Install dependencies
20+
run: composer install --prefer-dist --no-suggest --no-progress
21+
22+
- name: Detect coding standard violations
2323
run: vendor/bin/phpcs

‎.gitignore‎

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
.DS_Store
2-
phpcs.xml
3-
phpunit.xml
4-
Thumbs.db
5-
wp-cli.local.yml
6-
node_modules/
7-
*.sql
8-
*.tar.gz
9-
*.zip
10-
.wordpress-org
11-
vendor/
1+
.DS_Store
2+
phpcs.xml
3+
phpunit.xml
4+
Thumbs.db
5+
wp-cli.local.yml
6+
node_modules/
7+
*.sql
8+
*.tar.gz
9+
*.zip
10+
.wordpress-org
11+
vendor/
12+
13+
.claude/settings.local.json
14+
config.bat

‎CLAUDE.md‎

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Custom Template for LearnDash
2+
3+
## Project Overview
4+
5+
Custom Template for LearnDash is a WordPress plugin by Brainstorm Force. Replace default LearnDash course template for non-enrolled students with a custom page-builder template.
6+
7+
- **Version:** 1.0.7
8+
- **Text Domain:** custom-template-learndash
9+
- **Main File:** custom-template-learndash.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: `custom-template-learndash.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 `custom-template-learndash` 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)