$type, 'message' => wp_strip_all_tags( (string) $message ), ), MINUTE_IN_SECONDS ); } /** * Print and consume the queued notice. * * @return void */ public static function render() { $data = get_transient( self::key() ); if ( ! is_array( $data ) || empty( $data['message'] ) ) { return; } delete_transient( self::key() ); $type = isset( $data['type'] ) ? (string) $data['type'] : 'info'; if ( ! in_array( $type, array( 'success', 'warning', 'error', 'info' ), true ) ) { $type = 'info'; } printf( '
%2$s