Skip to:
Content

bbPress.org

Changeset 6582


Ignore:
Timestamp:
06/19/2017 02:03:14 AM (9 years ago)
Author:
johnjamesjacoby
Message:

Globals: Use bbp_get_global_object() instead of touching $wp_query directly in template functions.

Location:
trunk/src/includes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/forums/template.php

    r6576 r6582  
    201201     */
    202202    function bbp_get_forum_id( $forum_id = 0 ) {
    203         global $wp_query;
    204 
    205         $bbp = bbpress();
     203        $bbp      = bbpress();
     204        $wp_query = bbp_get_global_object( 'wp_query', 'WP_Query' );
    206205
    207206        // Easy empty checking
  • trunk/src/includes/replies/template.php

    r6573 r6582  
    327327     */
    328328    function bbp_get_reply_id( $reply_id = 0 ) {
    329         global $wp_query;
    330 
    331         $bbp = bbpress();
     329        $bbp      = bbpress();
     330        $wp_query = bbp_get_global_object( 'wp_query', 'WP_Query' );
    332331
    333332        // Easy empty checking
  • trunk/src/includes/topics/template.php

    r6573 r6582  
    441441     */
    442442    function bbp_get_topic_id( $topic_id = 0 ) {
    443         global $wp_query;
    444 
    445         $bbp = bbpress();
     443        $bbp      = bbpress();
     444        $wp_query = bbp_get_global_object( 'wp_query', 'WP_Query' );
    446445
    447446        // Easy empty checking
Note: See TracChangeset for help on using the changeset viewer.