array(
'plugin' => 'Jetpack',
),
);
return $slugs;
}
);
/**
* Outputs an admin notice for folks running Jetpack without having run composer install.
*
* @since 7.4.0
*/
function jetpack_admin_missing_files() {
if ( get_current_screen()->id !== 'plugins' ) {
return;
}
$message = sprintf(
wp_kses(
/* translators: Placeholder is a link to a support document. */
__( 'Your installation of Jetpack is incomplete. If you installed Jetpack from GitHub, please refer to this document to set up your development environment. Jetpack must have Composer dependencies installed and built via the build command: 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';