Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion dt-posts/posts.php
Original file line number Diff line number Diff line change
Expand Up @@ -2535,7 +2535,10 @@ public static function add_post_contact_method( array $post_settings, int $post_
$new_meta_key = '';
//check if this is a new field and is in the channel list
if ( isset( $post_settings['fields'][ $field_key ] ) ) {
$new_meta_key = self::create_channel_metakey( $type, 'contact' );
// The 3 character hash can repeat, and reusing a key would overwrite an existing value.
do {
$new_meta_key = self::create_channel_metakey( $type, 'contact' );
} while ( metadata_exists( 'post', $post_id, $new_meta_key ) );
}
update_post_meta( $post_id, $new_meta_key, $value );
$details = [ 'verified' => false ];
Expand Down
Loading