Uname:Linux Sandbox-A 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64

Base Dir : /var/www/html

User : gavin


403WebShell
403Webshell
Server IP : 68.183.124.220  /  Your IP : 216.73.216.141
Web Server : Apache/2.4.18 (Ubuntu)
System : Linux Sandbox-A 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64
User : gavin ( 1000)
PHP Version : 7.0.33-0ubuntu0.16.04.16
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/wp-content/plugins/google-site-kit/includes/Core/Notifications/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/wp-content/plugins/google-site-kit/includes/Core/Notifications/Notification.php
<?php
/**
 * Class Google\Site_Kit\Core\Notifications\Notification
 *
 * @package   Google\Site_Kit\Core\Notifications
 * @copyright 2021 Google LLC
 * @license   https://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
 * @link      https://sitekit.withgoogle.com
 */

namespace Google\Site_Kit\Core\Notifications;

/**
 * Class for representing a notification.
 *
 * @since 1.4.0
 * @access private
 * @ignore
 */
class Notification {
	/**
	 * Unique notification slug.
	 *
	 * @since 1.4.0
	 * @var string
	 */
	private $slug;

	/**
	 * Notification arguments.
	 *
	 * @since 1.4.0
	 * @var array
	 */
	private $args;

	/**
	 * Constructor.
	 *
	 * @since 1.4.0
	 *
	 * @param string $slug Unique notification slug.
	 * @param array  $args {
	 *     Associative array of notification arguments.
	 *
	 *     @type string $title            Required notification title.
	 *     @type string $content          Required notification content. May contain inline HTML tags.
	 *     @type string $cta_url          Call to action URL.
	 *     @type string $cta_label        Call to action anchor text.
	 *     @type string $cta_target       Call to action anchor target.
	 *     @type string $learn_more_url   Learn more URL.
	 *     @type string $learn_more_label Learn more anchor text.
	 *     @type bool   $dismissible      Whether the notice should be dismissible. Default false.
	 *     @type string $dismiss_label    Dismiss anchor text.
	 * }
	 */
	public function __construct( $slug, array $args ) {
		$this->slug = (string) $slug;
		$this->args = array_merge(
			array(
				'title'            => '',
				'content'          => '',
				'cta_url'          => '',
				'cta_label'        => '',
				'cta_target'       => '',
				'learn_more_url'   => '',
				'learn_more_label' => '',
				'dismissible'      => false,
				'dismiss_label'    => __( 'Dismiss', 'google-site-kit' ),
			),
			$args
		);
	}

	/**
	 * Gets the notification's slug.
	 *
	 * @since 1.4.0
	 *
	 * @return string Unique notification slug.
	 */
	public function get_slug() {
		return $this->slug;
	}

	/**
	 * Prepares the JS representation of the Notification.
	 *
	 * @since 1.4.0
	 *
	 * @return array
	 */
	public function prepare_for_js() {
		return array(
			'id'             => $this->get_slug(),
			'title'          => $this->args['title'],
			'content'        => $this->args['content'],
			'ctaURL'         => $this->args['cta_url'],
			'ctaLabel'       => $this->args['cta_label'],
			'ctaTarget'      => $this->args['cta_target'],
			'learnMoreURL'   => $this->args['learn_more_url'],
			'learnMoreLabel' => $this->args['learn_more_label'],
			'dismissible'    => $this->args['dismissible'],
			'dismissLabel'   => $this->args['dismiss_label'],
		);
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit