: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
* Class for Admin Subscribers
* @copyright Copyright (c) 2023, Code Atlantic LLC
if ( ! defined( 'ABSPATH' ) ) {
* Class PUM_Admin_Subscribers
class PUM_Admin_Subscribers {
public static function init() {
add_action( 'admin_menu', [ __CLASS__, 'after_page_registration' ], 11 );
add_filter( 'set-screen-option', [ __CLASS__, 'set_option' ], 10, 3 );
* Render settings page with tabs.
public static function page() {
self::list_table()->prepare_items(); ?>
<h1><?php _e( 'Subscribers', 'popup-maker' ); ?></h1>
<div id="pum-subscribers">
<div id="pum-subscribers-post-body">
<form id="pum-subscribers-list-form" method="get">
<input type="hidden" name="page" value="<?php echo esc_attr( $_REQUEST['page'] ); ?>"/>
<input type="hidden" name="post_type" value="<?php echo esc_attr( $_REQUEST['post_type'] ); ?>"/>
self::list_table()->search_box( __( 'Find', 'popup-maker' ), 'pum-subscriber-find' );
self::list_table()->display();
* @return PUM_Admin_Subscribers_Table
public static function list_table() {
if ( ! isset( $list_table ) ) {
$list_table = new PUM_Admin_Subscribers_Table();
public static function after_page_registration() {
add_action( 'load-' . PUM_Admin_Pages::$pages['subscribers'], [ 'PUM_Admin_Subscribers', 'load_user_list_table_screen_options' ] );
public static function load_user_list_table_screen_options() {
'label' => __( 'Subscribers Per Page', 'popup-maker' ),
'option' => 'pum_subscribers_per_page',
* Instantiate the User List Table. Creating an instance here will allow the core WP_List_Table class to automatically
* load the table columns in the screen options panel
* Force WP to save the option.
public static function set_option( $status, $option, $value ) {
if ( 'pum_subscribers_per_page' === $option ) {