Skip to:
Content

BuddyPress.org

Ticket #1338: bp-groups.php.patch

File bp-groups.php.patch, 1.5 KB (added by r-a-y, 15 years ago)

Patch for Deprecated Theme support for Editing Topic/Post for Forums component

  • buddypress/bp-groups.php

    # Patch for Deprecated Theme support for Editing Topic/Post for Forums component
    # - Fixes missing template calls for edit.php for the old /bp-themes/ format
    # r-a-y
     
    726726                                        bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) . '/forum/topic/' . $topic_slug . '/' );
    727727                                }
    728728                               
    729                                 bp_core_load_template( apply_filters( 'groups_template_group_forum_topic_edit', 'groups/single/forum/edit' ) );
     729                                if ( '' != locate_template( array( 'groups/single/forum/edit.php' ), false ) )
     730                                        bp_core_load_template( apply_filters( 'groups_template_group_forum_topic_edit', 'groups/single/forum/edit' ) );
     731                                else
     732                                        bp_core_load_template( apply_filters( 'groups_template_group_forum_topic_edit', 'groups/forum/edit' ) );
    730733                        }
    731734                       
    732735                        /* Delete a post */
     
    772775                                        bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) . '/forum/topic/' . $topic_slug . '/' );
    773776                                }
    774777                               
    775                                 bp_core_load_template( apply_filters( 'groups_template_group_forum_topic_edit', 'groups/single/forum/edit' ) );
     778                                if ( '' != locate_template( array( 'groups/single/forum/edit.php' ), false ) )
     779                                        bp_core_load_template( apply_filters( 'groups_template_group_forum_topic_edit', 'groups/single/forum/edit' ) );
     780                                else
     781                                        bp_core_load_template( apply_filters( 'groups_template_group_forum_topic_edit', 'groups/forum/edit' ) );                               
    776782                        }
    777783
    778784                        /* Standard topic display */