Changeset 3066
- Timestamp:
- 06/22/2010 10:52:11 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.2/bp-themes/bp-default/functions.php
r3065 r3066 128 128 } 129 129 add_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 */ 132 function 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 } 141 add_filter( 'the_posts', 'bp_dtheme_fix_the_posts_on_activity_front' ); 130 142 131 143 /****
Note: See TracChangeset
for help on using the changeset viewer.