Skip to:
Content

BuddyPress.org

Changeset 11707


Ignore:
Timestamp:
09/28/2017 08:38:32 PM (7 years ago)
Author:
hnla
Message:

BP Nouveau - default search text output strings

Commit corrects erroneous 'echo' causing double rendering of string in placeholder attr & label.
Adds an empty( $text ) check on the object query setting bp core default text return to allow user set param to pass through.

Function still requires better understanding of the bp_get_search_default_text( $objects['secondary'] ) use.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-nouveau/includes/template-tags.php

    r11686 r11707  
    16831683 * @return string The default search text.
    16841684 *
    1685  * @todo 05/09/17 added  '! $text' to $object query as it's not returning output as expected & not returning user set params
    1686  * This needs looking at as var_dump the query and it shows user set string yet won't return it?! - hnla
     1685 * @todo 28/09/17 added  'empty( $text )' check to $object query as it wasn't returning output as expected & not returning user set params
     1686 * This may require further examination - hnla
    16871687 */
    16881688function bp_nouveau_search_default_text( $text = '', $is_attr = true ) {
    16891689    $objects = bp_nouveau_get_search_objects();
    16901690
    1691     if ( ! empty( $objects['secondary'] ) && ! $text ) {
    1692     echo    $text = bp_get_search_default_text( $objects['secondary'] );
     1691    if ( ! empty( $objects['secondary'] ) && empty( $text ) ) {
     1692        $text = bp_get_search_default_text( $objects['secondary'] );
    16931693    }
    16941694
Note: See TracChangeset for help on using the changeset viewer.