Skip to content

Reduce write DB querys on post update - change from delete and add new - to check for changes #4293

@quasel

Description

@quasel

Current Behavior:
delete_post_meta( $post_id, $field_name ) and then does an
add_post_meta( $post_id, $field_name, $value_id )

it needs to get the meta first (no conflict mode on, so we don't interfere with our hooks), find out what IDs are there, then insert the ones not already there

as discussed with  @sc0ttkclark in slack

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: EnhancementEnhancements to features that already exist, but are not major additions

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions