Skip to:
Content

bbPress.org

Ticket #2308: 2308.patch

File 2308.patch, 1.6 KB (added by alex-ye, 12 years ago)
  • functions.php

    # This patch file was generated by NetBeans IDE
    # Following Index: paths are relative to: C:\Users\Nashwan Doaqan\Documents\NetBeansProjects\bbp-trunk\trunk\includes\common
    # This patch can be applied using context Tools: Patch action on respective folder.
    # It uses platform neutral UTF-8 encoding and \n newlines.
    # Above lines and this line are ignored by the patching process.
     
    15311598
    15321599                // Forum/Topic/Reply Feed
    15331600                if ( isset( $query_vars['post_type'] ) ) {
    1534                    
     1601
     1602                        $post_type = false;
     1603
     1604                        // Check if this query is for bbPress!
     1605                        foreach( array(
     1606                                bbp_get_forum_post_type(),
     1607                                bbp_get_topic_post_type(),
     1608                                bbp_get_reply_post_type()
     1609                        ) as $bbp_pt ) {
     1610
     1611                            if ( in_array( $bbp_pt, (array) $query_vars['post_type'], true ) ) {
     1612                                    $post_type = $bbp_pt;
     1613                                    break;
     1614                            }
     1615
     1616                        }
     1617
     1618                        if ( empty( $post_type ) )
     1619                            return $query_vars;
     1620
    15351621                        // Supported select query vars
    15361622                        $select_query_vars = array(
    15371623                                'p'                      => false,
    15381624                                'name'                   => false,
    1539                                 $query_vars['post_type'] => false
     1625                                $post_type               => false,
    15401626                        );
    15411627
    15421628                        // Setup matched variables to select
     
    15501636                        $select_query_vars = array_filter( $select_query_vars );
    15511637
    15521638                        // What bbPress post type are we looking for feeds on?
    1553                         switch ( $query_vars['post_type'] ) {
     1639                        switch ( $post_type ) {
    15541640
    15551641                                // Forum
    15561642                                case bbp_get_forum_post_type() :