Created
May 9, 2026 02:21
-
-
Save jack-arturo/d66b40ffb1a4b30232490d0a02fd2cc1 to your computer and use it in GitHub Desktop.
fen-pause-links.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| public function handle_pause_notification() { | |
| if ( ! isset( $_REQUEST['fen_action'] ) ) { | |
| return; | |
| } | |
| $type = isset( $_REQUEST['type'] ) ? sanitize_text_field( $_REQUEST['type'] ) : 'all'; | |
| $file = sanitize_text_field( urldecode( $_REQUEST['file'] ) ); | |
| $line = isset( $_REQUEST['line'] ) ? intval( $_REQUEST['line'] ) : 0; | |
| $hash = md5( $type . $file . $line ); | |
| $paused_notifications = $this->get( 'paused_notifications', array() ); | |
| $paused_notifications[ $hash ] = array( | |
| 'type' => $type, | |
| 'file' => $file, | |
| 'line' => $line, | |
| ); | |
| $this->set( 'paused_notifications', $paused_notifications ); | |
| if ( ! is_user_logged_in() ) { | |
| wp_die( 'Notification paused.', 'Fatal Error Notify', array( 'response' => 200 ) ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment