Skip to:
Content

BuddyPress.org

Ticket #8716: 8716.patch

File 8716.patch, 995 bytes (added by imath, 3 years ago)
  • src/bp-templates/bp-nouveau/includes/classes/class-bp-buttons-group.php

    diff --git src/bp-templates/bp-nouveau/includes/classes/class-bp-buttons-group.php src/bp-templates/bp-nouveau/includes/classes/class-bp-buttons-group.php
    index be429fdaa..a6c13e745 100644
    class BP_Buttons_Group { 
    125125         * @param array $args Optional. See the __constructor for a description of this argument.
    126126         */
    127127        public function update( $args = array() ) {
     128                $button_group = array();
     129
     130                if ( is_array( $this->group ) ) {
     131                        $button_group = $this->group;
     132                }
     133
     134                // If the cached button group args contains a key that is missing from args, remove it.
     135                $diff = array_diff_key( $button_group, $args );
     136                if ( $diff ) {
     137                        $this->group = array_intersect_key( $button_group, $args );
     138                }
     139
    128140                foreach ( $args as $id => $params ) {
    129141                        if ( isset( $this->group[ $id ] ) ) {
    130142                                $this->group[ $id ] = bp_parse_args(