Skip to content

Commit

Permalink
improved duplicate note handling
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickposner committed Nov 11, 2024
1 parent 8cf9e54 commit 8e1b9fd
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/class-ss-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,16 @@ public function get_export_log( $per_page, $current_page = 1, $blog_id = 0 ) {
}

// Avoid duplicate status messages.
$cleaned = implode( '', array_unique( explode( '; ', $static_page->status_message ) ) );
$msg .= $cleaned;
if ( ! empty ( $static_page->status_message ) ) {
if ( strpos( $static_page->status_message, ';' ) !== false ) {
$cleaned = implode( '', array_unique( explode( '; ', $static_page->status_message ) ) );
$msg .= $cleaned;
} else {
$msg .= $static_page->status_message;
}
} else {
$msg .= $static_page->status_message;
}

$information = [
'id' => $static_page->id,
Expand Down

0 comments on commit 8e1b9fd

Please sign in to comment.