| 1 |
<?php |
| 2 |
/** |
| 3 |
* Plugin Name: Pixelgrade Assistant |
| 4 |
* Plugin URI: https://github.com/pixelgrade/pixelgrade-assistant |
| 5 |
* Description: We care about giving you the best experience with your free Pixelgrade theme. |
| 6 |
* Version: 2.2.0 |
| 7 |
* Requires at least: 5.9 |
| 8 |
* Requires PHP: 7.4 |
| 9 |
* Author: Pixelgrade |
| 10 |
* Author URI: https://pixelgrade.com |
| 11 |
* License: GPL-3.0 |
| 12 |
* License URI: https://www.gnu.org/licenses/gpl-3.0.en.html |
| 13 |
* Text Domain: pixelgrade_assistant |
| 14 |
* Domain Path: /languages/ |
| 15 |
*/ |
| 16 |
|
| 17 |
// If this file is called directly, abort. |
| 18 |
if ( ! defined( 'ABSPATH' ) ) { |
| 19 |
die; |
| 20 |
} |
| 21 |
|
| 22 |
define( 'PIXELGRADE_ASSISTANT__PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); |
| 23 |
define( 'PIXELGRADE_ASSISTANT__PLUGIN_FILE', __FILE__ ); |
| 24 |
|
| 25 |
// Define our constants or make sure they have a value |
| 26 |
defined( 'PIXELGRADE_ASSISTANT__API_BASE' ) || define( 'PIXELGRADE_ASSISTANT__API_BASE', 'https://pixelgrade.com/' ); |
| 27 |
defined( 'PIXELGRADE_ASSISTANT__API_BASE_DOMAIN' ) || define( 'PIXELGRADE_ASSISTANT__API_BASE_DOMAIN', 'pixelgrade.com' ); |
| 28 |
defined( 'PIXELGRADE_ASSISTANT__SHOP_BASE' ) || define( 'PIXELGRADE_ASSISTANT__SHOP_BASE', 'https://pixelgrade.com/' ); |
| 29 |
defined( 'PIXELGRADE_ASSISTANT__SHOP_BASE_DOMAIN' ) || define( 'PIXELGRADE_ASSISTANT__SHOP_BASE_DOMAIN', 'pixelgrade.com' ); |
| 30 |
defined( 'PIXELGRADE_ASSISTANT__DEV_MODE' ) || define( 'PIXELGRADE_ASSISTANT__DEV_MODE', false ); |
| 31 |
|
| 32 |
// Fail-safe guard for commercial behavior. Default false: the WordPress.org build is free. |
| 33 |
// Commercial features belong in the separate Pixelgrade Plus plugin, not behind this flag. |
| 34 |
defined( 'PIXELGRADE_ASSISTANT__IS_COMMERCIAL' ) || define( 'PIXELGRADE_ASSISTANT__IS_COMMERCIAL', false ); |
| 35 |
|
| 36 |
require_once plugin_dir_path( __FILE__ ) . 'vendor/autoload.php'; |
| 37 |
|
| 38 |
// Capability helpers: free vs commercial, and Pixelgrade Plus / Care detection. |
| 39 |
require_once plugin_dir_path( __FILE__ ) . 'includes/capabilities.php'; |
| 40 |
|
| 41 |
// Classic Editor is opt-in for themes that explicitly require it. |
| 42 |
require_once plugin_dir_path( __FILE__ ) . 'includes/classic-editor.php'; |
| 43 |
|
| 44 |
// Asset helpers for enqueuing @wordpress/scripts build artifacts (admin/build/*.asset.php). |
| 45 |
require_once plugin_dir_path( __FILE__ ) . 'includes/assets.php'; |
| 46 |
|
| 47 |
// Host extension surface for companion plugins (hub tab registry + host-account read accessors). |
| 48 |
require_once plugin_dir_path( __FILE__ ) . 'includes/host-extension-surface.php'; |
| 49 |
|
| 50 |
// Host-owned pixelgrade.com account connection + Account hub tab. |
| 51 |
require_once plugin_dir_path( __FILE__ ) . 'includes/account.php'; |
| 52 |
|
| 53 |
// Appearance -> Pixelgrade hub: server-side bootstrap data for the React shell. |
| 54 |
require_once plugin_dir_path( __FILE__ ) . 'includes/admin-hub.php'; |
| 55 |
|
| 56 |
// Free Styles tab: in-hub style control center + editor/customizer destinations. |
| 57 |
require_once plugin_dir_path( __FILE__ ) . 'includes/admin-styles.php'; |
| 58 |
|
| 59 |
// Free Overview tab: registers itself on the hub registry + builds its bootstrap payload. |
| 60 |
require_once plugin_dir_path( __FILE__ ) . 'includes/admin-overview.php'; |
| 61 |
|
| 62 |
// Free Plugins tab: recommended plugin management inside the hub. |
| 63 |
require_once plugin_dir_path( __FILE__ ) . 'includes/admin-plugins.php'; |
| 64 |
|
| 65 |
// Free Starter Sites tab: existing free demos plus Plus-injected premium starters. |
| 66 |
require_once plugin_dir_path( __FILE__ ) . 'includes/admin-starter-sites.php'; |
| 67 |
|
| 68 |
// Free Recipes tab: source-as-recipe bundles over granular starter layouts. |
| 69 |
require_once plugin_dir_path( __FILE__ ) . 'includes/admin-recipes.php'; |
| 70 |
|
| 71 |
// Free Layouts tab: granular single-unit layout import. |
| 72 |
require_once plugin_dir_path( __FILE__ ) . 'includes/admin-layout-units.php'; |
| 73 |
|
| 74 |
// Free Page Patterns tab: granular single-unit content import. |
| 75 |
require_once plugin_dir_path( __FILE__ ) . 'includes/admin-content-patterns.php'; |
| 76 |
|
| 77 |
// Secondary System Status tab: diagnostics data and controls. |
| 78 |
require_once plugin_dir_path( __FILE__ ) . 'includes/admin-system-status.php'; |
| 79 |
|
| 80 |
// Secondary Tools tab: reset/maintenance utilities. |
| 81 |
require_once plugin_dir_path( __FILE__ ) . 'includes/admin-tools.php'; |
| 82 |
|
| 83 |
// Contextual editor docs panel: bootstrap data + safe server-side docs actions. |
| 84 |
require_once plugin_dir_path( __FILE__ ) . 'includes/admin-docs.php'; |
| 85 |
|
| 86 |
// Free Help tab: registers itself on the hub registry and reuses the docs KB source. |
| 87 |
require_once plugin_dir_path( __FILE__ ) . 'includes/admin-help.php'; |
| 88 |
|
| 89 |
// Include functions that might assist when in dev mode. |
| 90 |
require_once plugin_dir_path( __FILE__ ) . 'includes/integrations/devmode.php'; |
| 91 |
|
| 92 |
/** |
| 93 |
* Returns the main instance of PixelgradeAssistant to prevent the need to use globals. |
| 94 |
* |
| 95 |
* @return PixelgradeAssistant The PixelgradeAssistant instance |
| 96 |
*/ |
| 97 |
function PixelgradeAssistant() { |
| 98 |
/** |
| 99 |
* The core plugin class that is used to define internationalization, |
| 100 |
* admin-specific hooks, and public-facing site hooks. |
| 101 |
*/ |
| 102 |
require_once plugin_dir_path( __FILE__ ) . 'includes/class-pixelgrade_assistant.php'; |
| 103 |
|
| 104 |
$instance = PixelgradeAssistant::instance( __FILE__, '2.2.0' ); |
| 105 |
|
| 106 |
return $instance; |
| 107 |
} |
| 108 |
|
| 109 |
/** |
| 110 |
* Begins execution of the plugin. |
| 111 |
* |
| 112 |
* Since everything within the plugin is registered via hooks, |
| 113 |
* then kicking off the plugin from this point in the file does |
| 114 |
* not affect the page life cycle. |
| 115 |
*/ |
| 116 |
PixelgradeAssistant(); |
| 117 |
|