Description
Append any 'hint' to the field_title- If there is a 'hint' or '#hint' in the $args then append it to the $field_title within a span with class "bw_hint"
- Don't translate 'hint'
- but do translate '#hint'
- '#hint' is being deprecated.
Usage
$string = _bw_form_field_title( $field_title, $args );Parameters
- $field_title
- ( string ) required – the title of the field
- $args
- ( array ) required – array of args, possibly containing a key of 'hint' or '#hint' (deprecated)
Returns
string $field_title – the updated field title. Note: A single non-blank space character is prepended to the hint text.Source
File name: oik/includes/bw_metadata.phpLines:
1 to 20 of 20
function _bw_form_field_title( $field_title, $args ) { $hint = bw_array_get( $args, "hint", null ); if ( $hint ) { $sphint = " "; $sphint .= retstag( "span", "bw_hint" ); $sphint .= $hint; $sphint .= retetag( "span" ); $field_title .= $sphint; } else { $hint = bw_array_get( $args, "#hint", null ); if ( $hint ) { $sphint = " "; $sphint .= retstag( "span", "bw_hint" ); $sphint .= bw_tt( $hint ); $sphint .= retetag( "span" ); $field_title .= $sphint; } } return( $field_title ); }View on GitHub View on Trac
Called by
1 to 5 of 5
- bw_l10n_field_title() – Customizes the field title
- Tests_bw_metadata::test__bw_form_field_title_hash_hint() – This is the code that is being deprecated
- Tests_bw_metadata::test__bw_form_field_title_hash_hint_bb_BB() – This is the code that is being deprecated.
- Tests_bw_metadata::test__bw_form_field_title_hint() – This is the replacement logic using ‘hint’ rather than #hint where hint has to be translated already
- Tests_bw_metadata::test__bw_form_field_title_hint_bb_BB() – This is the replacement logic using ‘hint’ rather than #hint where hint has to be translated already
Invoked by
Calls
1 to 4 of 4
