| 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 ); |
| 28 |
|