403Webshell
Server IP : 89.108.64.180  /  Your IP : 216.73.217.92
Web Server : Apache/2.4.41 (Ubuntu)
System : Linux 89-108-64-180.cloudvps.regruhosting.ru 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User : www-root ( 1010)
PHP Version : 8.0.30
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,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 : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/www-root/data/www/apartadler.ru/wp-content/plugins/stm-configurations/helpers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/www-root/data/www/apartadler.ru/wp-content/plugins/stm-configurations/helpers/includes.php
<?php
/*CF7 Workaround*/
if (function_exists('wpcf7_add_form_tag')) {
	remove_action( 'wpcf7_init', 'wpcf7_add_shortcode_submit', 20 );
	add_action( 'after_setup_theme', 'wpcf7_add_shortcode_submit_button' );

	function wpcf7_add_shortcode_submit_button() {
		wpcf7_add_form_tag( 'submit', 'wpcf7_submit_button_shortcode_handler' );
	}

	function wpcf7_submit_button_shortcode_handler( $tag ) {
		$tag = new WPCF7_FormTag( $tag );

		$class = wpcf7_form_controls_class( $tag->type );

		$atts = array();

		$atts['class'] = $tag->get_class_option( $class );
		$atts['id'] = $tag->get_id_option();
		$atts['tabindex'] = $tag->get_option( 'tabindex', 'int', true );

		$value = isset( $tag->values[0] ) ? $tag->values[0] : '';

		if ( empty( $value ) )
			$value = __( 'Send', 'stm_theme_text_domain' );

		$atts['type'] = 'submit';

		$atts = wpcf7_format_atts( $atts );

		$html = sprintf( '<button %1$s>%2$s</button>', $atts, $value );

		return $html;
	}
}

function stm_conf_build_form($fields) {

	foreach ($fields as $key => $field) {
		$field['wrapper_class'] = isset($field['wrapper_class']) ? $field['wrapper_class'] : array();
		$field['class'] = isset($field['class']) ? $field['class'] : array();
		$field['placeholder'] = isset($field['placeholder']) ? $field['placeholder'] : '';
		$field['name'] = isset($field['name']) ? $field['name'] : '';
		$field['label'] = isset($field['label']) ? $field['label'] : '';
		$field['required'] = isset($field['required']) && $field['required'] ? 'required' : '';
		$field['label_position'] = isset($field['label_position']) ? $field['label_position'] : 'before';
		$is_label_before = !empty($field['label']) && $field['label_position'] === 'before';
		$is_label_after = !empty($field['label']) && $field['label_position'] === 'after';

		$key = uniqid();

		?>
		<div
			class="form-group <?php echo esc_attr(implode(' ', $field['wrapper_class'])); ?>">

			<?php if ($field['type'] === 'radio') :
				foreach ($field['value'] as $radio_key => $value) {
					?>
					<?php if ($is_label_before) : ?>
						<label
							for="donation_form_field_<?php echo esc_attr($radio_key) ?>"><?php echo esc_html($field['label'][$radio_key]) ?></label>
					<?php endif; ?>
					<input type="radio"
						   id="donation_form_field_<?php echo esc_attr($radio_key) ?>"
						   name="<?php echo esc_attr($field['name']) ?>"
						   class="form-control <?php echo esc_attr(implode(' ', $field['class'])) ?>"
						   value="<?php echo esc_attr($field['value'][$radio_key]); ?>">
					<?php if ($is_label_after) : ?>
						<label
							for="donation_form_field_<?php echo esc_attr($radio_key) ?>"><?php echo esc_html($field['label'][$radio_key]) ?></label>
					<?php endif; ?>
					<?php
				}
				?>
			<?php elseif ($field['type'] === 'textarea') : ?>
				<?php if ($is_label_before) : ?>
					<label
						for="donation_form_field_<?php echo esc_attr($key) ?>"><?php echo esc_html($field['label']) ?></label>
				<?php endif; ?>
				<textarea name="<?php echo esc_attr($field['name']) ?>"
						  class="form-control <?php echo esc_attr(implode(' ', $field['class'])) ?>"
						  id="donation_form_field_<?php echo esc_attr($key) ?>"></textarea>
				<?php if ($is_label_after) : ?>
					<label
						for="donation_form_field_<?php echo esc_attr($key) ?>"><?php echo esc_html($field['label']) ?></label>
				<?php endif; ?>

			<?php elseif ($field['type'] === 'submit') : ?>

				<?php if ($is_label_before) : ?>
					<label
						for="donation_form_field_<?php echo esc_attr($key) ?>"><?php echo esc_html($field['label']) ?></label>
				<?php endif; ?>
				<button type="<?php echo esc_attr($field['type']) ?>"
						id="donation_form_field_<?php echo esc_attr($key) ?>"
						class="<?php echo esc_attr(implode(' ', $field['class'])) ?>"
					<?php echo esc_attr($field['required']) ?>>

					<?php if (!empty($field['value'])) : ?>
						<?php echo esc_attr($field['value']) ?>
					<?php endif; ?>
					<span class="preloader"></span>
				</button>
				<?php if ($is_label_after) : ?>
					<label
						for="donation_form_field_<?php echo esc_attr($key) ?>"><?php echo esc_html($field['label']) ?></label>
				<?php endif; ?>

			<?php else : ?>

				<?php if ($is_label_before) : ?>
					<label
						for="donation_form_field_<?php echo esc_attr($key) ?>"><?php echo esc_html($field['label']) ?></label>
				<?php endif; ?>
				<input type="<?php echo esc_attr($field['type']) ?>"
					   id="donation_form_field_<?php echo esc_attr($key) ?>"
					   name="<?php echo esc_attr($field['name']) ?>"
					<?php if (!empty($field['value'])) : ?>
						value="<?php echo esc_attr($field['value']) ?>"
					<?php endif; ?>

					<?php if (!empty($field['placeholder'])) : ?>
						placeholder="<?php echo esc_attr($field['placeholder']) ?>"
					<?php endif; ?>
					   class="form-control <?php echo esc_attr(implode(' ', $field['class'])) ?>"
					<?php echo esc_attr($field['required']) ?>>
				<?php if ($is_label_after) : ?>
					<label
						for="donation_form_field_<?php echo esc_attr($key) ?>"><?php echo esc_html($field['label']) ?></label>
				<?php endif; ?>
			<?php endif; ?>
		</div>
		<?php
	}
}

function stm_wp_head()
{
    $variables = array (
        'stm_ajax_add_zipped_font' => wp_create_nonce('stm_ajax_add_zipped_font'),
        'stm_icons_load' => wp_create_nonce('stm_icons_load'),
    );
    ?>
    <script>
        window.stm_data = <?php echo json_encode( $variables ); ?>;
    </script>
    <?php
}

add_action('wp_head', 'stm_wp_head');
add_action('admin_head', 'stm_wp_head');

Youez - 2016 - github.com/yon3zu
LinuXploit