nf_insert_object
Insert an object.
Description
Returns (int)
$object_id
Parameters (2)
- 0. $type (string)
- The type.
- 1. $id — Optional. (null) =>
null
- The id.
Usage
if ( !function_exists( 'nf_insert_object' ) ) { require_once ABSPATH . PLUGINDIR . 'ninja-forms/deprecated/includes/functions.php'; } // The type. $type = ''; // The id. $id = null; // NOTICE! Understand what this does before running. $result = nf_insert_object($type, $id);
Defined (1)
The function is defined in the following location(s).
- /deprecated/includes/functions.php
- function nf_insert_object( $type, $id = NULL ) {
- global $wpdb;
- $wpdb->insert( NF_OBJECTS_TABLE_NAME, array( 'id' => $id, 'type' => $type ) );
- return $wpdb->insert_id;
- }