. */ use Automattic\Jetpack\Image_CDN\Image_CDN_Core; if ( ! defined( 'ABSPATH' ) ) { exit( 0 ); } if ( ! defined( 'JETPACK__VERSION' ) ) { // This breaks the project version checks when a one-liner. define( 'JETPACK__VERSION', '15.8' ); } defined( 'JETPACK__MINIMUM_WP_VERSION' ) || define( 'JETPACK__MINIMUM_WP_VERSION', '6.8' ); defined( 'JETPACK__MINIMUM_PHP_VERSION' ) || define( 'JETPACK__MINIMUM_PHP_VERSION', '7.2' ); /** * Constant used to fetch the connection owner token * * @deprecated 9.0.0 * @var boolean */ defined( 'JETPACK_MASTER_USER' ) || define( 'JETPACK_MASTER_USER', true ); defined( 'JETPACK__API_VERSION' ) || define( 'JETPACK__API_VERSION', 1 ); defined( 'JETPACK__PLUGIN_DIR' ) || define( 'JETPACK__PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); defined( 'JETPACK__PLUGIN_FILE' ) || define( 'JETPACK__PLUGIN_FILE', __FILE__ ); defined( 'JETPACK__RELEASE_POST_BLOG_SLUG' ) || define( 'JETPACK__RELEASE_POST_BLOG_SLUG', 'jetpackreleaseblog.wordpress.com' ); defined( 'JETPACK_CLIENT__AUTH_LOCATION' ) || define( 'JETPACK_CLIENT__AUTH_LOCATION', 'header' ); /** * WP.com API no longer supports `http://` protocol. * This means Jetpack can't function properly on servers that can't send outbound HTTPS requests. * The constant is no longer used. * * @deprecated 9.1.0 */ defined( 'JETPACK_CLIENT__HTTPS' ) || define( 'JETPACK_CLIENT__HTTPS', 'AUTO' ); defined( 'JETPACK__GLOTPRESS_LOCALES_PATH' ) || define( 'JETPACK__GLOTPRESS_LOCALES_PATH', JETPACK__PLUGIN_DIR . 'jetpack_vendor/automattic/jetpack-compat/lib/locales.php' ); defined( 'JETPACK__API_BASE' ) || define( 'JETPACK__API_BASE', 'https://jetpack.wordpress.com/jetpack.' ); defined( 'JETPACK_PROTECT__API_HOST' ) || define( 'JETPACK_PROTECT__API_HOST', 'https://api.bruteprotect.com/' ); defined( 'JETPACK__WPCOM_JSON_API_BASE' ) || define( 'JETPACK__WPCOM_JSON_API_BASE', 'https://public-api.wordpress.com' ); /** * WP.com API no longer supports `http://` protocol. * Use `JETPACK__WPCOM_JSON_API_BASE` instead, which has the protocol hardcoded. * * @deprecated 9.1.0 */ defined( 'JETPACK__WPCOM_JSON_API_HOST' ) || define( 'JETPACK__WPCOM_JSON_API_HOST', 'public-api.wordpress.com' ); defined( 'JETPACK__SANDBOX_DOMAIN' ) || define( 'JETPACK__SANDBOX_DOMAIN', '' ); defined( 'JETPACK__DEBUGGER_PUBLIC_KEY' ) || define( 'JETPACK__DEBUGGER_PUBLIC_KEY', "\r\n" . '-----BEGIN PUBLIC KEY-----' . "\r\n" . 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAm+uLLVoxGCY71LS6KFc6' . "\r\n" . '1UnF6QGBAsi5XF8ty9kR3/voqfOkpW+gRerM2Kyjy6DPCOmzhZj7BFGtxSV2ZoMX' . "\r\n" . '9ZwWxzXhl/Q/6k8jg8BoY1QL6L2K76icXJu80b+RDIqvOfJruaAeBg1Q9NyeYqLY' . "\r\n" . 'lEVzN2vIwcFYl+MrP/g6Bc2co7Jcbli+tpNIxg4Z+Hnhbs7OJ3STQLmEryLpAxQO' . "\r\n" . 'q8cbhQkMx+FyQhxzSwtXYI/ClCUmTnzcKk7SgGvEjoKGAmngILiVuEJ4bm7Q1yok' . "\r\n" . 'xl9+wcfW6JAituNhml9dlHCWnn9D3+j8pxStHihKy2gVMwiFRjLEeD8K/7JVGkb/' . "\r\n" . 'EwIDAQAB' . "\r\n" . '-----END PUBLIC KEY-----' . "\r\n" ); /* * These constants can be set in wp-config.php to ensure sites behind proxies will still work. * Setting these constants, though, is *not* the preferred method. It's better to configure * the proxy to send the X-Forwarded-Port header. */ defined( 'JETPACK_SIGNATURE__HTTP_PORT' ) || define( 'JETPACK_SIGNATURE__HTTP_PORT', 80 ); defined( 'JETPACK_SIGNATURE__HTTPS_PORT' ) || define( 'JETPACK_SIGNATURE__HTTPS_PORT', 443 ); /** * Check if the version of WordPress in use on the site is supported by Jetpack. */ if ( version_compare( $GLOBALS['wp_version'], JETPACK__MINIMUM_WP_VERSION, '<' ) ) { if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) { error_log( // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log sprintf( /* translators: Placeholders are numbers, versions of WordPress in use on the site, and required by WordPress. */ esc_html__( 'Your version of WordPress (%1$s) is lower than the version required by Jetpack (%2$s). Please update WordPress to continue enjoying Jetpack.', 'jetpack' ), $GLOBALS['wp_version'], JETPACK__MINIMUM_WP_VERSION ) ); } /** * Outputs for an admin notice about running Jetpack on outdated WordPress. * * @since 7.2.0 */ function jetpack_admin_unsupported_wp_notice() { ?>
jetpack build plugins/jetpack --deps', 'jetpack' ),
array(
'a' => array(
'href' => array(),
'rel' => array(),
'target' => array(),
),
'code' => array(),
)
),
'https://github.com/Automattic/jetpack/blob/trunk/docs/development-environment.md#building-your-project'
);
wp_admin_notice(
$message,
array(
'type' => 'error',
'dismissible' => true,
)
);
}
add_action( 'admin_notices', 'jetpack_admin_missing_files' );
return;
}
register_activation_hook( __FILE__, array( 'Jetpack', 'plugin_activation' ) );
register_deactivation_hook( __FILE__, array( 'Jetpack', 'plugin_deactivation' ) );
// Load image cdn core. This should load regardless of whether the photon module is active.
Image_CDN_Core::setup();
// Require everything else, that is not loaded via the autoloader.
require_once JETPACK__PLUGIN_DIR . 'load-jetpack.php';