Skip to content

Instantly share code, notes, and snippets.

@jack-arturo
Created May 9, 2026 02:21
Show Gist options
  • Select an option

  • Save jack-arturo/d66b40ffb1a4b30232490d0a02fd2cc1 to your computer and use it in GitHub Desktop.

Select an option

Save jack-arturo/d66b40ffb1a4b30232490d0a02fd2cc1 to your computer and use it in GitHub Desktop.
fen-pause-links.php
<?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