Skip to:
Content

BuddyPress.org

Ticket #8288: 8288.01.patch

File 8288.01.patch, 4.2 KB (added by r-a-y, 4 years ago)
  • src/bp-groups/bp-groups-template.php

     
    43584358        }
    43594359
    43604360        $template_names = array(
    4361                 'groups/single/front-id-'     . sanitize_file_name( $group->id )    . '.php',
     4361                'groups/single/front-id-'     . (int) $group->id . '.php',
    43624362                'groups/single/front-slug-'   . sanitize_file_name( $group->slug )   . '.php',
    43634363        );
    43644364
  • src/bp-groups/classes/class-bp-groups-theme-compat.php

     
    223223                 * @param array $value Array of default template files to use.
    224224                 */
    225225                $new_templates = apply_filters( 'bp_template_hierarchy_groups_single_item', array(
    226                         'groups/single/index-id-'     . sanitize_file_name( bp_get_current_group_id() )   . '.php',
     226                        'groups/single/index-id-'     . (int) bp_get_current_group_id()                   . '.php',
    227227                        'groups/single/index-slug-'   . sanitize_file_name( bp_get_current_group_slug() ) . '.php',
    228228                        'groups/single/index-action-' . sanitize_file_name( bp_current_action() )         . '.php',
    229229                        'groups/single/index-status-' . sanitize_file_name( $group->status )              . '.php',
  • src/bp-members/bp-members-template.php

     
    14231423
    14241424        // Init the hierarchy
    14251425        $template_names = array(
    1426                 'members/single/front-id-' . sanitize_file_name( $displayed_user->id ) . '.php',
     1426                'members/single/front-id-' . (int) $displayed_user->id . '.php',
    14271427                'members/single/front-nicename-' . sanitize_file_name( $displayed_user->userdata->user_nicename ) . '.php',
    14281428        );
    14291429
  • src/bp-members/classes/class-bp-members-theme-compat.php

     
    170170                 * @param array $value Array of template paths to add to hierarchy.
    171171                 */
    172172                $new_templates = apply_filters( 'bp_template_hierarchy_members_single_item', array(
    173                         'members/single/index-id-'        . sanitize_file_name( bp_displayed_user_id() ) . '.php',
     173                        'members/single/index-id-'        . (int) bp_displayed_user_id()                . '.php',
    174174                        'members/single/index-nicename-'  . sanitize_file_name( $user_nicename )         . '.php',
    175175                        'members/single/index-action-'    . sanitize_file_name( bp_current_action() )    . '.php',
    176176                        'members/single/index-component-' . sanitize_file_name( bp_current_component() ) . '.php',
  • src/bp-templates/bp-nouveau/includes/groups/functions.php

     
    940940        // Use a global to avoid requesting the hierarchy for each template
    941941        if ( ! isset( $bp_nouveau->groups->current_group_hierarchy ) ) {
    942942                $bp_nouveau->groups->current_group_hierarchy = array(
    943                         'groups/single/%s-id-' . sanitize_file_name( $current_group->id ) . '.php',
     943                        'groups/single/%s-id-' . (int) $current_group->id                    . '.php',
    944944                        'groups/single/%s-slug-' . sanitize_file_name( $current_group->slug ) . '.php',
    945945                );
    946946
  • src/bp-templates/bp-nouveau/includes/members/functions.php

     
    264264        // Use a global to avoid requesting the hierarchy for each template
    265265        if ( ! isset( $bp_nouveau->members->displayed_user_hierarchy ) ) {
    266266                $bp_nouveau->members->displayed_user_hierarchy = array(
    267                         'members/single/%s-id-' . sanitize_file_name( $displayed_user->id ) . '.php',
     267                        'members/single/%s-id-' . (int) $displayed_user->id . '.php',
    268268                        'members/single/%s-nicename-' . sanitize_file_name( $displayed_user->userdata->user_nicename ) . '.php',
    269269                );
    270270