Compare commits
7 Commits
a31cfcb565
...
github-wor
Author | SHA1 | Date | |
---|---|---|---|
481cb5cf23 | |||
4b5b34ca9c | |||
4594eeb7a1 | |||
f643f43481 | |||
be4ec15f29 | |||
646c132830 | |||
f9be702b9c |
42
.distignore
Normal file
42
.distignore
Normal file
@ -0,0 +1,42 @@
|
||||
# Directories
|
||||
/.git
|
||||
/.github
|
||||
/.vscode
|
||||
/.idea
|
||||
/bin
|
||||
/node_modules
|
||||
/tests
|
||||
/build
|
||||
|
||||
# Root Files
|
||||
.distignore
|
||||
.editorconfig
|
||||
.eslintignore
|
||||
.eslintrc*
|
||||
.gitignore
|
||||
.stylelintrc*
|
||||
phpunit.xml
|
||||
tsconfig.json
|
||||
webpack.config.js
|
||||
*.log
|
||||
jest.config.js
|
||||
|
||||
# Development Files
|
||||
*.map
|
||||
*.ts
|
||||
!*.d.ts
|
||||
.travis.yml
|
||||
.phpcs.xml.dist
|
||||
composer.json
|
||||
composer.lock
|
||||
package.json
|
||||
package-lock.json
|
||||
phpcs.xml
|
||||
README.md
|
||||
CONTRIBUTING.md
|
||||
*.zip
|
||||
*.tar.gz
|
||||
|
||||
# System Files
|
||||
.DS_Store
|
||||
Thumbs.db
|
34
.eslintrc.js
Normal file
34
.eslintrc.js
Normal file
@ -0,0 +1,34 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
parser: '@typescript-eslint/parser',
|
||||
parserOptions: {
|
||||
ecmaVersion: 2020,
|
||||
sourceType: 'module',
|
||||
ecmaFeatures: {
|
||||
jsx: true,
|
||||
},
|
||||
},
|
||||
settings: {
|
||||
react: {
|
||||
version: 'detect',
|
||||
},
|
||||
},
|
||||
extends: [
|
||||
'eslint:recommended',
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
],
|
||||
rules: {
|
||||
// Customize rules as needed
|
||||
'no-console': ['warn', { allow: ['warn', 'error'] }],
|
||||
'@typescript-eslint/explicit-function-return-type': 'off',
|
||||
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
||||
'@typescript-eslint/no-explicit-any': 'warn',
|
||||
// Add WordPress-specific rules here if needed
|
||||
},
|
||||
env: {
|
||||
browser: true,
|
||||
node: true,
|
||||
es6: true,
|
||||
jest: true,
|
||||
},
|
||||
};
|
127
.github/workflows/release.yml
vendored
Normal file
127
.github/workflows/release.yml
vendored
Normal file
@ -0,0 +1,127 @@
|
||||
name: Release WordPress Plugin
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*.*.*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build and Release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: '7.4'
|
||||
extensions: mbstring, intl, curl
|
||||
tools: composer, wp-cli
|
||||
|
||||
- name: Get the version
|
||||
id: get_version
|
||||
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '18'
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install PHP dependencies
|
||||
run: composer install --no-dev --optimize-autoloader
|
||||
|
||||
- name: Install Node dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Verify version matches
|
||||
run: |
|
||||
WP_VERSION=$(grep -m 1 "Version: " wp-multisite-waas.php | awk -F' ' '{print $2}')
|
||||
README_VERSION=$(grep -m 1 "Stable tag: " readme.txt | awk -F' ' '{print $3}')
|
||||
PKG_VERSION=$(node -p "require('./package.json').version")
|
||||
|
||||
if [ "$WP_VERSION" != "${{ env.VERSION }}" ] || [ "$README_VERSION" != "${{ env.VERSION }}" ] || [ "$PKG_VERSION" != "${{ env.VERSION }}" ]; then
|
||||
echo "Error: Version mismatch detected!"
|
||||
echo "Tag version: ${{ env.VERSION }}"
|
||||
echo "Plugin version: $WP_VERSION"
|
||||
echo "readme.txt version: $README_VERSION"
|
||||
echo "package.json version: $PKG_VERSION"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "All version numbers match: ${{ env.VERSION }}"
|
||||
|
||||
- name: Choose build method
|
||||
id: build_method
|
||||
run: |
|
||||
# Check if we have TypeScript files
|
||||
if ls assets/js/*.ts &> /dev/null; then
|
||||
echo "USE_MODERN_BUILD=true" >> $GITHUB_ENV
|
||||
echo "Using modern build process with TypeScript"
|
||||
else
|
||||
echo "USE_MODERN_BUILD=false" >> $GITHUB_ENV
|
||||
echo "Using compatibility build process"
|
||||
fi
|
||||
|
||||
- name: Modern Build - Generate translation files
|
||||
if: env.USE_MODERN_BUILD == 'true'
|
||||
run: npm run translations
|
||||
|
||||
- name: Modern Build - Process CSS and JS
|
||||
if: env.USE_MODERN_BUILD == 'true'
|
||||
run: |
|
||||
npm run css
|
||||
npm run js
|
||||
|
||||
- name: Modern Build - Create ZIP file
|
||||
if: env.USE_MODERN_BUILD == 'true'
|
||||
run: npm run zip
|
||||
|
||||
- name: Compatibility Build - Run build process
|
||||
if: env.USE_MODERN_BUILD == 'false'
|
||||
run: npm run build:compat
|
||||
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: |
|
||||
build/wp-multisite-waas-${{ env.VERSION }}.zip
|
||||
wp-multisite-waas.zip
|
||||
name: WP Multisite WaaS ${{ env.VERSION }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
body: |
|
||||
# WP Multisite WaaS ${{ env.VERSION }}
|
||||
|
||||
## What's Changed
|
||||
|
||||
For a complete list of changes, please refer to the [changelog](https://github.com/wpallstars/wp-multisite-waas/blob/main/readme.txt).
|
||||
|
||||
## Installation
|
||||
|
||||
1. Download the ZIP file from this release
|
||||
2. Upload and activate the plugin in your WordPress Network installation
|
||||
3. Follow the setup wizard to configure the plugin
|
||||
|
||||
## Notes
|
||||
|
||||
- Compatible with WordPress 5.3+
|
||||
- Requires PHP 7.4.30+
|
||||
- Always backup your site before upgrading
|
||||
|
||||
- name: Send notification on success
|
||||
if: success()
|
||||
uses: rtCamp/action-slack-notify@v2
|
||||
env:
|
||||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
|
||||
SLACK_CHANNEL: releases
|
||||
SLACK_COLOR: good
|
||||
SLACK_MESSAGE: "🚀 WP Multisite WaaS ${{ env.VERSION }} has been released! https://github.com/wpallstars/wp-multisite-waas/releases"
|
||||
SLACK_TITLE: New Release
|
||||
SLACK_USERNAME: GitHub
|
||||
SLACK_ICON_EMOJI: ":github:"
|
45
.stylelintrc.js
Normal file
45
.stylelintrc.js
Normal file
@ -0,0 +1,45 @@
|
||||
module.exports = {
|
||||
extends: [
|
||||
'stylelint-config-standard-scss',
|
||||
],
|
||||
rules: {
|
||||
// WordPress-specific CSS rules
|
||||
'selector-class-pattern': null, // Allow WordPress class naming convention
|
||||
'no-descending-specificity': null,
|
||||
'at-rule-no-unknown': [
|
||||
true,
|
||||
{
|
||||
ignoreAtRules: [
|
||||
'extend',
|
||||
'at-root',
|
||||
'debug',
|
||||
'warn',
|
||||
'error',
|
||||
'if',
|
||||
'else',
|
||||
'for',
|
||||
'each',
|
||||
'while',
|
||||
'mixin',
|
||||
'include',
|
||||
'content',
|
||||
'return',
|
||||
'function',
|
||||
'tailwind',
|
||||
'apply',
|
||||
'responsive',
|
||||
'variants',
|
||||
'screen',
|
||||
],
|
||||
},
|
||||
],
|
||||
// Other customizations
|
||||
'string-quotes': 'single',
|
||||
'declaration-block-trailing-semicolon': 'always',
|
||||
},
|
||||
ignoreFiles: [
|
||||
'dist/**/*.css',
|
||||
'node_modules/**/*',
|
||||
'vendor/**/*',
|
||||
],
|
||||
};
|
53
BUILD-README.md
Normal file
53
BUILD-README.md
Normal file
@ -0,0 +1,53 @@
|
||||
# Build Process Documentation
|
||||
|
||||
This document outlines the different build approaches available in the WP Multisite WaaS plugin and how to use them.
|
||||
|
||||
## Modern Build Process
|
||||
|
||||
The modern build process uses TypeScript, SASS, and modern JavaScript tooling to compile and optimize assets.
|
||||
|
||||
### Commands
|
||||
|
||||
- `npm run build` - Main build command that runs clean, translations, CSS, and JS processing
|
||||
- `npm run css` - Compiles SASS to CSS and minifies it
|
||||
- `npm run js` - Compiles TypeScript to JavaScript and minifies it
|
||||
- `npm run translations` - Generates translation files
|
||||
- `npm run lint` - Runs linting for PHP, JS, and CSS
|
||||
- `npm run test` - Runs Jest tests
|
||||
- `npm run prepare-release` - Runs build, lint, and test for release preparation
|
||||
- `npm run zip` - Creates a ZIP file for distribution
|
||||
|
||||
### When to use
|
||||
|
||||
Use this build process during active development when working with TypeScript files and modern tooling.
|
||||
|
||||
## Compatibility Build Process
|
||||
|
||||
The compatibility build process is simpler and uses more basic tools like uglify-js and cleancss for direct minification without compilation steps.
|
||||
|
||||
### Commands
|
||||
|
||||
- `npm run build:compat` - Main compatibility build command
|
||||
- `npm run build:dev:compat` - Development version of the compatibility build
|
||||
- `npm run uglify` - Minifies JavaScript files
|
||||
- `npm run cleancss:compat` - Minifies CSS files
|
||||
- `npm run makepot` - Generates translation files
|
||||
- `npm run archive` - Creates a ZIP file using composer
|
||||
|
||||
### When to use
|
||||
|
||||
Use this build process when working with the plugin-check branch or when you need a simpler build process without TypeScript compilation.
|
||||
|
||||
## GitHub Actions Workflow
|
||||
|
||||
The GitHub Actions workflow is designed to automatically detect which build process to use based on the presence of TypeScript files. If TypeScript files are detected, it uses the modern build process; otherwise, it falls back to the compatibility build process.
|
||||
|
||||
## Merging branches
|
||||
|
||||
When merging branches that use different build approaches:
|
||||
|
||||
1. Keep both sets of build scripts in package.json
|
||||
2. The GitHub Actions workflow will automatically detect and use the appropriate build process
|
||||
3. For local development, choose the build process that matches your current work
|
||||
|
||||
This dual approach ensures compatibility with both the modern toolchain and the simpler plugin-check approach.
|
243
README.md
Normal file
243
README.md
Normal file
@ -0,0 +1,243 @@
|
||||
# WP Multisite WaaS
|
||||
|
||||
<p align="center">
|
||||
<img src="https://raw.githubusercontent.com/wpallstars/wp-multisite-waas/main/assets/images/logo.png" alt="WP Multisite WaaS Logo" width="300">
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<strong>The Complete Network Solution for transforming your WordPress Multisite into a Website as a Service (WaaS) platform.</strong>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="http://www.gnu.org/licenses/gpl-2.0.html"><img src="https://img.shields.io/badge/License-GPL%20v2-blue.svg" alt="License: GPL v2"></a>
|
||||
<a href="https://wordpress.org/"><img src="https://img.shields.io/badge/WordPress-6.7.1%20Tested-green.svg" alt="WordPress: 6.7.1 Tested"></a>
|
||||
<a href="https://php.net/"><img src="https://img.shields.io/badge/PHP-7.4.30%2B-purple.svg" alt="PHP: 7.4.30+"></a>
|
||||
<a href="https://github.com/superdav42/wp-multisite-waas/releases"><img src="https://img.shields.io/github/v/release/superdav42/wp-multisite-waas" alt="Latest Release"></a>
|
||||
</p>
|
||||
|
||||
## 🌟 Overview
|
||||
|
||||
**WP Multisite WaaS** helps you transform your WordPress Multisite installation into a powerful Website as a Service (WaaS) platform. This plugin enables you to offer website creation, hosting, and management services to your customers through a streamlined interface.
|
||||
|
||||
This plugin was formerly known as WP Ultimo and is now community maintained.
|
||||
|
||||
## ✨ Key Features
|
||||
|
||||
- **Site Creation** - Allow customers to create their own sites in your network
|
||||
- **Domain Mapping** - Support for custom domains with automated DNS verification
|
||||
- **Payment Processing** - Integrations with popular payment gateways like Stripe and PayPal
|
||||
- **Plan Management** - Create and manage subscription plans with different features and limitations
|
||||
- **Template Sites** - Easily clone and use template sites for new customer websites
|
||||
- **Customer Dashboard** - Provide a professional management interface for your customers
|
||||
- **White Labeling** - Brand the platform as your own
|
||||
- **Hosting Integrations** - Connect with popular hosting control panels like cPanel, RunCloud, and more
|
||||
|
||||
## 📋 Requirements
|
||||
|
||||
- WordPress Multisite 5.3 or higher
|
||||
- PHP 7.4.30 or higher
|
||||
- MySQL 5.6 or higher
|
||||
- HTTPS enabled (recommended for secure checkout)
|
||||
|
||||
## 🔧 Installation
|
||||
|
||||
There are two recommended ways to install WP Multisite WaaS:
|
||||
|
||||
### Method 1: Using the pre-packaged release (Recommended)
|
||||
|
||||
1. Download the latest release ZIP from the [Releases page](https://github.com/superdav42/wp-multisite-waas/releases)
|
||||
2. Log in to your WordPress Network Admin dashboard
|
||||
3. Navigate to Plugins > Add New > Upload Plugin
|
||||
4. Choose the downloaded ZIP file and click "Install Now"
|
||||
5. Network Activate the plugin through the 'Plugins' menu in WordPress
|
||||
6. Follow the step-by-step Wizard to set the plugin up
|
||||
|
||||
### Method 2: Using Git and Composer (For developers)
|
||||
|
||||
This method requires command-line access to your server and familiarity with Git and Composer.
|
||||
|
||||
1. Clone the repository to your plugins directory:
|
||||
```bash
|
||||
cd wp-content/plugins/
|
||||
git clone https://github.com/superdav42/wp-multisite-waas.git
|
||||
cd wp-multisite-waas
|
||||
```
|
||||
|
||||
2. Install the required dependencies using Composer:
|
||||
```bash
|
||||
composer install
|
||||
```
|
||||
|
||||
3. Network Activate the plugin in your WordPress Network Admin dashboard
|
||||
4. Follow the setup wizard to complete the installation
|
||||
|
||||
## 🔍 Common Installation Issues
|
||||
|
||||
<details>
|
||||
<summary><strong>"Failed opening required [...]/vendor/autoload_packages.php"</strong></summary>
|
||||
<p>This error occurs when the required vendor files are missing. This typically happens when:</p>
|
||||
<ul>
|
||||
<li>You've downloaded the repository directly from GitHub without using a release package</li>
|
||||
<li>The composer dependencies haven't been installed</li>
|
||||
</ul>
|
||||
<p><strong>Solution:</strong> Use the pre-packaged release from the <a href="https://github.com/superdav42/wp-multisite-waas/releases">Releases page</a> or run <code>composer install</code> in the plugin directory.</p>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>"Cannot declare class ComposerAutoloaderInitWPUltimoDependencies, because the name is already in use"</strong></summary>
|
||||
<p>This error usually occurs when updating from an older version of WP Ultimo or when multiple versions of the plugin are installed.</p>
|
||||
<p><strong>Solution:</strong> Deactivate and remove any older versions of WP Ultimo or WP Multisite WaaS before activating the new version.</p>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>"Class 'WP_Ultimo\Database\Sites\Site_Query' not found"</strong></summary>
|
||||
<p>This error can occur if the plugin's autoloader isn't properly loading all the necessary classes.</p>
|
||||
<p><strong>Solution:</strong> Use the pre-packaged release from the <a href="https://github.com/superdav42/wp-multisite-waas/releases">Releases page</a> which includes all required files.</p>
|
||||
</details>
|
||||
|
||||
## 🚀 Contributing
|
||||
|
||||
We welcome contributions to WP Multisite WaaS! Here's how you can contribute effectively:
|
||||
|
||||
### Development Workflow
|
||||
|
||||
1. Fork the repository
|
||||
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
|
||||
3. Set up the development environment:
|
||||
```bash
|
||||
# Install PHP dependencies
|
||||
composer install
|
||||
|
||||
# Install Node.js dependencies
|
||||
npm install
|
||||
```
|
||||
4. Make your changes
|
||||
5. Use the available npm scripts for development:
|
||||
```bash
|
||||
# Watch for CSS/JS changes during development
|
||||
npm start
|
||||
|
||||
# Generate translation files
|
||||
npm run translations
|
||||
|
||||
# Process CSS (compile SCSS to CSS and minify)
|
||||
npm run css
|
||||
|
||||
# Process JavaScript (compile TypeScript to JS and minify)
|
||||
npm run js
|
||||
|
||||
# Run all linters (PHP, JS, CSS)
|
||||
npm run lint
|
||||
|
||||
# Run tests
|
||||
npm run test
|
||||
```
|
||||
6. Before committing, run the build process to ensure all assets are properly processed:
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
This command:
|
||||
- Generates translation POT files
|
||||
- Compiles and minifies CSS from SCSS
|
||||
- Compiles and minifies JS from TypeScript
|
||||
- Optimizes other assets
|
||||
|
||||
7. **Important:** Update both README.md and readme.txt files when making changes that affect:
|
||||
- Version numbers
|
||||
- Required WordPress/PHP versions
|
||||
- Feature additions or changes
|
||||
- Installation instructions
|
||||
- Documentation
|
||||
- Changelog entries
|
||||
|
||||
8. Commit your changes (`git commit -m 'Add some amazing feature'`)
|
||||
9. Push to the branch (`git push origin feature/amazing-feature`)
|
||||
10. Open a Pull Request
|
||||
|
||||
### Pull Request Guidelines
|
||||
|
||||
When submitting pull requests, please:
|
||||
|
||||
1. Include a clear description of the changes and their purpose
|
||||
2. Reference any related issues using GitHub's issue linking syntax (#123)
|
||||
3. Ensure your code follows the existing style and conventions
|
||||
4. Include screenshots or GIFs for UI changes if applicable
|
||||
5. Make sure all tests pass (if available)
|
||||
6. Update documentation as needed
|
||||
7. Verify that both README.md and readme.txt are updated and synchronized
|
||||
|
||||
### Release Process
|
||||
|
||||
Releases are automated using GitHub Actions workflows that trigger when a version tag is pushed.
|
||||
|
||||
**Tagging Convention:** To trigger a new release build, push a tag following the semantic versioning format:
|
||||
|
||||
```bash
|
||||
git tag v2.3.5 # For example, for version 2.3.5
|
||||
git push origin v2.3.5
|
||||
```
|
||||
|
||||
The tag must begin with "v" followed by the version number (v*.*.*)
|
||||
|
||||
This will automatically:
|
||||
1. Verify all version numbers match across files
|
||||
2. Build the plugin (translations, CSS, JS)
|
||||
3. Create a properly packaged ZIP file
|
||||
4. Create a GitHub release with the ZIP attached
|
||||
|
||||
When preparing for a release:
|
||||
1. Update the version number in:
|
||||
- The main plugin file (wp-multisite-waas.php)
|
||||
- readme.txt (Stable tag)
|
||||
- package.json
|
||||
2. Update the changelog in readme.txt
|
||||
3. Ensure README.md and readme.txt are synchronized with the latest information
|
||||
4. Create and push the appropriate version tag
|
||||
|
||||
## 🆘 Support
|
||||
|
||||
For support, please open an issue on the [GitHub repository](https://github.com/superdav42/wp-multisite-waas/issues).
|
||||
|
||||
## ⚠️ Upgrade Notice
|
||||
|
||||
We recommend running this in a staging environment before updating your production environment.
|
||||
|
||||
## 📝 Recent Changes
|
||||
|
||||
### Version [2.3.4] - Released on 2024-01-31
|
||||
- Fixed: Unable to checkout with any payment gateway
|
||||
- Fixed: Warning Undefined global variable $pagenow
|
||||
|
||||
### Version [2.3.3] - Released on 2024-01-29
|
||||
- Improved: Plugin renamed to WP Multisite WaaS
|
||||
- Removed: Enforcement of paid license
|
||||
- Fixed: Incompatibilities with WordPress 6.7 and i18n timing
|
||||
- Improved: Reduced plugin size by removing many unnecessary files and shrinking images
|
||||
|
||||
For the complete changelog, please see [readme.txt](readme.txt).
|
||||
|
||||
## 👥 Contributors
|
||||
|
||||
WP Multisite WaaS is an open-source project with contributions from:
|
||||
- [aanduque](https://github.com/aanduque)
|
||||
- [superdav42](https://github.com/superdav42)
|
||||
- [And the community](https://github.com/superdav42/wp-multisite-waas/graphs/contributors)
|
||||
|
||||
## 📄 License
|
||||
|
||||
WP Multisite WaaS is licensed under the GPL v2 or later.
|
||||
|
||||
Copyright © 2024 [WP Multisite WaaS Contributors](https://github.com/superdav42/wp-multisite-waas/graphs/contributors)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License, version 2, as
|
||||
published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
43
bin/create-zip.sh
Executable file
43
bin/create-zip.sh
Executable file
@ -0,0 +1,43 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Get the version from the main plugin file
|
||||
VERSION=$(grep -m 1 "Version: " wp-multisite-waas.php | awk -F' ' '{print $2}')
|
||||
PLUGIN_SLUG="wp-multisite-waas"
|
||||
BUILD_DIR="./build"
|
||||
DIST_DIR="$BUILD_DIR/$PLUGIN_SLUG"
|
||||
|
||||
echo "📦 Building $PLUGIN_SLUG version $VERSION..."
|
||||
|
||||
# Ensure a clean build directory
|
||||
rm -rf "$BUILD_DIR"
|
||||
mkdir -p "$DIST_DIR"
|
||||
|
||||
# Copy all necessary files to the distribution directory
|
||||
echo "🔍 Copying files..."
|
||||
rsync -rc --exclude-from='.distignore' --exclude="$BUILD_DIR" ./ "$DIST_DIR/" --delete --delete-excluded
|
||||
|
||||
# Remove development files
|
||||
echo "🧹 Removing development files..."
|
||||
cd "$DIST_DIR" || exit
|
||||
rm -rf .git .github .gitignore .distignore .eslintrc* .stylelintrc* composer.json composer.lock package.json package-lock.json phpunit.xml jest.config.js tsconfig.json webpack.config.js node_modules tests .vscode .idea bin
|
||||
|
||||
# Create the zip file
|
||||
echo "🗜️ Creating zip file..."
|
||||
cd "$BUILD_DIR" || exit
|
||||
ZIP_FILE="$PLUGIN_SLUG-$VERSION.zip"
|
||||
zip -r "$ZIP_FILE" "$PLUGIN_SLUG" -x "*.DS_Store" -x "*.git*" -x "*node_modules*" -x "*vendor*" -x "*.map"
|
||||
|
||||
echo "✅ Build complete: $BUILD_DIR/$ZIP_FILE"
|
||||
echo "📏 ZIP size: $(du -h "$ZIP_FILE" | cut -f1)"
|
||||
|
||||
# Remind about version numbers
|
||||
echo ""
|
||||
echo "🔔 Remember to:"
|
||||
echo " - Verify the zip contains all necessary files"
|
||||
echo " - Ensure version numbers match in:"
|
||||
echo " - wp-multisite-waas.php"
|
||||
echo " - package.json"
|
||||
echo " - readme.txt"
|
||||
echo ""
|
||||
|
||||
exit 0
|
21631
package-lock.json
generated
Normal file
21631
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
74
package.json
Normal file
74
package.json
Normal file
@ -0,0 +1,74 @@
|
||||
{
|
||||
"name": "wp-multisite-waas",
|
||||
"version": "2.3.4",
|
||||
"title": "WP Multisite WaaS",
|
||||
"description": "The Complete Network Solution for transforming your WordPress Multisite into a Website as a Service (WaaS) platform",
|
||||
"homepage": "https://wpmultisitewaas.org/",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"start": "wp-scripts start",
|
||||
"build": "npm run clean && npm run translations && npm run css && npm run js",
|
||||
"clean": "rm -rf dist && mkdir -p dist/css dist/js",
|
||||
"css": "npm run css:compile && npm run css:minify",
|
||||
"css:compile": "sass --style=expanded --source-map --embed-sources --no-error-css assets/css/src/:assets/css/",
|
||||
"css:minify": "cleancss -O1 --format breakWith=lf --source-map --source-map-inline-sources --output assets/css/ --batch --batch-suffix '.min' 'assets/css/*.css' '!assets/css/*.min.css'",
|
||||
"js": "npm run js:compile && npm run js:minify",
|
||||
"js:compile": "tsc -p tsconfig.json",
|
||||
"js:minify": "terser assets/js/*.js --compress --mangle --output dist/js/ --source-map \"root='../assets/js',url='[name].min.js.map'\"",
|
||||
"translations": "wp i18n make-pot ./ lang/wp-multisite-waas.pot --include=\"**/*.php\" --exclude=\"vendor,node_modules,tests\"",
|
||||
"lint:php": "composer run-script phpcs",
|
||||
"lint:js": "eslint assets/js/**/*.js assets/js/**/*.ts",
|
||||
"lint:css": "stylelint assets/css/**/*.scss",
|
||||
"lint": "npm run lint:php && npm run lint:js && npm run lint:css",
|
||||
"test": "jest",
|
||||
"prepare-release": "npm run build && npm run lint && npm run test",
|
||||
"zip": "npm run build && bash ./bin/create-zip.sh",
|
||||
|
||||
"prebuild:compat": "composer install --no-dev",
|
||||
"prebuild:dev:compat": "composer install",
|
||||
"build:compat": "npm run uglify && npm run makepot && npm run cleancss:compat && npm run archive",
|
||||
"build:dev:compat": "npm run uglify && npm run makepot && npm run cleancss:compat",
|
||||
"archive": "composer archive --file=$npm_package_name --format=zip",
|
||||
"postarchive": "rm -rf $npm_package_name && unzip $npm_package_name.zip -d $npm_package_name && rm $npm_package_name.zip && zip -r $npm_package_name.zip $npm_package_name && rm -rf $npm_package_name",
|
||||
"preuglify": "rm -f assets/js/*.min.js",
|
||||
"uglify": "for f in assets/js/*.js; do file=${f%.js}; node_modules/.bin/uglifyjs $f -c -m > $file.min.js; done",
|
||||
"precleancss:compat": "rm -f assets/css/*.min.css",
|
||||
"cleancss:compat": "for f in assets/css/*.css; do file=${f%.css}; node_modules/.bin/cleancss -o $file.min.css $f; done",
|
||||
"makepot": "wp i18n make-pot ./ lang/$npm_package_name.pot --exclude=node_modules,tests,docs,assets/js/lib"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/superdav42/wp-multisite-waas.git"
|
||||
},
|
||||
"keywords": [
|
||||
"wordpress",
|
||||
"multisite",
|
||||
"waas"
|
||||
],
|
||||
"author": "WP Multisite WaaS Contributors",
|
||||
"license": "GPL-2.0-or-later",
|
||||
"bugs": {
|
||||
"url": "https://github.com/superdav42/wp-multisite-waas/issues"
|
||||
},
|
||||
"config": {
|
||||
"translate": true
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^29.5.3",
|
||||
"@types/node": "^20.4.5",
|
||||
"@typescript-eslint/eslint-plugin": "^6.2.0",
|
||||
"@typescript-eslint/parser": "^6.2.0",
|
||||
"@wordpress/env": "^8.8.0",
|
||||
"@wordpress/scripts": "^26.13.0",
|
||||
"clean-css-cli": "^5.6.2",
|
||||
"eslint": "^8.46.0",
|
||||
"jest": "^29.6.2",
|
||||
"sass": "^1.64.1",
|
||||
"stylelint": "^15.10.2",
|
||||
"stylelint-config-standard-scss": "^10.0.0",
|
||||
"terser": "^5.19.2",
|
||||
"ts-jest": "^29.1.1",
|
||||
"typescript": "^5.1.6",
|
||||
"uglify-js": "^3.19.3"
|
||||
}
|
||||
}
|
113
readme.txt
113
readme.txt
@ -1,19 +1,92 @@
|
||||
=== WP Multisite WaaS ===
|
||||
Contributors: aanduque, superdav42
|
||||
Donate link: https://github.com/sponsors/superdav42/
|
||||
Tags: multisite, waas, membership, domain-mapping, recurring payments, subscription
|
||||
Requires at least: 5.3
|
||||
Requires PHP: 7.4.30
|
||||
Tested up to: 6.7.1
|
||||
Requires PHP: 7.4.30
|
||||
Stable tag: 2.3.4
|
||||
License: GPLv2
|
||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
Contributors: aanduque, superdav42
|
||||
|
||||
The Complete Network Solution for transforming your WordPress Multisite into a Website as a Service (WaaS) platform.
|
||||
|
||||
== Description ==
|
||||
|
||||
WP Multisite WaaS helps you transform your WordPress Multisite installation into a powerful Website as a Service (WaaS) platform. This plugin enables you to offer website creation, hosting, and management services to your customers through a streamlined interface.
|
||||
**WP Multisite WaaS** helps you transform your WordPress Multisite installation into a powerful Website as a Service (WaaS) platform. This plugin enables you to offer website creation, hosting, and management services to your customers through a streamlined interface.
|
||||
|
||||
Now community maintained.
|
||||
|
||||
= Key Features =
|
||||
|
||||
* **Site Creation** - Allow customers to create their own sites in your network
|
||||
* **Domain Mapping** - Support for custom domains with automated DNS verification
|
||||
* **Payment Processing** - Integrations with popular payment gateways like Stripe and PayPal
|
||||
* **Plan Management** - Create and manage subscription plans with different features and limitations
|
||||
* **Template Sites** - Easily clone and use template sites for new customer websites
|
||||
* **Customer Dashboard** - Provide a professional management interface for your customers
|
||||
* **White Labeling** - Brand the platform as your own
|
||||
* **Hosting Integrations** - Connect with popular hosting control panels like cPanel, RunCloud, and more
|
||||
|
||||
= Where to find help =
|
||||
|
||||
* [GitHub Repository](https://github.com/superdav42/wp-multisite-waas)
|
||||
* [Issue Tracker](https://github.com/superdav42/wp-multisite-waas/issues)
|
||||
|
||||
= Contributing =
|
||||
|
||||
We welcome contributions to WP Multisite WaaS! To contribute effectively:
|
||||
|
||||
**Development Workflow:**
|
||||
|
||||
1. Fork the repository on GitHub
|
||||
2. Create a feature branch from main
|
||||
3. Set up the development environment:
|
||||
* Install PHP dependencies with `composer install`
|
||||
* Install Node.js dependencies with `npm install`
|
||||
4. Make your changes
|
||||
5. Use the available npm scripts for development:
|
||||
* `npm start` - Watch for CSS/JS changes during development
|
||||
* `npm run translations` - Generate translation files
|
||||
* `npm run css` - Process CSS (compile SCSS to CSS and minify)
|
||||
* `npm run js` - Process JavaScript (compile TypeScript to JS and minify)
|
||||
* `npm run lint` - Run all linters (PHP, JS, CSS)
|
||||
* `npm run test` - Run tests
|
||||
6. Before committing, run `npm run build` to:
|
||||
* Generate translation POT files
|
||||
* Compile and minify CSS from SCSS
|
||||
* Compile and minify JS from TypeScript
|
||||
* Optimize other assets
|
||||
7. **Important:** Update both README.md and readme.txt files when making changes that affect:
|
||||
* Version numbers
|
||||
* Required WordPress/PHP versions
|
||||
* Feature additions or changes
|
||||
* Installation instructions
|
||||
* Documentation
|
||||
* Changelog entries
|
||||
8. Commit your changes and push to your fork
|
||||
9. Open a Pull Request against the main repository
|
||||
|
||||
When submitting a Pull Request, please include a clear description of the changes and their purpose, reference any related issues, and ensure your code follows existing style conventions. Always verify that both README.md and readme.txt are updated and synchronized before submitting your PR.
|
||||
|
||||
**Release Process:**
|
||||
|
||||
Releases are automated using GitHub Actions workflows that trigger when a version tag is pushed.
|
||||
|
||||
To trigger a new release build, push a tag following the semantic versioning format (v*.*.*):
|
||||
`git tag v2.3.5 && git push origin v2.3.5`
|
||||
|
||||
When preparing for a release:
|
||||
1. Update the version number in:
|
||||
* The main plugin file (wp-multisite-waas.php)
|
||||
* readme.txt (Stable tag)
|
||||
* package.json
|
||||
2. Update the changelog in readme.txt
|
||||
3. Ensure README.md and readme.txt are synchronized with the latest information
|
||||
4. Create and push the appropriate version tag
|
||||
|
||||
For more detailed contribution guidelines, see the [GitHub repository](https://github.com/superdav42/wp-multisite-waas).
|
||||
|
||||
== Installation ==
|
||||
|
||||
There are two recommended ways to install WP Multisite WaaS:
|
||||
@ -70,10 +143,36 @@ Solution: Use the pre-packaged release from the [Releases page](https://github.c
|
||||
|
||||
== Requirements ==
|
||||
|
||||
- WordPress Multisite 5.3 or higher
|
||||
- PHP 7.4.30 or higher
|
||||
- MySQL 5.6 or higher
|
||||
- HTTPS enabled (recommended for secure checkout)
|
||||
* WordPress Multisite 5.3 or higher
|
||||
* PHP 7.4.30 or higher
|
||||
* MySQL 5.6 or higher
|
||||
* HTTPS enabled (recommended for secure checkout)
|
||||
|
||||
== Frequently Asked Questions ==
|
||||
|
||||
= Can I use this plugin with a regular WordPress installation? =
|
||||
|
||||
No, this plugin specifically requires WordPress Multisite to function properly. It transforms your Multisite network into a platform for hosting multiple customer websites.
|
||||
|
||||
= Does this plugin support custom domains? =
|
||||
|
||||
Yes, WP Multisite WaaS includes robust domain mapping functionality that allows your customers to use their own domains for their websites within your network.
|
||||
|
||||
= Which payment gateways are supported? =
|
||||
|
||||
The plugin supports multiple payment gateways including Stripe, PayPal, and manually handled payments.
|
||||
|
||||
= Can I migrate from WP Ultimo to this plugin? =
|
||||
|
||||
Yes, WP Multisite WaaS is a community-maintained fork of WP Ultimo. The plugin includes migration tools to help you transition from WP Ultimo.
|
||||
|
||||
== Screenshots ==
|
||||
|
||||
1. Dashboard overview with key metrics
|
||||
2. Subscription plans management
|
||||
3. Customer management interface
|
||||
4. Site creation workflow
|
||||
5. Domain mapping settings
|
||||
|
||||
== Support ==
|
||||
|
||||
|
26
tsconfig.json
Normal file
26
tsconfig.json
Normal file
@ -0,0 +1,26 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es2020",
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"esModuleInterop": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"strict": true,
|
||||
"skipLibCheck": true,
|
||||
"jsx": "preserve",
|
||||
"outDir": "./dist/js",
|
||||
"sourceMap": true,
|
||||
"declaration": false,
|
||||
"allowJs": true,
|
||||
"checkJs": false
|
||||
},
|
||||
"include": [
|
||||
"assets/js/**/*.ts",
|
||||
"assets/js/**/*.js"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"vendor",
|
||||
"dist"
|
||||
]
|
||||
}
|
Reference in New Issue
Block a user