Changeset 7212 for trunk/bp-activity/bp-activity-screens.php
- Timestamp:
- 06/13/2013 01:27:01 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-screens.php
r7193 r7212 319 319 * 320 320 * This class sets up the necessary theme compatability actions to safely output 321 * grouptemplate parts to the_title and the_content areas of a theme.321 * activity template parts to the_title and the_content areas of a theme. 322 322 * 323 323 * @since BuddyPress (1.7) … … 351 351 do_action( 'bp_activity_screen_index' ); 352 352 353 add_filter( 'bp_get_buddypress_template', array( $this, 'directory_template_hierarchy' ) ); 353 354 add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'directory_dummy_post' ) ); 354 355 add_filter( 'bp_replace_the_content', array( $this, 'directory_content' ) ); … … 356 357 // Single activity 357 358 } elseif ( bp_is_single_activity() ) { 359 add_filter( 'bp_get_buddypress_template', array( $this, 'single_template_hierarchy' ) ); 358 360 add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'single_dummy_post' ) ); 359 361 add_filter( 'bp_replace_the_content', array( $this, 'single_dummy_content' ) ); … … 362 364 363 365 /** Directory *************************************************************/ 366 367 /** 368 * Add template hierarchy to theme compat for the activity directory page. 369 * 370 * This is to mirror how WordPress has {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}. 371 * 372 * @since BuddyPress (1.8) 373 * 374 * @param string $templates The templates from bp_get_theme_compat_templates() 375 * @return array $templates Array of custom templates to look for. 376 */ 377 public function directory_template_hierarchy( $templates ) { 378 // Setup our templates based on priority 379 $new_templates = apply_filters( 'bp_template_hierarchy_activity_directory', array( 380 'activity/index-directory.php' 381 ) ); 382 383 // Merge new templates with existing stack 384 // @see bp_get_theme_compat_templates() 385 $templates = array_merge( (array) $new_templates, $templates ); 386 387 return $templates; 388 } 364 389 365 390 /** … … 394 419 395 420 /** 421 * Add custom template hierarchy to theme compat for activity permalink pages. 422 * 423 * This is to mirror how WordPress has {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}. 424 * 425 * @since BuddyPress (1.8) 426 * 427 * @param string $templates The templates from bp_get_theme_compat_templates() 428 * @return array $templates Array of custom templates to look for. 429 */ 430 public function single_template_hierarchy( $templates ) { 431 // Setup our templates based on priority 432 $new_templates = apply_filters( 'bp_template_hierarchy_activity_single_item', array( 433 'activity/single/index.php' 434 ) ); 435 436 // Merge new templates with existing stack 437 // @see bp_get_theme_compat_templates() 438 $templates = array_merge( (array) $new_templates, $templates ); 439 440 return $templates; 441 } 442 443 /** 396 444 * Update the global $post with the displayed user's data 397 445 *
Note: See TracChangeset
for help on using the changeset viewer.