From: Laury GvR Date: Wed, 28 Jun 2017 19:09:26 +0000 (-0400) Subject: Adding the nl2br function to the custom fields retrieval for texbox fields to preserv... X-Git-Tag: v1.0.3^2~5 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=5470639fd931b0e4f88933a067de4c9c42913d45;p=WP-Plugins%2Fglm-member-db-fields.git Adding the nl2br function to the custom fields retrieval for texbox fields to preserve hard return on front-end display --- diff --git a/setup/frontHooks.php b/setup/frontHooks.php index b15711f..6597908 100644 --- a/setup/frontHooks.php +++ b/setup/frontHooks.php @@ -113,7 +113,7 @@ add_filter('glm_custom_fields', function($attribute, $id = 0) { global $wpdb; $query = "SELECT field_data FROM " . GLM_MEMBERS_FIELDS_PLUGIN_DB_PREFIX . "custom_field_data WHERE ref_dest = $id " . "AND field_id IN (SELECT id FROM ".GLM_MEMBERS_FIELDS_PLUGIN_DB_PREFIX."custom_fields WHERE field_name LIKE '$attribute' )"; - $result = $wpdb->get_var( $query ); + $result = nl2br($wpdb->get_var( $query )); return $result; }, 10,