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
|
b
|
function bp_get_the_profile_field_errors_action() { |
| 420 | 420 | function bp_the_profile_field_options( $args = '' ) { |
| 421 | 421 | echo bp_get_the_profile_field_options( $args ); |
| 422 | 422 | } |
| | 423 | |
| | 424 | function bp_get_placeholder_text_for_field( $field ) { |
| | 425 | return /* translators: no option picked in select box */ __( '----', 'buddypress' ) ; |
| | 426 | } |
| | 427 | |
| 423 | 428 | /** |
| 424 | 429 | * bp_get_the_profile_field_options() |
| 425 | 430 | * |
| … |
… |
function bp_the_profile_field_options( $args = '' ) { |
| 468 | 473 | switch ( $field->type ) { |
| 469 | 474 | case 'selectbox': |
| 470 | 475 | |
| 471 | | $html .= '<option value="">' . /* translators: no option picked in select box */ __( '----', 'buddypress' ) . '</option>'; |
| | 476 | $html .= '<option value="">' . bp_get_placeholder_text_for_field($field) . '</option>'; |
| 472 | 477 | |
| 473 | 478 | $original_option_values = ''; |
| 474 | 479 | $original_option_values = maybe_unserialize( BP_XProfile_ProfileData::get_value_byid( $field->id ) ); |