' . wp_kses_post( implode( "

\n

", $notices['success'] ) ) . '

'; } if ( ! empty( $notices['error'] ) ) { array_walk( $notices['error'], 'esc_html' ); echo '

' . wp_kses_post( implode( "

\n

", $notices['error'] ) ) . '

'; } } if ( false !== $clear ) { wcs_clear_admin_notices(); } } add_action( 'admin_notices', 'wcs_display_admin_notices' ); /** * Delete any admin notices we stored for display later. * * @since 2.0 */ function wcs_clear_admin_notices() { delete_transient( '_wcs_admin_notices' ); }