Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/17/2016 03:30:29 PM (9 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-core/bp-core-template.php

    r10745 r10774  
    22692269function bp_is_user() {
    22702270    return (bool) bp_displayed_user_id();
     2271}
     2272
     2273/**
     2274 * Is the current page a user custom front page?
     2275 *
     2276 * Will return true anytime there is a custom front page for the displayed user.
     2277 *
     2278 * @since 2.6.0
     2279 *
     2280 * @return bool True if the current page is a user custom front page.
     2281 */
     2282function bp_is_user_front() {
     2283    return (bool) ( bp_is_user() && bp_is_current_component( 'front' ) );
    22712284}
    22722285
Note: See TracChangeset for help on using the changeset viewer.