Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/21/2012 05:26:22 PM (12 years ago)
Author:
djpaul
Message:

Resolve problems with load order when handling AJAX requests in BuddyPress. Fixes #2599 and #3985, props DJPaul and boonebgorges.

  • Reworks BP-Default's AJAX calls to use correct receiver in WordPress.
  • Hooks BP-Default's AJAX handlers to both 'wp_ajax_nopriv_' and 'wp_ajax'.
  • Updates associated parts in BP core to support this, and deprecates old handling.
  • Renames Activity spam/unspam AJAX actions (new to BP 1.6).
  • Adds full PHPDoc to ajax.php.
  • Code standards pass of ajax.php.
  • Remove unnecessary globals.
  • Backwards compatible with themes based on versions of BP-Default earlier 1.6.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-cssjs.php

    r5996 r6003  
    130130 * Adds AJAX target URL so themes can access the WordPress AJAX functionality.
    131131 *
    132  * @package BuddyPress Core
     132 * @since 1.1
    133133 */
    134134function bp_core_add_ajax_url_js() {
    135135?>
    136136
    137     <script type="text/javascript">var ajaxurl = "<?php echo site_url( 'wp-load.php' ); ?>";</script>
     137    <script type="text/javascript">var ajaxurl = '<?php echo admin_url( 'admin-ajax.php' ); ?>';</script>
    138138
    139139<?php
Note: See TracChangeset for help on using the changeset viewer.