Ticket #6844: 6844-06.patch
File 6844-06.patch, 10.2 KB (added by , 8 years ago) |
---|
-
src/bp-core/bp-core-functions.php
854 854 * @param string $component Component name. 855 855 * @return string|bool Query argument on success. False on failure. 856 856 */ 857 function bp_core_get_component_search_query_arg( $component ) { 857 function bp_core_get_component_search_query_arg( $component = null ) { 858 if ( ! $component ) { 859 $component = bp_current_component(); 860 } 861 858 862 $query_arg = false; 863 859 864 if ( isset( buddypress()->{$component}->search_query_arg ) ) { 860 865 $query_arg = sanitize_title( buddypress()->{$component}->search_query_arg ); 861 866 } -
src/bp-core/bp-core-template.php
585 585 } 586 586 587 587 /** 588 * Output the 'name' attribute for search form input element. 589 * 590 * @since 2.7.0 591 * 592 * @param string $component See {@link bp_get_search_input_name()}. 593 */ 594 function bp_search_input_name( $component = '' ) { 595 echo esc_attr( bp_get_search_input_name( $component ) ); 596 } 597 598 /** 599 * Get the 'name' attribute for the search form input element. 600 * 601 * @since 2.7.0 602 * 603 * @param string $component Component name. Defaults to current component. 604 * @return string Text for the 'name' attribute. 605 */ 606 function bp_get_search_input_name( $component = '' ) { 607 608 if ( ! $component ) { 609 $component = bp_current_component(); 610 } 611 612 $bp = buddypress(); 613 614 $name = ''; 615 if ( isset( $bp->{$component}->id ) ) { 616 $name = $bp->{$component}->id . '_search'; 617 } 618 619 return $name; 620 } 621 622 /** 623 * Output the placeholder text for the search box for a given component. 624 * 625 * @since 2.7.0 626 * 627 * @param string $component See {@link bp_get_search_placeholder()}. 628 */ 629 function bp_search_placeholder( $component = '' ) { 630 echo esc_attr( bp_get_search_placeholder( $component ) ); 631 } 632 633 /** 634 * Get the placeholder text for the search box for a given component. 635 * 636 * @since 2.7.0 637 * 638 * @param string $component Component name. Defaults to current component. 639 * @return string Placeholder text for the search field. 640 */ 641 function bp_get_search_placeholder( $component = '' ) { 642 $query_arg = bp_core_get_component_search_query_arg( $component ); 643 644 if ( $query_arg && ! empty( $_REQUEST[ $query_arg ] ) ) { 645 $placeholder = wp_unslash( $_REQUEST[ $query_arg ] ); 646 } else { 647 $placeholder = bp_get_search_default_text( $component ); 648 } 649 650 return $placeholder; 651 } 652 653 /** 588 654 * Output the default text for the search box for a given component. 589 655 * 590 656 * @since 1.5.0 -
src/bp-templates/bp-legacy/buddypress/blogs/index.php
33 33 */ 34 34 do_action( 'bp_before_directory_blogs_content' ); ?> 35 35 36 <div id="blog-dir-search" class="dir-search" role="search"> 37 <?php bp_directory_blogs_search_form(); ?> 38 </div><!-- #blog-dir-search --> 36 <?php if ( has_filter( 'bp_directory_blogs_search_form' ) ) : ?> 39 37 38 <div id="blog-dir-search" class="dir-search" role="search"> 39 <?php bp_directory_blogs_search_form(); ?> 40 </div><!-- #blog-dir-search --> 41 42 <?php else : ?> 43 44 <?php bp_get_template_part( 'common/search/dir-search-form' ); ?> 45 46 <?php endif; ?> 47 40 48 <?php 41 49 42 50 /** -
src/bp-templates/bp-legacy/buddypress/common/search/dir-search-form.php
1 <?php 2 /** 3 * Output the search form markup. 4 * 5 * @since 2.7.0 6 * 7 * @return string html. 8 */ 9 ?> 10 <div id="<?php echo esc_attr( bp_current_component() ); ?>-dir-search" class="dir-search" role="search"> 11 <form action="" method="get" id="search-<?php echo esc_attr( bp_current_component() ); ?>-form"> 12 <label for="<?php bp_search_input_name(); ?>" class="bp-screen-reader-text"><?php bp_search_placeholder(); ?></label> 13 <input type="text" name="<?php echo esc_attr( bp_core_get_component_search_query_arg() ); ?>" id="<?php bp_search_input_name(); ?>" placeholder="<?php bp_search_placeholder(); ?>" /> 14 <input type="submit" id="<?php echo esc_attr( bp_get_search_input_name() ); ?>_submit" name="<?php bp_search_input_name(); ?>_submit" value="<?php echo esc_html( 'Search', 'buddypress' ); ?>" /> 15 </form> 16 </div><!-- #<?php esc_attr_e( bp_current_component() ); ?>-dir-search --> -
src/bp-templates/bp-legacy/buddypress/common/search/dir-search-form.php
Property changes on: src/bp-templates/bp-legacy/buddypress/common/search/dir-search-form.php ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property
1 <?php 2 /** 3 * Output the search form markup. 4 * 5 * @since 2.7.0 6 * 7 * @return string html. 8 */ 9 ?> 10 <div id="<?php echo esc_attr( bp_current_component() ); ?>-dir-search" class="dir-search" role="search"> 11 <form action="" method="get" id="search-<?php echo esc_attr( bp_current_component() ); ?>-form"> 12 <label for="<?php bp_search_input_name(); ?>" class="bp-screen-reader-text"><?php bp_search_placeholder(); ?></label> 13 <input type="text" name="<?php echo esc_attr( bp_core_get_component_search_query_arg() ); ?>" id="<?php bp_search_input_name(); ?>" placeholder="<?php bp_search_placeholder(); ?>" /> 14 <input type="submit" id="<?php echo esc_attr( bp_get_search_input_name() ); ?>_submit" name="<?php bp_search_input_name(); ?>_submit" value="<?php echo esc_html( 'Search', 'buddypress' ); ?>" /> 15 </form> 16 </div><!-- #<?php esc_attr_e( bp_current_component() ); ?>-dir-search --> -
src/bp-templates/bp-legacy/buddypress/common/search/dir-search-form.php
Property changes on: src/bp-templates/bp-legacy/buddypress/common/search/dir-search-form.php ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property
1 <?php 2 /** 3 * Output the search form markup. 4 * 5 * @since 2.7.0 6 * 7 * @return string html. 8 */ 9 ?> 10 <div id="<?php echo esc_attr( bp_current_component() ); ?>-dir-search" class="dir-search" role="search"> 11 <form action="" method="get" id="search-<?php echo esc_attr( bp_current_component() ); ?>-form"> 12 <label for="<?php bp_search_input_name(); ?>" class="bp-screen-reader-text"><?php bp_search_placeholder(); ?></label> 13 <input type="text" name="<?php echo esc_attr( bp_core_get_component_search_query_arg() ); ?>" id="<?php bp_search_input_name(); ?>" placeholder="<?php bp_search_placeholder(); ?>" /> 14 <input type="submit" id="<?php echo esc_attr( bp_get_search_input_name() ); ?>_submit" name="<?php bp_search_input_name(); ?>_submit" value="<?php echo esc_html( 'Search', 'buddypress' ); ?>" /> 15 </form> 16 </div><!-- #<?php esc_attr_e( bp_current_component() ); ?>-dir-search --> -
src/bp-templates/bp-legacy/buddypress/forums/index.php
Property changes on: src/bp-templates/bp-legacy/buddypress/common/search/dir-search-form.php ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property
29 29 */ 30 30 do_action( 'bp_before_directory_forums_content' ); ?> 31 31 32 <?php if ( has_filter( 'bp_directory_forums_search_form' ) ) : ?> 33 32 34 <div id="forums-dir-search" class="dir-search" role="search"> 35 <?php bp_directory_forums_search_form(); ?> 36 </div> 33 37 34 <?php bp_directory_forums_search_form();?>38 <?php else: ?> 35 39 36 </div> 40 <?php bp_get_template_part( 'common/search/dir-search-form' ); ?> 41 42 <?php endif; ?> 43 37 44 </form> 38 45 39 46 <?php -
src/bp-templates/bp-legacy/buddypress/groups/index.php
33 33 */ 34 34 do_action( 'bp_before_directory_groups_content' ); ?> 35 35 36 <?php if ( has_filter( 'bp_directory_groups_search_form' ) ) : ?> 37 36 38 <div id="group-dir-search" class="dir-search" role="search"> 37 39 <?php bp_directory_groups_search_form(); ?> 38 40 </div><!-- #group-dir-search --> 39 41 42 <?php else: ?> 43 44 <?php bp_get_template_part( 'common/search/dir-search-form' ); ?> 45 46 <?php endif; ?> 47 40 48 <form action="" method="post" id="groups-directory-form" class="dir-form"> 41 49 42 50 <?php -
src/bp-templates/bp-legacy/buddypress/members/index.php
33 33 */ 34 34 do_action( 'bp_before_directory_members_content' ); ?> 35 35 36 <?php if ( has_filter( 'bp_directory_members_search_form' ) ) : ?> 37 36 38 <div id="members-dir-search" class="dir-search" role="search"> 37 39 <?php bp_directory_members_search_form(); ?> 38 40 </div><!-- #members-dir-search --> 39 41 42 <?php else: ?> 43 44 <?php bp_get_template_part( 'common/search/dir-search-form' ); ?> 45 46 <?php endif; ?> 47 40 48 <?php 41 42 49 /** 43 50 * Fires before the display of the members list tabs. 44 51 *