Edit or after picking a template on New Form. * Menu::enqueue_assets() loads the JS/CSS bundle only when this page is open. */ class Builder_Page { public function __construct() { add_action( 'admin_menu', [ $this, 'register' ] ); } public function register() { add_submenu_page( null, __( 'Edit Form', 'chargeforms' ), __( 'Edit Form', 'chargeforms' ), 'chargeforms_manage_forms', 'chargeforms-builder', [ $this, 'render' ] ); // A hidden page (parent_slug null) never lands in $submenu, which is // what WP core's title lookup walks — leaving $GLOBALS['title'] null // and tripping a strip_tags(null) deprecation in admin-header.php. // wp-admin/admin.php only computes a title when one isn't already // set, so setting it ourselves here (admin_menu has fully fired, // this runs before that lookup) short-circuits the broken path. if ( isset( $_GET['page'] ) && 'chargeforms-builder' === $_GET['page'] ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended $GLOBALS['title'] = __( 'Edit Form', 'chargeforms' ); } } public function render() { ?>