Completed
Push — feature/reorg ( 3fa0b7...92e509 )
by
unknown
200:28 queued 189:34
created

jetpack.php ➔ jetpack_monorepo_is_not_a_plugin()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 14

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 14
rs 9.7998
c 0
b 0
f 0
1
<?php
2
/**
3
 * Plugin Name: Jetpack Monorepo (not a real plugin)
4
 * Plugin URI: https://github.com/Automattic/jetpack#jetpack-monorepo
5
 * Description: The Jetpack Monorepo is not a plugin. Don't try to use it as one. See the Jetpack Monorepo documentation for instructions on correctly installing Jetpack.
6
 * Author: Automattic
7
 * License: GPL2+
8
 * Text Domain: jetpack
9
 *
10
 * @package Jetpack
11
 */
12
13
/**
14
 * Notify the admin that the Jetpack Monorepo is not a plugin,
15
 * if they tried to install it as one.
16
 */
17
function jetpack_monorepo_is_not_a_plugin() {
18
	echo '<div class="notice notice-error"><p>';
19
	printf(
20
		wp_kses(
21
			/* translators: Link to Jetpack installation instructions. */
22
			__( 'The Jetpack Monorepo is not a plugin, and should not be installed as one. See <a href="%s">the Jetpack Monorepo documentation</a> for instructions on correctly installing Jetpack.', 'jetpack' ),
23
			array(
24
				'a' => array( 'href' => array() ),
25
			)
26
		),
27
		esc_url( 'https://github.com/Automattic/jetpack#jetpack-monorepo' )
28
	);
29
	echo "</p></div>\n";
30
}
31
32
add_action( 'admin_notices', 'jetpack_monorepo_is_not_a_plugin' );
33