Skip to:
Content

Ignore:
Timestamp:
08/31/2016 01:21:12 PM (3 years ago)
Author:
boonebgorges
Message:

Templates: Move component directory search markup to 'common' template.

The new 'common' directory in the bp-legacy template pack will be a
storehouse for template parts that are shared between components. The
directory search form is the first implementation of this idea.

Props hnla, mercime.
See #6844.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-legacy/buddypress/forums/index.php

    r10265 r11048  
    3030        do_action( 'bp_before_directory_forums_content' ); ?>
    3131
    32         <div id="forums-dir-search" class="dir-search" role="search">
    33 
    34             <?php bp_directory_forums_search_form(); ?>
    35 
    36         </div>
     32        <?php /* Backward compatibility for inline search form. Use template part instead. */ ?>
     33        <?php if ( has_filter( 'bp_directory_forums_search_form' ) ) : ?>
     34
     35            <div id="forums-dir-search" class="dir-search" role="search">
     36                <?php bp_directory_forums_search_form(); ?>
     37            </div>
     38
     39        <?php else: ?>
     40
     41            <?php bp_get_template_part( 'common/search/dir-search-form' ); ?>
     42
     43        <?php endif; ?>
     44
    3745    </form>
    3846
Note: See TracChangeset for help on using the changeset viewer.