value, $unique ); } /** * Adds a meta field to the given post * @param int $ID Post id * @param int $meta_key meta_key * @param string $prev_value Previous value to check before updating * @return bool The new meta field ID if a field with the given key didn't exist and was therefore added, true on successful update, false on failure */ public function update_post_meta($ID, $meta_key, $value, $prev_value = false){ return update_post_meta( $ID, $meta_key, $value, $prev_value ); } /** * Deletes a post meta field for the given post ID. * * You can match based on the key, or key and value. Removing based on key and * value, will keep from removing duplicate metadata with the same key. It also * allows removing all metadata matching the key, if needed. * * @since 1.5.0 * * @param int $post_id Post ID. * @param string $meta_key Metadata name. * @param mixed $meta_value Optional. Metadata value. If provided, * rows will only be removed that match the value. * Must be serializable if non-scalar. Default empty. * @return bool True on success, false on failure. */ public function delete_post_meta( $post_id, $meta_key, $meta_value = '' ) { delete_post_meta( $post_id, $meta_key, $meta_value = '' ); } }