Title: REST request detection
Last modified: August 24, 2021

---

# REST request detection

 *  [kaggdesign](https://wordpress.org/support/users/kaggdesign/)
 * (@kaggdesign)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/rest-request-detection/)
 * Thank you for the great theme!
 * Please fix the detection of REST requests for the case with plain permalinks 
   in `\Kadence_Blocks_Frontend::is_rest`. Discussion with the author of the code
   is here: [https://gist.github.com/matzeeable/dfd82239f48c2fedef25141e48c8dc30#gistcomment-3870434](https://gist.github.com/matzeeable/dfd82239f48c2fedef25141e48c8dc30#gistcomment-3870434)
 * Instead of
 *     ```
       		if ( ( defined( 'REST_REQUEST' ) && REST_REQUEST ) || ( isset( $_GET['rest_route'] ) && strpos( trim( $_GET['rest_route'], '\\/' ), $prefix, 0 ) === 0 ) ) {
       ```
   
 * you should use
 *     ```
       		if ( ( defined( 'REST_REQUEST' ) && REST_REQUEST ) || ( isset( $_GET['rest_route'] ) ) ) {
       ```
   

Viewing 1 replies (of 1 total)

 *  [Ben Ritner – Kadence WP](https://wordpress.org/support/users/britner/)
 * (@britner)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/rest-request-detection/#post-14801400)
 * Hi,
    Thanks for posting. This is part of Kadence Blocks and I’ll make sure that
   gets updated in the next Kadence Blocks Version.
 * Ben

Viewing 1 replies (of 1 total)

The topic ‘REST request detection’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/kadence/1.5.0/screenshot.png)
 * Kadence
 * [Support Threads](https://wordpress.org/support/theme/kadence/)
 * [Active Topics](https://wordpress.org/support/theme/kadence/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/kadence/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/kadence/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Ben Ritner – Kadence WP](https://wordpress.org/support/users/britner/)
 * Last activity: [4 years, 9 months ago](https://wordpress.org/support/topic/rest-request-detection/#post-14801400)
 * Status: not resolved