$field_sql = "SELECT field_id FROM wp_cp_ad_fields WHERE field_name = %s LIMIT 1";
//VD Test field
$wpdb->get_results( $wpdb->prepare($field_sql, 'vd_cp_test_2') );
if ( $wpdb->num_rows == 0 ) {
$wpdb->insert( 'wp_cp_ad_fields', array(
'field_name' => 'vd_cp_test_2',
'field_label' => 'test2',
'field_desc' => 'This is the TEST of the ad and is mandatory on all forms. It is a core ClassiPress field and cannot be deleted.',
'field_type' => 'text box',
'field_values' => '',
'field_search' => '0',
'field_perm' => '1',
'field_core' => '1',
'field_req' => '1',
'field_owner' => 'ClassiPress',
'field_created' => current_time('mysql'),
'field_modified' => current_time('mysql'),
'field_min_length' => '0'
) );
}
There are currently 1 users browsing this thread. (0 members and 1 guests)