diff --git a/README.md b/README.md index e62bae9..36c46a7 100644 --- a/README.md +++ b/README.md @@ -271,7 +271,7 @@ Some MCP Hub tools require companion WordPress plugins: | SEO tools (`wordpress_get_post_seo`, etc.) | [SEO API Bridge](wordpress-plugin/seo-api-bridge/) ([Download ZIP](wordpress-plugin/seo-api-bridge.zip)) + Rank Math or Yoast SEO | | WP-CLI tools (15 tools: `wp_cache_*`, `wp_db_*`, etc.) | Docker socket + `CONTAINER` env var | | WordPress Advanced database/system tools | Docker socket + `CONTAINER` env var | -| OpenPanel analytics integration | [OpenPanel](wordpress-plugin/openpanel/) ([Download ZIP](wordpress-plugin/openpanel.zip)) | +| OpenPanel analytics integration | [OpenPanel Self-Hosted](wordpress-plugin/openpanel-self-hosted/) ([Download ZIP](wordpress-plugin/openpanel-self-hosted.zip)) | | WooCommerce tools | WooCommerce plugin (separate `WOOCOMMERCE_` config) | **Docker socket** is needed for WP-CLI and WordPress Advanced system tools. Add to your docker-compose: diff --git a/wordpress-plugin/openpanel-self-hosted.zip b/wordpress-plugin/openpanel-self-hosted.zip new file mode 100644 index 0000000..4c1e284 Binary files /dev/null and b/wordpress-plugin/openpanel-self-hosted.zip differ diff --git a/wordpress-plugin/openpanel/LICENSE b/wordpress-plugin/openpanel-self-hosted/LICENSE similarity index 100% rename from wordpress-plugin/openpanel/LICENSE rename to wordpress-plugin/openpanel-self-hosted/LICENSE diff --git a/wordpress-plugin/openpanel/index.php b/wordpress-plugin/openpanel-self-hosted/index.php similarity index 100% rename from wordpress-plugin/openpanel/index.php rename to wordpress-plugin/openpanel-self-hosted/index.php diff --git a/wordpress-plugin/openpanel/openpanel.php b/wordpress-plugin/openpanel-self-hosted/openpanel-self-hosted.php similarity index 92% rename from wordpress-plugin/openpanel/openpanel.php rename to wordpress-plugin/openpanel-self-hosted/openpanel-self-hosted.php index e3507b9..99c1414 100644 --- a/wordpress-plugin/openpanel/openpanel.php +++ b/wordpress-plugin/openpanel-self-hosted/openpanel-self-hosted.php @@ -1,16 +1,16 @@ ' . esc_html__('Choose between OpenPanel Cloud or your own Self-Hosted instance.', 'openpanel') . '
'; + add_settings_section('op_hosting', __('Hosting Mode', 'openpanel-self-hosted'), function() { + echo '' . esc_html__('Choose between OpenPanel Cloud or your own Self-Hosted instance.', 'openpanel-self-hosted') . '
'; }, self::OPTION_KEY); - add_settings_field('hosting_mode', __('Mode', 'openpanel'), function() { + add_settings_field('hosting_mode', __('Mode', 'openpanel-self-hosted'), function() { $opts = get_option(self::OPTION_KEY); $mode = isset($opts['hosting_mode']) ? $opts['hosting_mode'] : 'cloud'; ?>' . esc_html__('Configure your Self-Hosted OpenPanel URLs. Only required if using Self-Hosted mode.', 'openpanel-self-hosted') . '
'; }, self::OPTION_KEY); - add_settings_field('api_url', __('API URL', 'openpanel'), function() { + add_settings_field('api_url', __('API URL', 'openpanel-self-hosted'), function() { $opts = get_option(self::OPTION_KEY); printf('', esc_attr(self::OPTION_KEY), isset($opts['api_url']) ? esc_attr($opts['api_url']) : '' ); - echo '' . esc_html__('Your OpenPanel API endpoint (e.g., https://api.openpanel.yourdomain.com)', 'openpanel') . '
'; + echo '' . esc_html__('Your OpenPanel API endpoint (e.g., https://api.openpanel.yourdomain.com)', 'openpanel-self-hosted') . '
'; }, self::OPTION_KEY, 'op_selfhosted'); - add_settings_field('dashboard_url', __('Dashboard URL', 'openpanel'), function() { + add_settings_field('dashboard_url', __('Dashboard URL', 'openpanel-self-hosted'), function() { $opts = get_option(self::OPTION_KEY); printf('', esc_attr(self::OPTION_KEY), isset($opts['dashboard_url']) ? esc_attr($opts['dashboard_url']) : '' ); - echo '' . esc_html__('Your OpenPanel Dashboard URL — used to load op1.js from your server instead of the CDN (e.g., https://openpanel.yourdomain.com)', 'openpanel') . '
'; + echo '' . esc_html__('Your OpenPanel Dashboard URL — used to load op1.js from your server instead of the CDN (e.g., https://openpanel.yourdomain.com)', 'openpanel-self-hosted') . '
'; }, self::OPTION_KEY, 'op_selfhosted'); // Section: Main Settings - add_settings_section('op_main', __('OpenPanel Settings', 'openpanel'), function() { - echo '' . esc_html__('Set your OpenPanel Client ID. The SDK and requests are served from your domain to avoid ad blockers.', 'openpanel') . '
'; + add_settings_section('op_main', __('OpenPanel Settings', 'openpanel-self-hosted'), function() { + echo '' . esc_html__('Set your OpenPanel Client ID. The SDK and requests are served from your domain to avoid ad blockers.', 'openpanel-self-hosted') . '
'; }, self::OPTION_KEY); - add_settings_field('client_id', __('Client ID', 'openpanel'), function() { + add_settings_field('client_id', __('Client ID', 'openpanel-self-hosted'), function() { $opts = get_option(self::OPTION_KEY); printf('', esc_attr(self::OPTION_KEY), @@ -110,14 +110,14 @@ final class OP_WP_Proxy { ); }, self::OPTION_KEY, 'op_main'); - add_settings_field('toggles', __('Auto-tracking (optional)', 'openpanel'), function() { + add_settings_field('toggles', __('Auto-tracking (optional)', 'openpanel-self-hosted'), function() { $o = get_option(self::OPTION_KEY); // Default track_screen to true if not set $track_screen = isset($o['track_screen']) ? !empty($o['track_screen']) : true; ?> -' . - esc_html__('OpenPanel cache cleared successfully. The latest op1.js will be fetched on the next page load.', 'openpanel') . + esc_html__('OpenPanel cache cleared successfully. The latest op1.js will be fetched on the next page load.', 'openpanel-self-hosted') . '
'; }); } @@ -155,18 +155,18 @@ final class OP_WP_Proxy {' . /* translators: %s: human readable time difference */ - sprintf(esc_html__('Cache expires in %s', 'openpanel'), esc_html(human_time_diff(time(), $cached_time))) . + sprintf(esc_html__('Cache expires in %s', 'openpanel-self-hosted'), esc_html(human_time_diff(time(), $cached_time))) . '
'; } else { echo '' . - esc_html__('Cache has expired and will refresh on next page load.', 'openpanel') . + esc_html__('Cache has expired and will refresh on next page load.', 'openpanel-self-hosted') . '
'; } } else { echo '' . - esc_html__('No cached version found. op1.js will be fetched on next page load.', 'openpanel') . + esc_html__('No cached version found. op1.js will be fetched on next page load.', 'openpanel-self-hosted') . '
'; } ?>- +
| + | ||
| + | get_api_base()); ?> |
|
| + | get_js_url()); ?> |
|
| + | |