Changeset 7341 for trunk/src/includes/forums/functions.php
- Timestamp:
- 07/24/2025 12:27:11 AM (4 months ago)
- File:
-
- 1 edited
-
trunk/src/includes/forums/functions.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/forums/functions.php
r7321 r7341 2463 2463 $forum_id = 0; 2464 2464 $wp_query = bbp_get_wp_query(); 2465 $post_id = ! empty( $wp_query->post->ID ) 2466 ? $wp_query->post->ID 2467 : 0; 2465 2468 2466 2469 // Check post type … … 2469 2472 // Forum 2470 2473 case bbp_get_forum_post_type() : 2471 $forum_id = bbp_get_forum_id( $ wp_query->post->ID);2474 $forum_id = bbp_get_forum_id( $post_id ); 2472 2475 break; 2473 2476 2474 2477 // Topic 2475 2478 case bbp_get_topic_post_type() : 2476 $forum_id = bbp_get_topic_forum_id( $ wp_query->post->ID);2479 $forum_id = bbp_get_topic_forum_id( $post_id ); 2477 2480 break; 2478 2481 2479 2482 // Reply 2480 2483 case bbp_get_reply_post_type() : 2481 $forum_id = bbp_get_reply_forum_id( $ wp_query->post->ID);2484 $forum_id = bbp_get_reply_forum_id( $post_id ); 2482 2485 break; 2483 2486 } … … 2505 2508 $forum_id = 0; 2506 2509 $wp_query = bbp_get_wp_query(); 2510 $post_id = ! empty( $wp_query->post->ID ) 2511 ? $wp_query->post->ID 2512 : 0; 2507 2513 2508 2514 // Check post type … … 2511 2517 // Forum 2512 2518 case bbp_get_forum_post_type() : 2513 $forum_id = bbp_get_forum_id( $ wp_query->post->ID);2519 $forum_id = bbp_get_forum_id( $post_id ); 2514 2520 break; 2515 2521 2516 2522 // Topic 2517 2523 case bbp_get_topic_post_type() : 2518 $forum_id = bbp_get_topic_forum_id( $ wp_query->post->ID);2524 $forum_id = bbp_get_topic_forum_id( $post_id ); 2519 2525 break; 2520 2526 2521 2527 // Reply 2522 2528 case bbp_get_reply_post_type() : 2523 $forum_id = bbp_get_reply_forum_id( $ wp_query->post->ID);2529 $forum_id = bbp_get_reply_forum_id( $post_id ); 2524 2530 break; 2525 2526 2531 } 2527 2532
Note: See TracChangeset
for help on using the changeset viewer.