atarim-visual-collaboration
Last commit date
admin
1 day ago
assets
1 day ago
doit
1 day ago
images
1 day ago
includes
1 day ago
third-party
1 day ago
vendor
1 day ago
atarim-visual-collaboration.php
1 day ago
readme.txt
1 day ago
uninstall.php
1 day ago
atarim-visual-collaboration.php
63 lines
| 1 | <?php |
| 2 | /* |
| 3 | * Plugin Name: Atarim - AI Agency for WordPress: Edit Pages, Fix Code, Update Plugins, SEO & Client Feedback |
| 4 | * Description: Give your AI full access to WordPress. It edits pages, fixes code, updates plugins and runs SEO work, with a backup and your approval first. |
| 5 | * Version: 5.1.3 |
| 6 | * Requires at least: 6.0 |
| 7 | * Requires PHP: 7.4 |
| 8 | * Author: Atarim |
| 9 | * Author URI: https://atarim.io/ |
| 10 | * License: GPLv2 or later |
| 11 | * Text Domain: atarim-visual-collaboration |
| 12 | * Domain Path: /languages |
| 13 | */ |
| 14 | |
| 15 | if (!defined('ABSPATH')) { |
| 16 | exit; // Exit if accessed directly |
| 17 | } |
| 18 | |
| 19 | define('AVCF_PLUGIN_NAME', trim(dirname(plugin_basename(__FILE__)), '/')); |
| 20 | define('AVCF_PLUGIN_DIR', plugin_dir_path(__FILE__)); |
| 21 | define('AVCF_PLUGIN_URL', plugin_dir_url(__FILE__)); |
| 22 | define('AVCF_PLUGIN_BASE', plugin_basename(__FILE__)); |
| 23 | |
| 24 | // Load Jetpack autoloader for MCP Adapter and dependencies |
| 25 | $avcf_autoloader = AVCF_PLUGIN_DIR . 'vendor/autoload_packages.php'; |
| 26 | if ( file_exists( $avcf_autoloader ) ) { |
| 27 | require_once $avcf_autoloader; |
| 28 | } |
| 29 | |
| 30 | require_once(plugin_dir_path(__FILE__) . 'includes/class-define-constant.php'); |
| 31 | require_once(plugin_dir_path(__FILE__) . 'includes/class-functions.php'); |
| 32 | require_once(plugin_dir_path(__FILE__) . 'includes/class-ajax-functions.php'); |
| 33 | require_once(plugin_dir_path(__FILE__) . 'includes/do-it.php'); |
| 34 | |
| 35 | if(is_admin()) { |
| 36 | require_once(AVCF_PLUGIN_DIR . 'admin/class-avcf-settings.php'); |
| 37 | require_once(AVCF_PLUGIN_DIR . 'admin/class-avcf-offboarding.php'); |
| 38 | require_once(AVCF_PLUGIN_DIR . 'admin/class-user-meta.php'); |
| 39 | require_once(AVCF_PLUGIN_DIR . 'admin/class-avcf-upgrade-notice.php'); |
| 40 | new AVCF_Upgrade_Notice(); |
| 41 | } |
| 42 | |
| 43 | // Load text domain for translations |
| 44 | function avcf_load_textdomain() { |
| 45 | load_plugin_textdomain(AVCF_PLUGIN_NAME, false, dirname(AVCF_PLUGIN_BASE) . '/languages'); |
| 46 | } |
| 47 | add_action('plugins_loaded', 'avcf_load_textdomain'); |
| 48 | |
| 49 | require_once(plugin_dir_path(__FILE__) . 'includes/inject-script.php'); |
| 50 | require_once( AVCF_PLUGIN_DIR . 'doit/class-avcf-mcp-auth.php' ); |
| 51 | |
| 52 | // Diagnostic endpoint — loads unconditionally so the Atarim backend can |
| 53 | // query site health even when MCP itself is unavailable. This is the |
| 54 | // whole point: when MCP doesn't work, this is how the dashboard tells |
| 55 | // the user why. |
| 56 | require_once( AVCF_PLUGIN_DIR . 'doit/class-avcf-diagnostic.php' ); |
| 57 | new AVCF_Diagnostic(); |
| 58 | |
| 59 | // Load every third-party / cluster class and bootstrap the MCP layer. |
| 60 | // All cluster require_once lines live in the loader, so this file stays stable |
| 61 | // as clusters are added or removed. |
| 62 | require_once( AVCF_PLUGIN_DIR . 'doit/avcf-cluster-loader.php' ); |
| 63 |