forked from WordPress/performance
-
Notifications
You must be signed in to change notification settings - Fork 0
/
performance.php
29 lines (26 loc) · 1.51 KB
/
performance.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
/**
* Plugin Name: Performance monorepo (not a real plugin)
* Plugin URI: https://github.com/WordPress/performance
* Description: The Performance monorepo is not a plugin rather a collection of performance features as plugins. Download <a href="https://wordpress.org/plugins/performance-lab/">Performance Lab</a> to install performance features instead. Otherwise, if wanting to contribute, please refer to the <a href="https://make.wordpress.org/performance/handbook/performance-lab/">handbook page</a>.
* Author: WordPress Performance Team
* Author URI: https://make.wordpress.org/performance/
* Text Domain: performance-lab
*
* @package performance
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
/**
* Notify the admin that the Performance monorepo is not a plugin, if they tried to install it as one.
*/
function perflab_monorepo_is_not_a_plugin(): void {
// Note: The following notice is not translated because it is never published to WordPress.org and so it will never get translations.
?>
<div class="notice notice-error">
<p>The Performance monorepo is not a plugin rather a collection of performance features as plugins. Download <a href="https://wordpress.org/plugins/performance-lab/">Performance Lab</a> to install performance features instead. Otherwise, if wanting to contribute, please refer to the <a href="https://make.wordpress.org/performance/handbook/performance-lab/">handbook page</a>.</p>
</div>
<?php
}
add_action( 'admin_notices', 'perflab_monorepo_is_not_a_plugin' );