Skip to:
Content

bbPress.org

Changeset 7980


Ignore:
Timestamp:
10/12/2026 12:32:55 AM (5 weeks ago)
Author:
johnjamesjacoby
Message:

AJAX: Use WordPress termination handlers.

Replace direct die() calls in the administration suggestion callbacks and common AJAX response helper with wp_die(). This preserves the existing response bodies while allowing custom AJAX death handlers to run.

Add regression coverage for the suggestion and JSON responses.

Merges [7979] to the 2.6 branch.

In branches/2.6, for 2.6.20.

Props immeet94.
Fixes #3363.

Location:
branches/2.6
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.6/src/includes/admin/classes/class-bbp-admin.php

    r7953 r7980  
    987987                        }
    988988                }
    989                 die();
     989                wp_die();
    990990        }
    991991
    … …  
    10671067                        }
    10681068                }
    1069                 die();
     1069                wp_die();
    10701070        }
    10711071
  • branches/2.6/src/includes/common/ajax.php

    r7661 r7980  
    156156        @header( 'Content-type: application/json' );
    157157        echo json_encode( $response );
    158         die();
     158        wp_die();
    159159}
Note: See TracChangeset for help on using the changeset viewer.