Filter
rpress_error_class
On this page
Filters the CSS classes of the error wrapper printed by rpress_print_errors.
Runs when stored errors exist and rpress_print_errors is about to print them. The classes are joined with spaces and used as the class attribute of the wrapping div. The defaults are rpress_errors, rpress-alert and rpress-alert-error.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$classes | array | List of CSS class names. |
Return value#
array. The list of CSS class names.
Example#
function my_error_class( $classes ) {
$classes[] = 'my-checkout-notice';
return $classes;
}
add_filter( 'rpress_error_class', 'my_error_class', 10, 1 );
Source#
Applied in:
includes/error-tracking.php(line 27), inrpress_print_errors()
See also#
Was this page helpful?
