Changeset 7342 for branches/2.6/src/includes/forums/functions.php
- Timestamp:
- 07/24/2025 12:29:32 AM (4 months ago)
- File:
-
- 1 edited
-
branches/2.6/src/includes/forums/functions.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/2.6/src/includes/forums/functions.php
r7320 r7342 2470 2470 $forum_id = 0; 2471 2471 $wp_query = bbp_get_wp_query(); 2472 $post_id = ! empty( $wp_query->post->ID ) 2473 ? $wp_query->post->ID 2474 : 0; 2472 2475 2473 2476 // Check post type … … 2476 2479 // Forum 2477 2480 case bbp_get_forum_post_type() : 2478 $forum_id = bbp_get_forum_id( $ wp_query->post->ID);2481 $forum_id = bbp_get_forum_id( $post_id ); 2479 2482 break; 2480 2483 2481 2484 // Topic 2482 2485 case bbp_get_topic_post_type() : 2483 $forum_id = bbp_get_topic_forum_id( $ wp_query->post->ID);2486 $forum_id = bbp_get_topic_forum_id( $post_id ); 2484 2487 break; 2485 2488 2486 2489 // Reply 2487 2490 case bbp_get_reply_post_type() : 2488 $forum_id = bbp_get_reply_forum_id( $ wp_query->post->ID);2491 $forum_id = bbp_get_reply_forum_id( $post_id ); 2489 2492 break; 2490 2493 } … … 2512 2515 $forum_id = 0; 2513 2516 $wp_query = bbp_get_wp_query(); 2517 $post_id = ! empty( $wp_query->post->ID ) 2518 ? $wp_query->post->ID 2519 : 0; 2514 2520 2515 2521 // Check post type … … 2518 2524 // Forum 2519 2525 case bbp_get_forum_post_type() : 2520 $forum_id = bbp_get_forum_id( $ wp_query->post->ID);2526 $forum_id = bbp_get_forum_id( $post_id ); 2521 2527 break; 2522 2528 2523 2529 // Topic 2524 2530 case bbp_get_topic_post_type() : 2525 $forum_id = bbp_get_topic_forum_id( $ wp_query->post->ID);2531 $forum_id = bbp_get_topic_forum_id( $post_id ); 2526 2532 break; 2527 2533 2528 2534 // Reply 2529 2535 case bbp_get_reply_post_type() : 2530 $forum_id = bbp_get_reply_forum_id( $ wp_query->post->ID);2536 $forum_id = bbp_get_reply_forum_id( $post_id ); 2531 2537 break; 2532 2533 2538 } 2534 2539
Note: See TracChangeset
for help on using the changeset viewer.