403Webshell
Server IP : 65.108.144.40  /  Your IP : 216.73.217.165
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux ubuntu-8gb-hel1-1 5.15.0-173-generic #183-Ubuntu SMP Fri Mar 6 13:29:34 UTC 2026 x86_64
User : dev ( 1000)
PHP Version : 8.2.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/coopermain/wp-content/mu-plugins/stream/classes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/coopermain/wp-content/mu-plugins/stream/classes/class-alert-trigger.php
<?php
/**
 * Alert Trigger abstract class.
 *
 * @package WP_Stream
 */

namespace WP_Stream;

/**
 * Class Alert_Trigger
 *
 * @package WP_Stream
 */
abstract class Alert_Trigger {

	/**
	 * Holds instance of plugin object
	 *
	 * @var Plugin
	 */
	public $plugin;

	/**
	 * Unique identifier
	 *
	 * @var string
	 */
	public $slug;

	/**
	 * Class constructor
	 *
	 * @param Plugin $plugin Instance of plugin object.
	 */
	public function __construct( $plugin ) {
		$this->plugin = $plugin;

		add_action( 'wp_stream_alert_trigger_form_display', array( $this, 'add_fields' ), 10, 2 );
		add_action( 'wp_stream_alert_trigger_form_save', array( $this, 'save_fields' ), 10, 1 );
		add_filter( 'wp_stream_alert_trigger_check', array( $this, 'check_record' ), 10, 4 );
	}

	/**
	 * Checks if a record matches the criteria from the trigger.
	 *
	 * @filter wp_stream_alert_trigger_check
	 *
	 * @param bool  $success Status of previous checks.
	 * @param int   $record_id Record ID.
	 * @param array $recordarr Record data.
	 * @param Alert $alert The Alert being worked on.
	 * @return bool False on failure, otherwise should return original value of $success.
	 */
	abstract public function check_record ( $success, $record_id, $recordarr, $alert );

	/**
	 * Adds fields to the trigger form.
	 *
	 * @action wp_stream_alert_trigger_form_display
	 *
	 * @param Form_Generator $form The Form Object to add to.
	 * @param Alert          $alert The Alert being worked on.
	 * @return void
	 */
	abstract public function add_fields( $form, $alert );

	/**
	 * Validate and save Alert object
	 *
	 * @action wp_stream_alert_trigger_form_save
	 *
	 * @param Alert $alert The Alert being worked on.
	 * @return void
	 */
	abstract public function save_fields( $alert );

	/**
	 * Returns the trigger's value for the given alert.
	 *
	 * @param string     $context The location this data will be displayed in.
	 * @param Alert|null $alert Alert being processed.
	 * @return string
	 */
	abstract public function get_display_value( $context = 'normal', $alert = null );

	/**
	 * Allow connectors to determine if their dependencies is satisfied or not
	 *
	 * @return bool
	 */
	public function is_dependency_satisfied() {
		return true;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit