Skip to content

Commit

Permalink
fix: syntax error fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
kidunot89 committed May 17, 2024
1 parent 5b45ec8 commit 4449931
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions includes/utils/class-protected-router.php
Original file line number Diff line number Diff line change
@@ -49,7 +49,6 @@ private function __construct() {
self::$route = woographql_setting( 'authorizing_url_endpoint', apply_filters( 'woographql_authorizing_url_endpoint', self::$default_route ) );

$this->init();

}

/**
@@ -61,17 +60,17 @@ private function init() {
/**
* Create the rewrite rule for the route
*/
add_action( 'init', [ self::$instance, 'add_rewrite_rule' ], 10 );
add_action( 'init', [ $this, 'add_rewrite_rule' ], 10 );

/**
* Add the query var for the route
*/
add_filter( 'query_vars', [ self::$instance, 'add_query_var' ], 1, 1 );
add_filter( 'query_vars', [ $this, 'add_query_var' ], 1, 1 );

/**
* Redirects the route to the graphql processor
*/
add_action( 'pre_get_posts', [ self::$instance, 'resolve_request' ], 1 );
add_action( 'pre_get_posts', [ $this, 'resolve_request' ], 1 );
}

/**
@@ -196,7 +195,7 @@ public function resolve_request() {
* Remove the resolve_request function from the pre_get_posts action
* to prevent an infinite loop
*/
remove_action( 'pre_get_posts', [ self::$instance, 'resolve_request' ], 1 );
remove_action( 'pre_get_posts', [ $this, 'resolve_request' ], 1 );

/**
* Access the $wp_query object

0 comments on commit 4449931

Please sign in to comment.