Skip to content

Commit 0540a2a

Browse files
committed
chore: code style
1 parent 10331a2 commit 0540a2a

File tree

2 files changed

+37
-34
lines changed

2 files changed

+37
-34
lines changed

src/Modules/Notification.php

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ public static function get_notification_html( $notification_details ) {
256256
$default = [
257257
'id' => '',
258258
'heading' => '',
259-
'img_src' => '',
259+
'img_src' => '',
260260
'message' => '',
261261
'ctas' => [
262262
'confirm' => [
@@ -268,26 +268,26 @@ public static function get_notification_html( $notification_details ) {
268268
'text' => '',
269269
],
270270
],
271-
'type' => 'success',
271+
'type' => 'success',
272272
];
273273
$notification_details = wp_parse_args( $notification_details, $default );
274274
global $pagenow;
275-
$type = in_array( $notification_details['type'], [ 'success', 'info', 'warning', 'error' ], true ) ? $notification_details['type'] : 'success';
275+
$type = in_array( $notification_details['type'], [ 'success', 'info', 'warning', 'error' ], true ) ? $notification_details['type'] : 'success';
276276
$notification_details['ctas']['cancel']['link'] = wp_nonce_url( add_query_arg( [ 'nid' => $notification_details['id'] ], admin_url( $pagenow ) ), $notification_details['id'], 'tsdk_dismiss_nonce' );
277277
$notification_html = '<div class="notice notice-' . $type . ' is-dismissible themeisle-sdk-notice" data-notification-id="' . esc_attr( $notification_details['id'] ) . '" id="' . esc_attr( $notification_details['id'] ) . '-notification"> <div class="themeisle-sdk-notification-box">';
278278

279279
if ( ! empty( $notification_details['heading'] ) ) {
280280
$notification_html .= sprintf( '<h4>%s</h4>', wp_kses_post( $notification_details['heading'] ) );
281281
}
282-
if ( ! empty( $notification_details['img_src'] ) ) {
283-
$notification_html .= '<div class="wrap-flex">';
284-
$notification_html .= sprintf( '<img src="%s" alt="%s" />', esc_attr( $notification_details['img_src'] ), esc_attr( $notification_details['heading'] ) );
285-
}
282+
if ( ! empty( $notification_details['img_src'] ) ) {
283+
$notification_html .= '<div class="wrap-flex">';
284+
$notification_html .= sprintf( '<img src="%s" alt="%s" />', esc_attr( $notification_details['img_src'] ), esc_attr( $notification_details['heading'] ) );
285+
}
286286
if ( ! empty( $notification_details['message'] ) ) {
287287
$notification_html .= wp_kses_post( $notification_details['message'] );
288-
if ( ! empty( $notification_details['img_src'] ) ) {
289-
$notification_html .= '</div>';
290-
}
288+
if ( ! empty( $notification_details['img_src'] ) ) {
289+
$notification_html .= '</div>';
290+
}
291291
}
292292
$notification_html .= '<div class="actions">';
293293

@@ -327,17 +327,17 @@ public static function render_snippets() {
327327
padding: 3px;
328328
}
329329

330-
.themeisle-sdk-notification-box .wrap-flex {
331-
display: flex;
332-
align-items: center;
333-
justify-content: start;
334-
gap: 12px;
335-
}
336-
337-
.themeisle-sdk-notification-box .wrap-flex img {
338-
width: 42px;
339-
object-fit: cover;
340-
}
330+
.themeisle-sdk-notification-box .wrap-flex {
331+
display: flex;
332+
align-items: center;
333+
justify-content: start;
334+
gap: 12px;
335+
}
336+
337+
.themeisle-sdk-notification-box .wrap-flex img {
338+
width: 42px;
339+
object-fit: cover;
340+
}
341341

342342
.themeisle-sdk-notification-box .actions {
343343
margin-top: 6px;

0 commit comments

Comments
 (0)