From: Laury GvR Date: Wed, 28 Jun 2017 20:18:53 +0000 (-0400) Subject: Using wpautop instead of nl2br for textbox field front displays X-Git-Tag: v1.0.3^2~4 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=6764e3d645714acb1a6b8cb12ab7ca8c28803a68;p=WP-Plugins%2Fglm-member-db-fields.git Using wpautop instead of nl2br for textbox field front displays --- diff --git a/setup/frontHooks.php b/setup/frontHooks.php index 6597908..916b023 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 = nl2br($wpdb->get_var( $query )); + $result = wpautop($wpdb->get_var( $query )); return $result; }, 10,