Skip to content

Commit

Permalink
fix: term_link filter (#1653)
Browse files Browse the repository at this point in the history
* This fixes the term_link filter callback to not modify the term link urls for GraphQL requests.

---------

Co-authored-by: John Parris <[email protected]>
  • Loading branch information
jasonbahl and mindctrl authored Jan 10, 2024
1 parent 5f78b15 commit 0aa1989
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion plugins/faustwp/includes/replacement/callbacks.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 0aa1989

Please sign in to comment.