Prints a notice with a message to the user.
Description
See also
Parameters
- $message
-
(string) (Required) Message to show.
- $type
-
(string) (Optional) Notice type. Either 'success', 'info', 'warning' or 'error'.
Default value: 'warning'
- $escape
-
(bool) (Optional) Whether to escape the message. This should be set to true if the source of the message is not a 100% trusted.
Default value: false
Source
File: src/db-objects/forms/form-frontend-output-handler.php
protected function print_notice( $message, $type = 'warning', $escape = false ) { if ( $escape ) { $message = esc_html( $message ); } ?> <div class="<?php echo esc_attr( $this->get_notice_class( $type ) ); ?>"> <p><?php echo $message; ?></p> </div> <?php }
Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |