Skip to:
Content

BuddyPress.org

Changeset 2664


Ignore:
Timestamp:
02/11/2010 11:34:52 AM (15 years ago)
Author:
apeatling
Message:

Fixes #1908

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-themes/bp-default/functions.php

    r2655 r2664  
    126126    return apply_filters( 'bp_dtheme_page_on_front', get_option( 'page_on_front' ) );
    127127}
     128
     129/* Force the page ID as a string to stop the get_posts query from kicking up a fuss. */
     130function bp_dtheme_fix_get_posts_on_activity_front() {
     131    global $wp_query;
     132
     133    if ( !empty($wp_query->query_vars['page_id']) && 'activity' == $wp_query->query_vars['page_id'] )
     134        $wp_query->query_vars['page_id'] = '"activity"';
     135}
     136add_action( 'pre_get_posts', 'bp_dtheme_fix_get_posts_on_activity_front' );
    128137
    129138/* Set the defaults for the custom header image (http://ryan.boren.me/2007/01/07/custom-image-header-api/) */
Note: See TracChangeset for help on using the changeset viewer.