HEX
Server: Apache/2.4.65 (Debian)
System: Linux kubikelcreative 5.10.0-35-amd64 #1 SMP Debian 5.10.237-1 (2025-05-19) x86_64
User: www-data (33)
PHP: 8.4.13
Disabled: NONE
Upload Files
File: /var/www/indoadvisory/wp/wp-content/plugins/polylang-pro/include/functions.php
<?php
/**
 * @package Polylang
 */

/**
 * Tells if the given REST request is in the edit context.
 *
 * @since 3.5
 *
 * @param WP_REST_Request $request A REST request.
 * @return bool
 */
function pll_is_edit_rest_request( WP_REST_Request $request ): bool {
	if ( in_array( $request->get_method(), array( 'PATCH', 'POST', 'PUT' ), true ) ) {
		return true;
	}

	return 'GET' === $request->get_method() && 'edit' === $request->get_param( 'context' );
}