Skip to:
Content

BuddyPress.org

Ticket #8396: 8396.patch

File 8396.patch, 1.1 KB (added by imath, 2 years ago)
  • src/bp-templates/bp-nouveau/js/buddypress-nouveau.js

    diff --git src/bp-templates/bp-nouveau/js/buddypress-nouveau.js src/bp-templates/bp-nouveau/js/buddypress-nouveau.js
    index 37e74ff66..935cf9c97 100644
    window.bp = window.bp || {}; 
    661661                                return false;
    662662                        }
    663663
    664                         // Find the required wpnonce string.
    665                         // if  button element set we'll have our nonce set on a data attr
    666                         // Check the value & if exists split the string to obtain the nonce string
    667                         // if no value, i.e false, null then the href attr is used.
    668                         if ( nonceUrl ) {
    669                                 nonce = nonceUrl.split('?_wpnonce=');
    670                                 nonce = nonce[1];
    671                         } else {
    672                                 nonce = self.getLinkParams( target.prop( 'href' ), '_wpnonce' );
     664                        // If the nonceUrl is not set, use the `href` attribute.
     665                        if ( ! nonceUrl ) {
     666                                nonceUrl = target.prop( 'href' );
    673667                        }
    674668
     669                        // Set the nonce.
     670                        nonce = self.getLinkParams( nonceUrl, '_wpnonce' );
     671
    675672                        // Unfortunately unlike groups
    676673                        // Friends actions does not match the wpnonce
    677674                        var friends_actions_map = {