nf_get_object_type
Get an object's type.
Description
(string) nf_get_object_type( $object_id );
Returns (string)
$return
Parameters (1)
- 0. $object_id
- The object id.
Usage
if ( !function_exists( 'nf_get_object_type' ) ) { require_once ABSPATH . PLUGINDIR . 'ninja-forms/deprecated/includes/functions.php'; } // The object id. $object_id = null; // NOTICE! Understand what this does before running. $result = nf_get_object_type($object_id);
Defined (1)
The function is defined in the following location(s).
- /deprecated/includes/functions.php
- function nf_get_object_type( $object_id ) {
- global $wpdb;
- // Get our object type
- $type = $wpdb->get_row( $wpdb->prepare( 'SELECT type FROM ' . NF_OBJECTS_TABLE_NAME . ' WHERE id = %d', $object_id ), ARRAY_A );
- $return = ( isset ( $type['type'] ) ) ? $type['type'] : false;
- return $return;
- }