delete_field
Delete_field().
Description
This function will remove a value from the database
Parameters (2)
- 0. $field_name (string)
- The field name.
- 1. $post_id
- The post id.
Usage
if ( !function_exists( 'delete_field' ) ) { require_once '/core/api.php'; } // The field name. $field_name = ''; // The post id. $post_id = null; // NOTICE! Understand what this does before running. $result = delete_field($field_name, $post_id);
Defined (1)
The function is defined in the following location(s).
- /core/api.php
- function delete_field( $field_name, $post_id )
- {
- do_action('acf/delete_value', $post_id, $field_name );
- }