Skip to content

Commit

Permalink
Restore login intercept hook with a filter (#97)
Browse files Browse the repository at this point in the history
* Restore login intercept hook with a filter

* Add changeset
  • Loading branch information
irshadahmad21 authored Feb 14, 2024
1 parent 9fb4fa8 commit 5b53b10
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/quiet-melons-chew.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"wptelegram-login": patch
---

Restored the login request intercept hook to `init`
4 changes: 3 additions & 1 deletion plugins/wptelegram-login/src/includes/Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,9 @@ private function define_shared_hooks() {

$login_handler = LoginHandler::instance();

add_action( 'parse_query', [ $login_handler, 'telegram_login' ] );
list( $login_intercept_hook, $priority ) = apply_filters( 'wptelegram_login_intercept_request_on', [ 'init', 5 ] );

add_action( $login_intercept_hook, [ $login_handler, 'telegram_login' ], $priority );

$asset_manager = $this->asset_manager();

Expand Down

0 comments on commit 5b53b10

Please sign in to comment.