Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/31/2016 01:21:12 PM (9 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-core/bp-core-functions.php

    r11021 r11048  
    851851 *
    852852 * @since 2.4.0
    853  *
    854  * @param string $component Component name.
     853 * @since 2.7.0 The `$component` parameter was made optional, with the current component
     854 *              as the fallback value.
     855 *
     856 * @param string $component Optional. Component name. Defaults to current component.
    855857 * @return string|bool Query argument on success. False on failure.
    856858 */
    857 function bp_core_get_component_search_query_arg( $component ) {
     859function bp_core_get_component_search_query_arg( $component = null ) {
     860    if ( ! $component ) {
     861        $component = bp_current_component();
     862    }
     863
    858864    $query_arg = false;
    859865    if ( isset( buddypress()->{$component}->search_query_arg ) ) {
Note: See TracChangeset for help on using the changeset viewer.