Skip to content

Commit

Permalink
custom edit page: Fix expected string error
Browse files Browse the repository at this point in the history
  • Loading branch information
sadtross committed Jan 18, 2024
1 parent cc5b8f4 commit 2ee9811
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions includes/custom-edit-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@ function contact_custom_box_html( $post ) {
$formatted_value = apply_filters( 'qterest_format_value', $value );
}

if ( is_array( $formatted_value ) ) {
$formatted_value = implode( ', ', $formatted_value );
}

if ( is_array( $value ) ) {
$value = implode( ', ', $value );
}

$is_link = substr( $value, 0, 4 ) == 'http';

echo '<tr><th>' . $formatted_key . '</th><td>' . ( $is_link ? "<a href=\"$value\">$formatted_value</a>" : $formatted_value ) . '</td></tr>';
Expand Down

0 comments on commit 2ee9811

Please sign in to comment.