$lines Details, one per list item. * @param string $level error or warning. */ public function __construct( private readonly string $headline, private readonly array $lines, private readonly string $level = 'warning' ) { } /** * Hook the notice into the site and network admin. */ public function register(): void { add_action( 'admin_notices', array( $this, 'render' ) ); add_action( 'network_admin_notices', array( $this, 'render' ) ); } /** * Print the notice. */ public function render(): void { if ( ! current_user_can( 'activate_plugins' ) || ! NoticeScreens::relevant() ) { return; } echo '

' . esc_html( $this->headline ) . '

'; if ( array() !== $this->lines ) { echo ''; } echo '
'; } }