Changeset 11821
- Timestamp:
- 01/25/2018 08:23:37 PM (7 years ago)
- Location:
- trunk/src/bp-templates
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-templates/bp-legacy/buddypress-functions.php
r11780 r11821 804 804 bp_update_is_directory( true, bp_current_component() ); 805 805 806 $template_part = $object . '/' . $object . '-loop';807 808 806 // The template part can be overridden by the calling JS function. 809 if ( ! empty( $_POST['template'] ) ) { 810 $template_part = sanitize_option( 'upload_path', $_POST['template'] ); 811 } 812 813 // Locate the object template. 814 bp_get_template_part( $template_part ); 807 if ( ! empty( $_POST['template'] ) && 'groups/single/members' === $_POST['template'] && 'group_members' === $object ) { 808 $template_part = 'groups/single/members.php'; 809 } else { 810 $template_part = $object . '/' . $object . '-loop.php'; 811 } 812 813 $template_path = bp_locate_template( array( $template_part ), false ); 814 815 $template_path = apply_filters( 'bp_legacy_object_template_path', $template_path ); 816 817 load_template( $template_path ); 815 818 exit(); 816 819 } -
trunk/src/bp-templates/bp-nouveau/includes/ajax.php
r11686 r11821 88 88 } 89 89 90 $template_part = $object . '/' . $object . '-loop';91 92 90 // The template part can be overridden by the calling JS function. 93 if ( ! empty( $_POST['template'] ) ) { 94 $template_part = sanitize_option( 'upload_path', $_POST['template'] ); 91 if ( ! empty( $_POST['template'] ) && 'groups/single/members' === $_POST['template'] && 'group_members' === $object ) { 92 $template_part = 'groups/single/members.php'; 93 } else { 94 $template_part = $object . '/' . $object . '-loop.php'; 95 95 } 96 96 97 97 ob_start(); 98 bp_get_template_part( $template_part ); 98 99 $template_path = bp_locate_template( array( $template_part ), false ); 100 $template_path = apply_filters( 'bp_legacy_object_template_path', $template_path ); 101 102 load_template( $template_path ); 99 103 $result['contents'] = ob_get_contents(); 100 104 ob_end_clean();
Note: See TracChangeset
for help on using the changeset viewer.