Your IP : 216.73.216.162


Current Path : /home/x/b/o/xbodynamge/namtation/wp-content/
Upload File :
Current File : /home/x/b/o/xbodynamge/namtation/wp-content/EmailReports.php.tar

home/xbodynamge/dev/wp-content/plugins/all-in-one-seo-pack/app/Common/EmailReports/EmailReports.php000064400000004222151137520270027361 0ustar00<?php

namespace AIOSEO\Plugin\Common\EmailReports;

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

use AIOSEO\Plugin\Common\Models;

/**
 * EmailReports class.
 *
 * @since 4.7.2
 */
class EmailReports {
	/**
	 * Mail object.
	 *
	 * @since 4.7.2
	 *
	 * @var Mail
	 */
	public $mail = null;

	/**
	 * Summary object.
	 *
	 * @since 4.7.2
	 *
	 * @var Summary\Summary
	 */
	public $summary;

	/**
	 * Class constructor.
	 *
	 * @since 4.7.2
	 */
	public function __construct() {
		$this->mail    = new Mail();
		$this->summary = new Summary\Summary();

		add_action( 'aioseo_email_reports_enable_reminder', [ $this, 'enableReminder' ] );
	}

	/**
	 * Enable reminder.
	 *
	 * @since 4.7.7
	 *
	 * @return void
	 */
	public function enableReminder() {
		// User already enabled email reports.
		if ( aioseo()->options->advanced->emailSummary->enable ) {
			return;
		}

		// Check if notification exists.
		$notification = Models\Notification::getNotificationByName( 'email-reports-enable-reminder' );
		if ( $notification->exists() ) {
			return;
		}

		// Add notification.
		Models\Notification::addNotification( [
			'slug'              => uniqid(),
			'notification_name' => 'email-reports-enable-reminder',
			'title'             => __( 'Email Reports', 'all-in-one-seo-pack' ),
			'content'           => __( 'Stay ahead in SEO with our new email digest! Get the latest tips, trends, and tools delivered right to your inbox, helping you optimize smarter and faster. Enable it today and never miss an update that can take your rankings to the next level.', 'all-in-one-seo-pack' ), // phpcs:ignore Generic.Files.LineLength.MaxExceeded
			'type'              => 'info',
			'level'             => [ 'all' ],
			'button1_label'     => __( 'Enable Email Reports', 'all-in-one-seo-pack' ),
			'button1_action'    => 'https://route#aioseo-settings&aioseo-scroll=aioseo-email-summary-row&aioseo-highlight=aioseo-email-summary-row:advanced',
			'button2_label'     => __( 'All Good, I\'m already getting it', 'all-in-one-seo-pack' ),
			'button2_action'    => 'http://action#notification/email-reports-enable',
			'start'             => gmdate( 'Y-m-d H:i:s' )
		] );
	}
}xbodynamge/namtation/wp-content/plugins/all-in-one-seo-pack/app/Common/EmailReports/EmailReports.php000064400000004222151144470510030515 0ustar00home<?php

namespace AIOSEO\Plugin\Common\EmailReports;

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

use AIOSEO\Plugin\Common\Models;

/**
 * EmailReports class.
 *
 * @since 4.7.2
 */
class EmailReports {
	/**
	 * Mail object.
	 *
	 * @since 4.7.2
	 *
	 * @var Mail
	 */
	public $mail = null;

	/**
	 * Summary object.
	 *
	 * @since 4.7.2
	 *
	 * @var Summary\Summary
	 */
	public $summary;

	/**
	 * Class constructor.
	 *
	 * @since 4.7.2
	 */
	public function __construct() {
		$this->mail    = new Mail();
		$this->summary = new Summary\Summary();

		add_action( 'aioseo_email_reports_enable_reminder', [ $this, 'enableReminder' ] );
	}

	/**
	 * Enable reminder.
	 *
	 * @since 4.7.7
	 *
	 * @return void
	 */
	public function enableReminder() {
		// User already enabled email reports.
		if ( aioseo()->options->advanced->emailSummary->enable ) {
			return;
		}

		// Check if notification exists.
		$notification = Models\Notification::getNotificationByName( 'email-reports-enable-reminder' );
		if ( $notification->exists() ) {
			return;
		}

		// Add notification.
		Models\Notification::addNotification( [
			'slug'              => uniqid(),
			'notification_name' => 'email-reports-enable-reminder',
			'title'             => __( 'Email Reports', 'all-in-one-seo-pack' ),
			'content'           => __( 'Stay ahead in SEO with our new email digest! Get the latest tips, trends, and tools delivered right to your inbox, helping you optimize smarter and faster. Enable it today and never miss an update that can take your rankings to the next level.', 'all-in-one-seo-pack' ), // phpcs:ignore Generic.Files.LineLength.MaxExceeded
			'type'              => 'info',
			'level'             => [ 'all' ],
			'button1_label'     => __( 'Enable Email Reports', 'all-in-one-seo-pack' ),
			'button1_action'    => 'https://route#aioseo-settings&aioseo-scroll=aioseo-email-summary-row&aioseo-highlight=aioseo-email-summary-row:advanced',
			'button2_label'     => __( 'All Good, I\'m already getting it', 'all-in-one-seo-pack' ),
			'button2_action'    => 'http://action#notification/email-reports-enable',
			'start'             => gmdate( 'Y-m-d H:i:s' )
		] );
	}
}