Skip to content

Commit

Permalink
Merge pull request #36 from qteab/custom-edit-page-fix-error
Browse files Browse the repository at this point in the history
custom edit page: Fix expected string error
  • Loading branch information
noaholsson committed Jan 18, 2024
2 parents cc5b8f4 + 2ee9811 commit 4511492
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 4511492

Please sign in to comment.