Skip to:
Content

Changeset 3066


Ignore:
Timestamp:
06/22/10 10:52:11 (4 years ago)
Author:
johnjamesjacoby
Message:

Refix #2449 props rvenable, cnorris23

File:
1 edited

Legend:

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

    r3065 r3066  
    128128} 
    129129add_action( 'pre_get_posts', 'bp_dtheme_fix_get_posts_on_activity_front' ); 
     130 
     131/* WP 3.0 requires there to be a non-null post in the posts array */ 
     132function bp_dtheme_fix_the_posts_on_activity_front( $posts ) { 
     133    global $wp_query; 
     134 
     135    // NOTE: the double quotes around '"activity"' are thanks to our previous function bp_dtheme_fix_get_posts_on_activity_front() 
     136    if ( empty( $posts ) && !empty( $wp_query->query_vars['page_id'] ) && '"activity"' == $wp_query->query_vars['page_id'] ) 
     137        $posts = array( (object) array( 'ID' => 'activity' ) ); 
     138 
     139    return $posts; 
     140} 
     141add_filter( 'the_posts', 'bp_dtheme_fix_the_posts_on_activity_front' ); 
    130142 
    131143/**** 
Note: See TracChangeset for help on using the changeset viewer.