This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Astra_Notices::get_wrap_classes( array $notice )

Get wrapper classes for a notice.


Description


Parameters

$notice

(array) (Required) Notice arguments.


Return

(array) Notice wrapper classes.


Source

File: inc/lib/astra-notices/class-astra-notices.php

		private static function get_wrap_classes( $notice ) {
			$classes = array( 'astra-notice', 'notice' );

			if ( $notice['is_dismissible'] ) {
				$classes[] = 'is-dismissible';
			}

			$classes[] = $notice['class'];
			if ( isset( $notice['type'] ) && '' !== $notice['type'] ) {
				$classes[] = 'notice-' . $notice['type'];
			}

			return esc_attr( implode( ' ', $classes ) );
		}

Changelog

Changelog
Version Description
1.0.0 Introduced.


User Contributed Notes

You must log in before being able to contribute a note or feedback.