HEX
Server: Apache
System: Linux webd006.cluster128.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: zwafgyp (177615)
PHP: 7.4.33
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/zwafgyp/locationdebateau/wp-content/plugins/buddypress/bp-core/js/bp-api-request.js
/**
 * jQuery.ajax wrapper for BP REST API requests.
 *
 * @since  5.0.0
 * @deprecated 10.0.0
 * @output bp-core/js/bp-api-request.js
 */
/* global bpApiSettings */
window.bp = window.bp || {};

( function( wp, bp ) {
    // Bail if not set.
    if ( typeof bpApiSettings === 'undefined' ) {
        return;
    }

    bp.isRestEnabled = true;

    // Polyfill wp.apiRequest.
    bp.apiRequest = function( options ) {
		window.console.log( bpApiSettings.deprecatedWarning );

        var bpRequest;

        if ( ! options.dataType ) {
            options.dataType = 'json';
        }

        bpRequest = wp.apiRequest( options );

        return bpRequest.then( null, function( result ) {
            var errorObject = {
                code: 'unexpected_error',
                message: bpApiSettings.unexpectedError,
                data: {
                    status: 404
                }
            };

            if ( result && result.responseJSON ) {
                errorObject = result.responseJSON;
            }

            return errorObject;
        } );
    };

} )( window.wp || {}, window.bp );