From 0aa19897aaf41cf8aaad1614b4050c8f4174b7cd Mon Sep 17 00:00:00 2001 From: Jason Bahl Date: Wed, 10 Jan 2024 07:13:28 -0700 Subject: [PATCH] fix: term_link filter (#1653) * This fixes the term_link filter callback to not modify the term link urls for GraphQL requests. --------- Co-authored-by: John Parris --- plugins/faustwp/includes/replacement/callbacks.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/faustwp/includes/replacement/callbacks.php b/plugins/faustwp/includes/replacement/callbacks.php index 6f72e8857..d288fa3ed 100644 --- a/plugins/faustwp/includes/replacement/callbacks.php +++ b/plugins/faustwp/includes/replacement/callbacks.php @@ -279,7 +279,10 @@ function post_link( $link ) { * @return string */ function term_link( $term_link ) { - if ( ! is_rewrites_enabled() ) { + if ( + ! is_rewrites_enabled() + || ( function_exists( 'is_graphql_request' ) && is_graphql_request() ) + ) { return $term_link; }