Skip to:
Content

BuddyPress.org

Ticket #8311: 8311.patch

File 8311.patch, 6.5 KB (added by imath, 4 years ago)
  • src/bp-blogs/classes/class-bp-blogs-component.php

    diff --git src/bp-blogs/classes/class-bp-blogs-component.php src/bp-blogs/classes/class-bp-blogs-component.php
    index 787ce402e..9ad5e6d1f 100644
    class BP_Blogs_Component extends BP_Component { 
    224224                        sprintf(
    225225                                '<span class="%s">%s</span>',
    226226                                esc_attr( $class ),
    227                                 bp_core_number_format( $count )
     227                                esc_html( $count )
    228228                        )
    229229                );
    230230                $main_nav = array(
  • src/bp-friends/bp-friends-filters.php

    diff --git src/bp-friends/bp-friends-filters.php src/bp-friends/bp-friends-filters.php
    index 24ecea0ea..edcbcdef4 100644
     
    1010// Exit if accessed directly.
    1111defined( 'ABSPATH' ) || exit;
    1212
     13// Format numerical output.
     14add_filter( 'friends_get_total_friend_count', 'bp_core_number_format' );
     15add_filter( 'bp_get_total_friend_count',      'bp_core_number_format' );
     16
    1317/**
    1418 * Filter BP_User_Query::populate_extras to add confirmed friendship status.
    1519 *
  • src/bp-friends/bp-friends-template.php

    diff --git src/bp-friends/bp-friends-template.php src/bp-friends/bp-friends-template.php
    index 851c1508b..98efc47ec 100644
    function bp_total_friend_count( $user_id = 0 ) { 
    649649                 */
    650650                return apply_filters( 'bp_get_total_friend_count', friends_get_total_friend_count( $user_id ), $user_id );
    651651        }
    652         add_filter( 'bp_get_total_friend_count', 'bp_core_number_format' );
    653652
    654653/**
    655654 * Output the total friendship request count for a given user.
  • src/bp-friends/classes/class-bp-friends-component.php

    diff --git src/bp-friends/classes/class-bp-friends-component.php src/bp-friends/classes/class-bp-friends-component.php
    index cd54427e4..d29f416dd 100644
    class BP_Friends_Component extends BP_Component { 
    176176                        sprintf(
    177177                                '<span class="%s">%s</span>',
    178178                                esc_attr( $class ),
    179                                 bp_core_number_format( $count )
     179                                esc_html( $count )
    180180                        )
    181181                );
    182182
  • src/bp-notifications/bp-notifications-filters.php

    diff --git src/bp-notifications/bp-notifications-filters.php src/bp-notifications/bp-notifications-filters.php
    index e9fee111b..9e496c2e2 100644
     
    11<?php
    22/**
    3  * Filters related to the Activity component.
     3 * Filters related to the Notifications component.
    44 *
    55 * @package BuddyPress
    66 * @subpackage Notifications
    77 * @since 4.0.0
    88 */
    99
     10
     11// Format numerical output.
     12add_filter( 'bp_notifications_get_total_notification_count', 'bp_core_number_format' );
     13
    1014// Privacy data export.
    1115add_filter( 'wp_privacy_personal_data_exporters', 'bp_register_notifications_personal_data_exporter' );
    1216
  • src/bp-notifications/classes/class-bp-notifications-component.php

    diff --git src/bp-notifications/classes/class-bp-notifications-component.php src/bp-notifications/classes/class-bp-notifications-component.php
    index 4333d8b30..36dc11037 100644
    class BP_Notifications_Component extends BP_Component { 
    164164                                sprintf(
    165165                                        '<span class="%s">%s</span>',
    166166                                        esc_attr( $class ),
    167                                         bp_core_number_format( $count )
     167                                        esc_html( $count )
    168168                                )
    169169                        );
    170170                } else {
  • src/bp-templates/bp-nouveau/includes/blogs/loader.php

    diff --git src/bp-templates/bp-nouveau/includes/blogs/loader.php src/bp-templates/bp-nouveau/includes/blogs/loader.php
    index ed626af1f..7baa058df 100644
     
    33 * BP Nouveau Blogs
    44 *
    55 * @since 3.0.0
     6 * @version 6.1.0
    67 */
    78
    89// Exit if accessed directly.
    class BP_Nouveau_Blogs { 
    8889
    8990                        // Add controls into the Blogs sections of the customizer.
    9091                        add_filter( 'bp_nouveau_customizer_controls', 'bp_nouveau_blogs_customizer_controls', 11, 1 );
     92
     93                        // The number formatting is done into the `bp_nouveau_nav_count()` template tag.
     94                        remove_filter( 'bp_get_total_blog_count_for_user', 'bp_core_number_format' );
    9195                }
    9296        }
    9397}
  • src/bp-templates/bp-nouveau/includes/friends/loader.php

    diff --git src/bp-templates/bp-nouveau/includes/friends/loader.php src/bp-templates/bp-nouveau/includes/friends/loader.php
    index d09eab050..ad4a4f07f 100644
     
    33 * BP Nouveau Friends
    44 *
    55 * @since 3.0.0
    6  * @version 3.0.0
     6 * @version 6.1.0
    77 */
    88
    99// Exit if accessed directly.
    class BP_Nouveau_Friends { 
    8787                foreach ( $buttons as $button ) {
    8888                        add_filter( 'bp_button_' . $button, 'bp_nouveau_ajax_button', 10, 5 );
    8989                }
     90
     91                // The number formatting is done into the `bp_nouveau_nav_count()` template tag.
     92                remove_filter( 'friends_get_total_friend_count', 'bp_core_number_format' );
     93                remove_filter( 'bp_get_total_friend_count',      'bp_core_number_format' );
    9094        }
    9195
    9296        /**
  • src/bp-templates/bp-nouveau/includes/groups/loader.php

    diff --git src/bp-templates/bp-nouveau/includes/groups/loader.php src/bp-templates/bp-nouveau/includes/groups/loader.php
    index e76db63f0..5623fd555 100644
     
    33 * BP Nouveau Groups
    44 *
    55 * @since 3.0.0
    6  * @version 6.0.0
     6 * @version 6.1.0
    77 */
    88
    99// Exit if accessed directly.
    class BP_Nouveau_Groups { 
    133133
    134134                // The number formatting is done into the `bp_nouveau_nav_count()` template tag.
    135135                remove_filter( 'bp_get_total_group_count', 'bp_core_number_format' );
     136                remove_filter( 'bp_get_total_group_count_for_user', 'bp_core_number_format' );
    136137        }
    137138
    138139        /**
  • src/bp-templates/bp-nouveau/includes/notifications/loader.php

    diff --git src/bp-templates/bp-nouveau/includes/notifications/loader.php src/bp-templates/bp-nouveau/includes/notifications/loader.php
    index 90e8215c7..c8cd319d0 100644
     
    33 * BP Nouveau Notifications
    44 *
    55 * @since 3.0.0
    6  * @version 3.0.0
     6 * @version 6.1.0
    77 */
    88
    99// Exit if accessed directly.
    class BP_Nouveau_Notifications { 
    8787                add_filter( 'bp_get_the_notification_mark_unread_link', 'bp_nouveau_notifications_mark_unread_link', 10, 1 );
    8888                add_filter( 'bp_get_the_notification_mark_read_link', 'bp_nouveau_notifications_mark_read_link', 10, 1 );
    8989                add_filter( 'bp_get_the_notification_delete_link', 'bp_nouveau_notifications_delete_link', 10, 1 );
     90
     91                // The number formatting is done into the `bp_nouveau_nav_count()` template tag.
     92                remove_filter( 'bp_notifications_get_total_notification_count', 'bp_core_number_format' );
    9093        }
    9194}
    9295