From 7c76e907463ff92ab17f1f52017a993360163f3a Mon Sep 17 00:00:00 2001
From: Anand Kumria <akumria@acm.org>
Date: Sun, 24 Nov 2013 15:34:50 +0000
Subject: [PATCH 1/4] Add a function to return the placeholder text.

Moving this to a function means we can, in future, pull the placeholder
text from the DB.
---
 bp-xprofile/bp-xprofile-template.php |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/bp-xprofile/bp-xprofile-template.php b/bp-xprofile/bp-xprofile-template.php
index a82db1c..99d4a43 100644
--- a/bp-xprofile/bp-xprofile-template.php
+++ b/bp-xprofile/bp-xprofile-template.php
@@ -420,6 +420,11 @@ function bp_get_the_profile_field_errors_action() {
 function bp_the_profile_field_options( $args = '' ) {
 	echo bp_get_the_profile_field_options( $args );
 }
+
+function bp_get_placeholder_text_for_field( $field ) {
+    return /* translators: no option picked in select box */ __( '----', 'buddypress' ) ;
+}
+
 	/**
 	 * bp_get_the_profile_field_options()
 	 *
@@ -468,7 +473,7 @@ function bp_the_profile_field_options( $args = '' ) {
 		switch ( $field->type ) {
 			case 'selectbox':
 
-				$html .= '<option value="">' . /* translators: no option picked in select box */ __( '----', 'buddypress' ) . '</option>';
+				$html .= '<option value="">' . bp_get_placeholder_text_for_field($field) . '</option>';
 
 				$original_option_values = '';
 				$original_option_values = maybe_unserialize( BP_XProfile_ProfileData::get_value_byid( $field->id ) );
-- 
1.7.9.5

