Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 5 |
|
0.00% |
0 / 1 |
CRAP | n/a |
0 / 0 |
|
| Automattic\Jetpack\Masterbar\masterbar_init_wp_posts_list | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
20 | |||
| 1 | <?php |
| 2 | /** |
| 3 | * WP-Admin Posts list bootstrap file. |
| 4 | * |
| 5 | * @package automattic/jetpack-masterbar |
| 6 | */ |
| 7 | |
| 8 | namespace Automattic\Jetpack\Masterbar; |
| 9 | |
| 10 | if ( ! defined( 'ABSPATH' ) ) { |
| 11 | exit( 0 ); |
| 12 | } |
| 13 | |
| 14 | /** |
| 15 | * Load the Posts_List_Notification. |
| 16 | */ |
| 17 | function masterbar_init_wp_posts_list() { |
| 18 | global $pagenow; |
| 19 | |
| 20 | if ( |
| 21 | ( 'edit.php' === $pagenow && isset( $_GET['post_type'] ) && 'page' === $_GET['post_type'] ) // phpcs:ignore WordPress.Security.NonceVerification.Recommended |
| 22 | ) { |
| 23 | Posts_List_Page_Notification::init(); |
| 24 | } |
| 25 | } |
| 26 | |
| 27 | add_action( 'init', __NAMESPACE__ . '\masterbar_init_wp_posts_list', 1 ); |