Changeset 12015
- Timestamp:
- 04/29/2018 06:48:38 PM (8 years ago)
- Location:
- trunk/src/bp-templates/bp-nouveau
- Files:
-
- 2 edited
-
buddypress/common/search/search-form.php (modified) (1 diff)
-
includes/template-tags.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-templates/bp-nouveau/buddypress/common/search/search-form.php
r11899 r12015 7 7 ?> 8 8 9 <div class="<?php bp_nouveau_search_container_class(); ?> bp-search" >10 <form action="" method="get" class="bp-dir-search-form" id="<?php bp_nouveau_search_selector_id( 'search-form' ); ?>" role="search" data-bp-search="groups">9 <div class="<?php bp_nouveau_search_container_class(); ?> bp-search" data-bp-search="<?php bp_nouveau_search_object_data_attr() ;?>"> 10 <form action="" method="get" class="bp-dir-search-form" id="<?php bp_nouveau_search_selector_id( 'search-form' ); ?>" role="search"> 11 11 12 12 <label for="<?php bp_nouveau_search_selector_id( 'search' ); ?>" class="bp-screen-reader-text"><?php bp_nouveau_search_default_text( '', false ); ?></label> -
trunk/src/bp-templates/bp-nouveau/includes/template-tags.php
r12008 r12015 1750 1750 1751 1751 /** 1752 * Output the search form data-bp attribute. 1753 * 1754 * @since 3.0.0 1755 * 1756 * @param string $attr The data-bp attribute. 1757 * @return string The data-bp attribute. 1758 */ 1759 function bp_nouveau_search_object_data_attr( $attr = '' ) { 1760 $objects = bp_nouveau_get_search_objects(); 1761 1762 if ( ! isset( $objects['secondary'] ) ) { 1763 return $attr; 1764 } 1765 1766 if ( bp_is_active( 'groups' ) && bp_is_group_members() ) { 1767 $attr = join( '_', $objects ); 1768 } else { 1769 $attr = $objects['secondary']; 1770 } 1771 1772 echo esc_attr( $attr ); 1773 } 1774 1775 /** 1752 1776 * Output a selector ID. 1753 1777 *
Note: See TracChangeset
for help on using the changeset viewer.