Fix code quality issues and Markdown formatting

This commit is contained in:
2025-04-21 21:15:29 +01:00
parent e8d81ef45b
commit ed160ed51b
5 changed files with 64 additions and 62 deletions

View File

@@ -10,7 +10,7 @@ WordPress Multisite allows you to run multiple WordPress sites from a single Wor
The plugin includes a dedicated directory for multisite-specific functionality: The plugin includes a dedicated directory for multisite-specific functionality:
``` ```text
includes/ includes/
└── Multisite/ └── Multisite/
├── class-multisite.php # Base class for multisite functionality ├── class-multisite.php # Base class for multisite functionality
@@ -23,8 +23,8 @@ includes/
The `Multisite` class in `includes/Multisite/class-multisite.php` provides a foundation for multisite-specific functionality. It includes: The `Multisite` class in `includes/Multisite/class-multisite.php` provides a foundation for multisite-specific functionality. It includes:
- A constructor for initialization * A constructor for initialization
- Example methods for multisite functionality * Example methods for multisite functionality
### 2. Load Multisite Classes ### 2. Load Multisite Classes

View File

@@ -19,6 +19,7 @@ We use `@wordpress/env` and Cypress for testing our plugin.
### Installation ### Installation
1. Clone the repository: 1. Clone the repository:
```bash ```bash
git clone https://github.com/wpallstars/wp-plugin-starter-template-for-ai-coding.git git clone https://github.com/wpallstars/wp-plugin-starter-template-for-ai-coding.git
cd wp-plugin-starter-template-for-ai-coding cd wp-plugin-starter-template-for-ai-coding
@@ -37,8 +38,8 @@ We use `@wordpress/env` and Cypress for testing our plugin.
``` ```
This will: This will:
- Start a WordPress environment using wp-env * Start a WordPress environment using wp-env
- Activate our plugin * Activate our plugin
2. Run Cypress tests for single site: 2. Run Cypress tests for single site:
```bash ```bash
@@ -51,8 +52,8 @@ We use `@wordpress/env` and Cypress for testing our plugin.
``` ```
3. Access the site manually: 3. Access the site manually:
- Site: http://localhost:8888 * Site: <http://localhost:8888>
- Admin login: admin / password * Admin login: admin / password
## Testing in WordPress Multisite ## Testing in WordPress Multisite
@@ -62,10 +63,10 @@ We use `@wordpress/env` and Cypress for testing our plugin.
``` ```
This will: This will:
- Start a WordPress environment using wp-env * Start a WordPress environment using wp-env
- Configure it as a multisite installation * Configure it as a multisite installation
- Create a test subsite * Create a test subsite
- Network activate our plugin * Network activate our plugin
2. Run Cypress tests for multisite: 2. Run Cypress tests for multisite:
```bash ```bash
@@ -78,9 +79,9 @@ We use `@wordpress/env` and Cypress for testing our plugin.
``` ```
3. Access the sites manually: 3. Access the sites manually:
- Main site: http://localhost:8888 * Main site: <http://localhost:8888>
- Test subsite: http://localhost:8888/testsite * Test subsite: <http://localhost:8888/testsite>
- Admin login: admin / password * Admin login: admin / password
## Continuous Integration ## Continuous Integration
@@ -119,7 +120,8 @@ Add new multisite tests to `cypress/e2e/multisite.cy.js`.
### Getting Help ### Getting Help
If you encounter any issues, please open an issue on our GitHub repository with: If you encounter any issues, please open an issue on our GitHub repository with:
- A description of the problem
- Steps to reproduce * A description of the problem
- Any error messages * Steps to reproduce
- Your environment details (OS, Node.js version, etc.) * Any error messages
* Your environment details (OS, Node.js version, etc.)

View File

@@ -4,13 +4,13 @@ This PR adds a comprehensive testing framework for our WordPress plugin template
## Changes ## Changes
- Added wp-env configuration for both single site and multisite environments * Added wp-env configuration for both single site and multisite environments
- Created Cypress e2e tests for both environments * Created Cypress e2e tests for both environments
- Added GitHub Actions workflow to run tests automatically on PRs * Added GitHub Actions workflow to run tests automatically on PRs
- Created a unified setup script for test environments * Created a unified setup script for test environments
- Added detailed documentation in the wiki * Added detailed documentation in the wiki
- Updated README.md to reference the new testing approach * Updated README.md to reference the new testing approach
- Added placeholder files for multisite functionality * Added placeholder files for multisite functionality
## Testing ## Testing

View File

@@ -3,7 +3,7 @@ const { defineConfig } = require('cypress');
module.exports = defineConfig({ module.exports = defineConfig({
e2e: { e2e: {
baseUrl: 'http://localhost:8888', baseUrl: 'http://localhost:8888',
setupNodeEvents(on, config) { setupNodeEvents() {
// implement node event listeners here // implement node event listeners here
}, },
}, },