Created
January 14, 2013 12:11
-
-
Save gicolek/4529670 to your computer and use it in GitHub Desktop.
Gravity Form filters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
static function _modify_gravity_form_lead_detail_table($cat_id) { | |
global $wpdb; | |
$lead_details_table_name = RGFormsModel::get_lead_details_table_name(); | |
// get new category name | |
$new_name = $_POST['name']; | |
// get db category name | |
$cat_name = get_cat_name( $cat_id ); | |
// set up data for wpdb update | |
$data = array( | |
'value' => $new_name, | |
); | |
$where = array( | |
'value' => $cat_name, | |
); | |
$format = array( | |
'%s', | |
); | |
$wpdb->update( $lead_details_table_name, $data, $where, $format ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment