Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/17/2016 03:30:29 PM (10 years ago)
Author:
imath
Message:

Introduce the support for a custom home page template for single members profiles.

  • Themes can now include a front.php template to customize the home page of members.
  • Introduce a template hierarchy for this template so that it is possible to have different front pages according to the ID, the nicename or the member type of the displayed user.

Props hnla, dcavins, DJPaul, imath.

Fixes #6769

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-members/bp-members-functions.php

    r10711 r10774  
    24812481add_action( 'login_form_bp-spam', 'bp_live_spammer_login_error' );
    24822482
     2483/**
     2484 * Get the displayed user Object
     2485 *
     2486 * @since 2.6.0
     2487 *
     2488 * @return object The displayed user object, null otherwise.
     2489 */
     2490function bp_get_displayed_user() {
     2491    $bp = buddypress();
     2492
     2493    $displayed_user = null;
     2494    if ( ! empty( $bp->displayed_user->id ) ) {
     2495        $displayed_user = $bp->displayed_user;
     2496    }
     2497
     2498    /**
     2499     * Filters the displayed_user object corresponding to the displayed member.
     2500     *
     2501     * @since 2.6.0
     2502     *
     2503     * @param object $displayed_user The displayed_user object.
     2504     */
     2505    return apply_filters( 'bp_get_displayed_user', $displayed_user );
     2506}
     2507
    24832508/** Member Types *************************************************************/
    24842509
Note: See TracChangeset for help on using the changeset viewer.