Skip to content

EVCV/20i-Wordpress-Pro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

20i WordPress Pro

Professional WordPress plugin for managing 20i hosting services, domains, and more directly from your WordPress dashboard.

Requirements

  • WordPress 6.4+
  • PHP 7.4+
  • MySQL 5.7+ or MariaDB 10.4+
  • Sodium extension enabled
  • Action Scheduler available for asynchronous provisioning flows
  • Outbound HTTPS access to https://api.20i.com/
  • Standard WordPress single-site deployment on the public main domain (home_url()). WordPress multisite/network mode is not currently supported.

See docs/environment-matrix.md for the supported environment matrix and docs/scaling-targets.md for the current workload/rate-limit targets. See docs/workspace-model.md for the supported single-site workspace model.

Deployment Model

The current consolidated runtime supports one WordPress site acting as one 20i operational workspace.

  • The plugin's canonical workspace identity is the public main domain from home_url().
  • The plugin can still manage many remote 20i domains and services, but they are all managed from that one local WordPress site workspace.
  • WordPress multisite/network deployments are intentionally outside the current supported runtime model.

Features

  • API Integration: Connect to 20i's StackCP API for seamless service management
  • Settings Management: Secure API key and secret configuration
  • Connection Testing: Built-in connection testing to verify API credentials
  • Error Handling: Comprehensive error handling and user feedback
  • Security: Nonce-based AJAX security and input sanitization
  • Internationalization: Ready for translation with proper text domain

Installation

  1. Download the plugin files
  2. Upload the 20i-wordpress-pro folder to the /wp-content/plugins/ directory
  3. Activate the plugin through the 'Plugins' menu in WordPress
  4. Go to Settings > 20i WordPress Pro to configure your API credentials

Configuration

API Credentials

To use this plugin, you need valid 20i API credentials:

  1. Log in to your 20i StackCP account
  2. Navigate to API settings
  3. Generate a new API key and secret
  4. Enter these credentials in the plugin settings page

Connection Testing

The plugin includes a connection test feature that verifies your API credentials are working correctly before saving them.

Usage

Once configured, the plugin provides:

  • Secure API communication with 20i services
  • Foundation for managing hosting packages, domains, and servers
  • Extensible architecture for adding new features

Security

This plugin implements several security measures:

  • Input Sanitization: All user inputs are properly sanitized
  • Nonce Verification: AJAX requests use WordPress nonces for security
  • Capability Checks: Only users with manage_options can access settings
  • Secure Storage: API credentials are stored securely in WordPress options

Development

File Structure

20i-wordpress-pro/
├── 20i-wordpress-pro.php              # Main plugin file
├── README.md                          # This file
├── uninstall.php                      # Plugin uninstaller
├── includes/                          # Core plugin classes
│   ├── class-twentyi-wordpress-pro.php
│   ├── class-twentyi-wordpress-pro-loader.php
│   ├── class-twentyi-wordpress-pro-i18n.php
│   ├── class-twentyi-wordpress-pro-api.php
│   └── class-twentyi-wordpress-pro-settings.php
├── admin/                             # Admin-specific functionality
│   ├── class-twentyi-wordpress-pro-admin.php
│   ├── css/
│   │   └── twentyi-wordpress-pro-admin.css
│   ├── js/
│   │   └── twentyi-wordpress-pro-admin.js
│   └── partials/
│       └── twentyi-wordpress-pro-admin-display.php
└── public/                            # Public-facing functionality
    ├── class-twentyi-wordpress-pro-public.php
    ├── css/
    │   └── twentyi-wordpress-pro-public.css
    └── js/
        └── twentyi-wordpress-pro-public.js

Extending the Plugin

The plugin is designed to be easily extensible:

  1. Add New API Endpoints: Extend the API class with new methods
  2. Add Admin Features: Create new admin pages or modify existing ones
  3. Add Public Features: Create shortcodes or widgets in the public area
  4. Add Settings: Extend the settings class with new configuration options

API Methods

The plugin currently supports these API operations:

  • get_account_info() - Get account information
  • get_domains() - Get list of domains
  • get_packages() - Get list of hosting packages
  • get_servers() - Get list of servers
  • test_connection() - Test API connection

Error Handling

The plugin provides comprehensive error handling:

  • Network errors (timeouts, connection failures)
  • Authentication errors (invalid credentials)
  • API errors (invalid requests, server errors)
  • User permission errors

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

License

This plugin is licensed under the GPL-2.0+ License - see the LICENSE file for details.

Support

For support and questions:

  • Check the 20i documentation
  • Review the plugin code and comments
  • Contact 20i support for API-related issues

Changelog

1.0.0

  • Initial release
  • Basic API integration
  • Settings management
  • Connection testing
  • Security implementation

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages