Skip to:
Content

bbPress.org


Ignore:
Timestamp:
06/13/2017 05:48:49 AM (8 years ago)
Author:
johnjamesjacoby
Message:

BuddyPress: Favorites & Subscriptions AJAX improvements

  • Pass a data attribute along with links
  • Sanitize action key when passed into AJAX action hook
  • Send a 200 response code

This commit allows favorite & subscription links to work with AJAX in BuddyPress group forums pages.

Props r-a-y. Fixes #3114

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/common/ajax.php

    r6498 r6538  
    7777    send_nosniff_header();
    7878
     79    // Everything is 200 OK.
     80    status_header( 200 );
     81
    7982    // Perform custom bbPress ajax
    80     do_action( 'bbp_ajax_' . $_REQUEST['action'] );
     83    do_action( 'bbp_ajax_' . sanitize_key( $_REQUEST['action'] ) );
    8184
    8285    // All done
Note: See TracChangeset for help on using the changeset viewer.