‰PNG  IHDR 3 ( S°Âr 7iCCPsRGB IEC61966-2.1 xœ–wTSهϽ7½P’Š”ÐkhRH ½H‘.*1 JÀ "6DTpDQ‘¦2(à€£C‘±"Š…Q±ëDÔqp–Id­ß¼yïÍ›ß÷~kŸ½ÏÝgï}Öº üƒÂLX € ¡Xáçň‹g` ð l àp³³BøF™|ØŒl™ø½º ùû*Ó?ŒÁ ÿŸ”¹Y"1 P˜ŒçòøÙ\É8=Wœ%·Oɘ¶4MÎ0JÎ"Y‚2V“sò,[|ö™e9ó2„<ËsÎâeðäÜ'ã9¾Œ‘`çø¹2¾&cƒtI†@Æoä±|N6 (’Ü.æsSdl-c’(2‚-ãy àHÉ_ðÒ/XÌÏËÅÎÌZ.$§ˆ&\S†“‹áÏÏMç‹ÅÌ07#â1Ø™Yár fÏüYym²";Ø8980m-m¾(Ô]ü›’÷v–^„îDøÃöW~™ °¦eµÙú‡mi ]ëP»ý‡Í`/ в¾u}qº|^RÄâ,g+«ÜÜ\KŸk)/èïúŸC_|ÏR¾Ýïåaxó“8’t1C^7nfz¦DÄÈÎâpù 柇øþuü$¾ˆ/”ED˦L L–µ[Ȉ™B†@øŸšøÃþ¤Ù¹–‰ÚøЖX¥!@~ (* {d+Ðï} ÆGù͋љ˜ûÏ‚þ}W¸LþÈ$ŽcGD2¸QÎìšüZ4 E@ê@èÀ¶À¸ àA(ˆq`1à‚D €µ ”‚­`'¨u 4ƒ6ptcà48.Ë`ÜR0ž€)ð Ì@„…ÈR‡t CȲ…XäCP”%CBH@ë R¨ª†ê¡fè[è(tº C· Qhúz#0 ¦ÁZ°l³`O8Ž„ÁÉð28.‚·À•p|î„O×àX ?§€:¢‹0ÂFB‘x$ !«¤i@ڐ¤¹ŠH‘§È[EE1PL” Ê…⢖¡V¡6£ªQP¨>ÔUÔ(j õMFk¢ÍÑÎè t,:‹.FW ›Ðè³èô8úƒ¡cŒ1ŽL&³³³ÓŽ9…ÆŒa¦±X¬:ÖëŠ År°bl1¶ {{{;Ž}ƒ#âtp¶8_\¡8áú"ãEy‹.,ÖXœ¾øøÅ%œ%Gщ1‰-‰ï9¡œÎôÒ€¥µK§¸lî.îžoo’ïÊ/çO$¹&•'=JvMÞž<™âžR‘òTÀT ž§ú§Ö¥¾N MÛŸö)=&½=—‘˜qTH¦ û2µ3ó2‡³Ì³Š³¤Ëœ—í\6% 5eCÙ‹²»Å4ÙÏÔ€ÄD²^2šã–S“ó&7:÷Hžrž0o`¹ÙòMË'ò}ó¿^ZÁ]Ñ[ [°¶`t¥çÊúUЪ¥«zWë¯.Z=¾Æóµ„µik(´.,/|¹.f]O‘VÑš¢±õ~ë[‹ŠEÅ76¸l¨ÛˆÚ(Ø8¸iMKx%K­K+Jßoæn¾ø•ÍW•_}Ú’´e°Ì¡lÏVÌVáÖëÛÜ·(W.Ï/Û²½scGÉŽ—;—ì¼PaWQ·‹°K²KZ\Ù]ePµµê}uJõHWM{­fí¦Ú×»y»¯ìñØÓV§UWZ÷n¯`ïÍz¿úΣ†Š}˜}9û6F7öÍúº¹I£©´éÃ~á~遈}ÍŽÍÍ-š-e­p«¤uò`ÂÁËßxÓÝÆl«o§·—‡$‡›øíõÃA‡{°Ž´}gø]mµ£¤ê\Þ9Õ•Ò%íŽë>x´·Ç¥§ã{Ëï÷Ó=Vs\åx٠‰¢ŸN柜>•uêééäÓc½Kz=s­/¼oðlÐÙóç|ϝé÷ì?yÞõü± ÎŽ^d]ìºäp©sÀ~ ãû:;‡‡º/;]îž7|âŠû•ÓW½¯ž»píÒÈü‘áëQ×oÞH¸!½É»ùèVú­ç·snÏÜYs}·äžÒ½Šûš÷~4ý±]ê =>ê=:ð`Áƒ;cܱ'?eÿô~¼è!ùaÅ„ÎDó#ÛGÇ&}'/?^øxüIÖ“™§Å?+ÿ\ûÌäÙw¿xü20;5þ\ôüÓ¯›_¨¿ØÿÒîeïtØôýW¯f^—¼Qsà-ëmÿ»˜w3¹ï±ï+?˜~èùôñî§ŒOŸ~÷„óûpf* pHYs  Ê&ó? ÉIDATxœí™mh[UÇo’Û·´iWi`×b;Ym­`p Œ¬­n¢8Dh7ýà‡²‰ƒ9Q?t²f-(¢›:?±(Žiˆ:W¦‚m†…Vi‰ö…®±)KÚ4ñwºÜr“Ü›·¶YÊú‡'çí9ç>ÿsžsÎsoäp8, ŒŽŽÔÖÖv †ç)>€äK·>äòòòr¯,Ë¿¥ÒA?@`g]]‹lÓFZ—&J&“é‰P(ôªÑh<“¬ƒì÷ûwüL~ûÆÛ—LxK„<ú"‘¢ ‘³RîY„ހ̗ ëé7{<‹6­÷ø|¾»HÿÑSd ³gÏÚÀþIh«œ-C²-2¹ŠÛ’ÌUä;ää²-î·ˆiDžBŒ:z7'2ŽØ"’28¢“ˆ`þ˜˜ø¡¦¦ÆŸ ™KCCCO[­Ö%Qà’íånú…ìŽXE>Ê]ðR&9@ù+ BóÁ`Ж——wUÕ÷C’#©’áÞy$Tª®®Å®G’’ᡯ+D Ç™•>y'Fõ1ÔyÚV+8J¿ÁÈÉ>£û‰šÈ »ùùN‹ÅÒ!º¥JH…Lð™¤d`<΃c«4TÇungFÝõØŠÒÒÒëÁeY2›t°?)™âââ}$Õu¬Ê^ Õ½^ï¶²²²9¥ÂétšÚÚÚöhè>ŠØÕxÀnV2S"–¤d0ü¾ÿ«óýððp^}}ýêžÑŒÙufÉG =* ò6õ÷jèîaúfffNVVVú ò0D>[‘¤r T²‰/ BÒÍwœD!Ek~~þ†zYQ‹¤’ ¯¨¨8*\ "åé­‡tî™Ò4tSu±×…ˆÀmyin l‘ÉUl‘ÉU2^)ó"«XZZšçBÖmdÞGNdÍ¢Ìq¥¤¤dFd¸Ä \âq©ÜÓÓs²««ËLþ%Đm SÄ_„Iϱ¯æææÄE]Èv»]Äì/³„Ÿ‹žVéf<•±PDŒZÉ"‚vî\ôx<ŽªªªJ¡ÒCZV ÉA’Džþ ¹_ç!"Ì¿ ùÞ©©©1‡ÃˆLÈ*º»»---“šžž···/‹¼xù‚HT;nv,! ÛÍfs£ÎsÜøê1Vð åÊC §!Šï¾6ÌÎΖ–——Ÿ&û¤V{™¢¢¢ýR¼‹‰§.—Ëu^™1Hµ1CÙú*6KDv“ë)Å‘aYÕ¯¸bv?fµNp’LCD­w7IÇúÙ»f£ÈD޼}‘â¯äãR¿C$®'{æk\M¼|åÊÅ;eÇŸø&€K= ‰ ‰¾¸sy]£ý+Ô»áf¦ lî"³¸¸8922²«¡¡aQý•E¬äiô&#„nÕß"bÂûÝn÷›Qd8¿'!’ÖHúhpp°¿©©©‘üe•(G´ú„iPJ~â1œá>ÒWs‹pø5Ü݉—ŒY­Öõñ÷Èw5÷zŒ¥¿ßïÀà·ÈŒi "J!W6oBÆüMrˆ©•ÕWŠü÷ʪ‰h圢·)È(0™L? Xm6Û‹9EÕ^m(Ȧ"#ÐÜÜ,öÚYŸÏ÷9{ÜÞÙÙ¹‹òŸ¢íº›|¬– IEND®B`‚ AnonSec Shell
AnonSec Shell
Server IP : 20.73.19.71  /  Your IP : 10.112.20.21
Web Server : nginx/1.15.12
System : Linux a10deea3d6b7 6.8.0-1044-azure #50~22.04.1-Ubuntu SMP Wed Dec 3 15:13:22 UTC 2025 x86_64
User :  ( 1000)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/html/wp-content/plugins/bb-plugin/modules/search/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /var/www/html/wp-content/plugins/bb-plugin/modules/search/search.php
<?php

/**
 * @class FLSearchModule
 */
class FLSearchModule extends FLBuilderModule {


	/**
	 * @method __construct
	 */
	public function __construct() {
		parent::__construct(
			array(
				'name'            => __( 'Search', 'fl-builder' ),
				'description'     => __( 'Display a grid of your WordPress posts.', 'fl-builder' ),
				'category'        => __( 'Actions', 'fl-builder' ),
				'editor_export'   => false,
				'partial_refresh' => true,
				'icon'            => 'search.svg',
			)
		);

		// Actions
		add_action( 'wp_ajax_fl_search_query', array( $this, 'search_query' ) );
		add_action( 'wp_ajax_nopriv_fl_search_query', array( $this, 'search_query' ) );

		// Filters
		add_filter( 'fl_builder_loop_query_args', array( $this, 'loop_query_args' ) );
	}

	/**
	 * @method enqueue_scripts
	 */
	public function enqueue_scripts() {
		if ( $this->settings && 'button' == $this->settings->layout && 'fullscreen' == $this->settings->btn_action ) {
			$this->add_js( 'jquery-magnificpopup' );
			$this->add_css( 'font-awesome-5' );
			$this->add_css( 'jquery-magnificpopup' );
		}
	}

	/**
	 * @method search_query
	 */
	public function search_query() {
		$post_id          = isset( $_POST['post_id'] ) ? $_POST['post_id'] : false;
		$node_id          = isset( $_POST['node_id'] ) ? sanitize_text_field( $_POST['node_id'] ) : false;
		$template_id      = isset( $_POST['template_id'] ) ? sanitize_text_field( $_POST['template_id'] ) : false;
		$template_node_id = isset( $_POST['template_node_id'] ) ? sanitize_text_field( $_POST['template_node_id'] ) : false;
		$keyword          = $_POST['keyword'];
		$args             = new stdClass();
		$query            = null;
		$html             = '';

		// Get the module settings.
		if ( $template_id ) {
			$post_id  = FLBuilderModel::get_node_template_post_id( $template_id );
			$data     = FLBuilderModel::get_layout_data( 'published', $post_id );
			$module   = FLBuilderModel::get_module( $data[ $template_node_id ] );
			$settings = $data[ $template_node_id ]->settings;
		} else {
			$module   = FLBuilderModel::get_module( $node_id );
			$settings = $module->settings;
		}

		$s = stripcslashes( $keyword );
		$s = trim( $s );
		$s = preg_replace( '/\s+/', ' ', $s );

		$args->keyword     = $s;
		$args->post_type   = 'any';
		$args->post_status = 'publish';
		$args->settings    = $settings;

		// Remove paged & offset parameters
		add_filter( 'fl_builder_loop_query_args', array( $this, 'remove_pagination_args' ), 10 );

		$query = FLBuilderLoop::custom_query( $args );

		// Reset paged & offset parameters to prevent breaking other modules
		remove_filter( 'fl_builder_loop_query_args', array( $this, 'remove_pagination_args' ), 10 );

		// Setup excerpt length
		if ( $settings->show_content ) {
			global $bb_search_module_settings;
			$bb_search_module_settings = $settings;
			remove_all_filters( 'excerpt_length' );
			add_filter( 'excerpt_length', array( $this, 'excerpt_length' ), 10 );
		}

		ob_start();
		include $this->dir . '/includes/results.php';
		$html = ob_get_clean();

		remove_filter( 'excerpt_length', array( $this, 'excerpt_length' ) );
		echo $html;
		die();
	}

	public function excerpt_length( $length ) {
		global $bb_search_module_settings;
		return isset( $bb_search_module_settings->content_length ) && (int) $bb_search_module_settings->content_length > 0 ? $bb_search_module_settings->content_length : 55;
	}

	/**
	 * Removes orderby parameter to use the WP core search terms ordering.
	 *
	 * @param array $query_args The query parameters.
	 */
	public function loop_query_args( $query_args ) {
		if ( isset( $query_args['s'] ) ) {
			unset( $query_args['orderby'] );
		}

		return $query_args;
	}

	/**
	 * Remove pagination parameters
	 *
	 * @param  array $query_args Generated query args to override
	 * @return array                Updated query args
	 */
	public function remove_pagination_args( $query_args ) {
		$query_args['paged']  = 0;
		$query_args['offset'] = isset( $this->settings->offset ) ? $this->settings->offset : 0;
		return $query_args;
	}

	/**
	 *  Returns the relevant deprecated version of the photo module if the search module is deprecated.
	 *  It returns null (current version) if the search module is not deprecated.
	 *
	 * @since 2.10
	 * @method get_photo_version
	 * @return int|null
	 */
	public function get_photo_version() {
		switch ( $this->version ) {
			case 1:
				return 2;
			default:
				return null;
		}
	}

	/**
	 * Render thumbnail for a post.
	 *
	 * Gets the post ID and renders the html markup for the featured image
	 * in the desired cropped size.
	 *
	 * @param  int $id The post ID.
	 * @return void
	 */
	public function render_featured_image( $id = null ) {

		if ( isset( $this->settings->show_image ) && 1 == $this->settings->show_image ) {

			// get image source and data
			$src        = $this->_get_uncropped_url( $id );
			$photo_data = $this->_get_img_data( $id );

			// set params
			$photo_settings = array(
				'align'        => 'center',
				'link_type'    => 'url',
				'crop'         => $this->settings->crop,
				'photo'        => $photo_data,
				'photo_src'    => $src,
				'photo_source' => 'library',
				'attributes'   => array(
					'data-no-lazy' => 1,
				),
			);

			// if link id is provided, set link_url param
			if ( $id ) {
				$photo_settings['link_url'] = get_the_permalink( $id );
			}

			if ( has_post_thumbnail() ) {
				// Render image
				FLBuilder::render_module_html( 'photo', $photo_settings, $this->get_photo_version() );

			} elseif ( ! empty( $this->settings->image_fallback ) ) {
				// Render fallback
				printf(
					'<a href="%s" rel="bookmark" title="%s">%s</a>',
					get_the_permalink(),
					the_title_attribute( 'echo=0' ),
					wp_get_attachment_image( $this->settings->image_fallback, $this->settings->image_size )
				);
			}
		}
	}

	/**
	 * Full attachment image url.
	 *
	 * Gets a post ID and returns the url for the 'full' size of the attachment
	 * set as featured image.
	 *
	 * @param  int $id The post ID.
	 * @return string    The featured image url for the 'full' size.
	 */
	protected function _get_uncropped_url( $id ) {
		$thumb_id = get_post_thumbnail_id( $id );
		$size     = isset( $this->settings->image_size ) ? $this->settings->image_size : 'medium';
		$img      = wp_get_attachment_image_src( $thumb_id, $size );
		return is_array( $img ) ? $img[0] : '';
	}

	/**
	 * Get the featured image data.
	 *
	 * Gets a post ID and returns an array containing the featured image data.
	 *
	 * @param  int $id The post ID.
	 * @return array    The image data.
	 */
	protected function _get_img_data( $id ) {
		$thumb_id = get_post_thumbnail_id( $id );

		return FLBuilderPhoto::get_attachment_data( $thumb_id );
	}

	public function get_object_taxonomies() {
	}

	public function get_post_types() {
		return FLBuilderLoop::post_types();
	}

	public function get_form_source_slug() {

		return $this->settings->source;
	}

	public function get_form_classes() {
		$classname = 'fl-search-form';

		if ( ! empty( $this->settings->layout ) ) {
			$classname .= ' fl-search-form-' . $this->settings->layout;

			if ( 'button' == $this->settings->layout ) {
				$classname .= ' fl-search-button-' . $this->settings->btn_action;
				$classname .= ' fl-search-button-' . $this->settings->btn_align;

				if ( 'expand' == $this->settings->btn_action ) {
					$classname .= ' fl-search-button-expand-' . $this->settings->expand_position;
				}
			}
		}

		if ( ! empty( $this->settings->width ) ) {
			$classname .= ' fl-search-form-width-' . $this->settings->width;
		}

		if ( ! empty( $this->settings->form_align ) && 'full' != $this->settings->width ) {
			$classname .= ' fl-search-form-' . $this->settings->form_align;
		}

		return $classname;
	}

	/**
	 * Returns an array of settings used to render a button module.
	 *
	 * @return array
	 */
	public function get_button_settings() {
		$settings = array(
			'width'        => 'auto',
			'click_action' => 'button',
		);

		foreach ( $this->settings as $key => $value ) {
			if ( strstr( $key, 'btn_' ) ) {
				$key              = str_replace( 'btn_', '', $key );
				$settings[ $key ] = $value;
			}
		}

		if ( empty( $settings['btn_text'] ) ) {
			$settings['label_text'] = __( 'Search', 'fl-builder' );
		}

		return $settings;
	}

	/**
	 * Returns the relevant deprecated version of the button module if the search module is deprecated.
	 * It returns null (current version) if the search module is not deprecated.
	 *
	 * @since 2.10
	 * @method get_button_version
	 * @return integer|null
	 */
	public function get_button_version() {
		switch ( $this->version ) {
			case 1:
				return 2;
			default:
				return 2;  // Temporary lock on this version only until further changes are ready for the next version
		}
	}

	/**
	 * Renders button.
	 */
	public function render_button() {
		if ( 'input' != $this->settings->layout ) {
			FLBuilder::render_module_html( 'button', $this->get_button_settings(), $this->get_button_version() );
		}
	}
}

/**
 * Register the module and its form settings.
 */
FLBuilder::register_module('FLSearchModule', array(
	'layout'  => array(
		'title'    => __( 'Layout', 'fl-builder' ),
		'sections' => array(
			'general'     => array(
				'title'  => '',
				'fields' => array(
					'layout'          => array(
						'type'    => 'select',
						'label'   => __( 'Layout', 'fl-builder' ),
						'default' => 'inline',
						'options' => array(
							'input'   => __( 'Input Text Only', 'fl-builder' ),
							'inline'  => __( 'Inline', 'fl-builder' ),
							'button'  => __( 'Button Only', 'fl-builder' ),
							'stacked' => __( 'Stacked', 'fl-builder' ),

							//  TODO:
							// 'combine' => __( 'Combine', 'fl-builder' ),
						),
						'toggle'  => array(
							'input'   => array(
								'fields'   => array( 'placeholder' ),
								'sections' => array( 'form_style' ),
							),
							'inline'  => array(
								'fields'   => array( 'placeholder', 'btn_text' ),
								'sections' => array( 'button_icon', 'form_style', 'button_style', 'button_icon_color' ),
							),
							'stacked' => array(
								'fields'   => array( 'placeholder', 'btn_text', 'btn_align', 'btn_width' ),
								'sections' => array( 'button_icon', 'form_style', 'button_style', 'button_icon_color' ),
							),
							// 'combine' => array(
							//  'fields'   => array( 'placeholder', 'btn_text' ),
							//  'sections' => array( 'form_style', 'button_style' ),
							// ),
							'button'  => array(
								'fields'   => array( 'placeholder', 'btn_action', 'btn_text', 'btn_align', 'btn_width' ),
								'sections' => array( 'button_icon', 'button_style', 'form_style', 'button_icon_color' ),
							),
						),
					),
					'placeholder'     => array(
						'type'    => 'text',
						'label'   => __( 'Placeholder Text', 'fl-builder' ),
						'default' => __( 'Search...', 'fl-builder' ),
						'preview' => array(
							'type'      => 'attribute',
							'attribute' => 'placeholder',
							'selector'  => '.fl-search-text',
						),
					),
					'btn_text'        => array(
						'type'    => 'text',
						'label'   => __( 'Button Text', 'fl-builder' ),
						'default' => __( 'Search', 'fl-builder' ),
						'preview' => array(
							'type'     => 'text',
							'selector' => '.fl-button-text',
						),
					),
					'btn_action'      => array(
						'type'    => 'select',
						'label'   => __( 'Action', 'fl-builder' ),
						'default' => 'expand',
						'options' => array(
							'expand'     => __( 'Expand on click', 'fl-builder' ),
							'fullscreen' => __( 'Full Screen', 'fl-builder' ),

							// TODO:
							// 'reveal'     => __( 'Reveal', 'fl-builder' ),
						),
						'toggle'  => array(
							'expand'     => array(
								'fields' => array( 'expand_position' ),
							),
							'fullscreen' => array(
								'sections' => array( 'fullscreen_style' ),
							),
						),
						'preview' => array(
							'type' => 'none',
						),

					),
					'expand_position' => array(
						'type'    => 'select',
						'label'   => __( 'Expand Position', 'fl-builder' ),
						'default' => 'left',
						'options' => array(
							'left'  => __( 'Left', 'fl-builder' ),
							'right' => __( 'Right', 'fl-builder' ),
						),
						'preview' => array(
							'type' => 'none',
						),
					),
				),
			),
			'button_icon' => array(
				'title'  => __( 'Button Icon', 'fl-builder' ),
				'fields' => array(
					'btn_icon'          => array(
						'type'        => 'icon',
						'label'       => __( 'Icon', 'fl-builder' ),
						'show_remove' => true,
						'show'        => array(
							'fields'   => array( 'btn_icon_position' ),
							'sections' => array( 'button_icon_color' ),
						),
					),
					'btn_duo_color1'    => array(
						'label'       => __( 'DuoTone Primary Color', 'fl-builder' ),
						'type'        => 'color',
						'connections' => array( 'color' ),
						'default'     => '',
						'show_reset'  => true,
						'show_alpha'  => true,
						'preview'     => array(
							'type'      => 'css',
							'selector'  => '.fl-button-icon.fad:before',
							'property'  => 'color',
							'important' => true,
						),
					),
					'btn_duo_color2'    => array(
						'label'       => __( 'DuoTone Secondary Color', 'fl-builder' ),
						'type'        => 'color',
						'connections' => array( 'color' ),
						'default'     => '',
						'show_reset'  => true,
						'show_alpha'  => true,
						'preview'     => array(
							'type'      => 'css',
							'selector'  => '.fl-button-icon.fad:after',
							'property'  => 'color',
							'important' => true,
						),
					),
					'btn_icon_position' => array(
						'type'    => 'select',
						'label'   => __( 'Icon Position', 'fl-builder' ),
						'default' => 'before',
						'options' => array(
							'before' => __( 'Before Text', 'fl-builder' ),
							'after'  => __( 'After Text', 'fl-builder' ),
						),
					),
				),
			),
		),
	),
	'style'   => array(
		'title'    => __( 'Style', 'fl-builder' ),
		'sections' => array(
			'general_style'     => array(
				'title'  => '',
				'fields' => array(
					'width'               => array(
						'type'    => 'select',
						'label'   => __( 'Width', 'fl-builder' ),
						'default' => 'full',
						'options' => array(
							'auto'   => _x( 'Auto', 'Width.', 'fl-builder' ),
							'full'   => __( 'Full Width', 'fl-builder' ),
							'custom' => __( 'Custom', 'fl-builder' ),
						),
						'toggle'  => array(
							'auto'   => array(
								'fields' => array( 'form_align' ),
							),
							'full'   => array(),
							'custom' => array(
								'fields' => array( 'form_align', 'custom_width' ),
							),
						),
					),
					'custom_width'        => array(
						'type'     => 'unit',
						'label'    => __( 'Custom Width', 'fl-builder' ),
						'default'  => '1100',
						'sanitize' => 'absint',
						'units'    => array( 'px', '%' ),
						'slider'   => array(
							'min'  => 0,
							'max'  => 1100,
							'step' => 10,
						),
						'help'     => __( 'The max width of the search form container.', 'fl-builder' ),
						'preview'  => array(
							'type'     => 'css',
							'selector' => '{node} .fl-search-form-wrap',
							'property' => 'width',
						),
					),
					'form_height'         => array(
						'type'       => 'unit',
						'label'      => __( 'Height', 'fl-builder' ),
						'default'    => '0',
						'responsive' => true,
						'sanitize'   => 'absint',
						'units'      => array(
							'px',
							'vw',
							'vh',
						),
						'slider'     => array(
							'max'  => 600,
							'step' => 10,
						),
						'help'       => __( 'This setting is the minimum height of the form. Content will expand the height automatically.', 'fl-builder' ),
						'preview'    => array(
							'type'      => 'css',
							'selector'  => '{node} .fl-search-form-wrap',
							'property'  => 'min-height',
							'important' => true,
						),
					),
					'form_align'          => array(
						'type'       => 'align',
						'label'      => __( 'Alignment', 'fl-builder' ),
						'default'    => 'center',
						'responsive' => true,
						'preview'    => array(
							'type'     => 'css',
							'selector' => '.fl-search-form',
							'property' => 'text-align',
						),
					),
					'form_bg_color'       => array(
						'type'        => 'color',
						'label'       => __( 'Background Color', 'fl-builder' ),
						'show_reset'  => true,
						'show_alpha'  => true,
						'connections' => array( 'color' ),
						'preview'     => array(
							'type'     => 'css',
							'selector' => '{node}.fl-module-search .fl-search-form-wrap',
							'property' => 'background-color',
						),
					),
					'form_bg_hover_color' => array(
						'type'        => 'color',
						'label'       => __( 'Background Hover Color', 'fl-builder' ),
						'default'     => '',
						'show_reset'  => true,
						'show_alpha'  => true,
						'connections' => array( 'color' ),
						'preview'     => array(
							'type' => 'none',
						),
					),
					'form_border'         => array(
						'type'    => 'border',
						'label'   => __( 'Border', 'fl-builder' ),
						'preview' => array(
							'type'      => 'css',
							'selector'  => '{node}.fl-module-search .fl-search-form-wrap',
							'important' => true,
						),
					),
					'form_border_hover'   => array(
						'type'    => 'border',
						'label'   => __( 'Border Hover', 'fl-builder' ),
						'preview' => array(
							'type' => 'none',
						),
					),
					'form_padding'        => array(
						'type'       => 'dimension',
						'label'      => __( 'Padding', 'fl-builder' ),
						'default'    => '10',
						'responsive' => true,
						'slider'     => true,
						'units'      => array( 'px' ),
						'preview'    => array(
							'type'     => 'css',
							'selector' => '{node}.fl-module-search .fl-search-form-wrap',
							'property' => 'padding',
						),
					),
				),
			),
			'input_style'       => array(
				'title'  => __( 'Input Text', 'fl-builder' ),
				'fields' => array(
					'input_color'          => array(
						'type'        => 'color',
						'label'       => __( 'Color', 'fl-builder' ),
						'show_reset'  => true,
						'show_alpha'  => true,
						'connections' => array( 'color' ),
						'preview'     => array(
							'type'     => 'css',
							'selector' => '{node}.fl-module-search .fl-search-text, {node}.fl-module-search .fl-search-text::placeholder',
							'property' => 'color',
						),
					),
					'input_hover_color'    => array(
						'type'        => 'color',
						'label'       => __( 'Hover Color', 'fl-builder' ),
						'show_reset'  => true,
						'show_alpha'  => true,
						'connections' => array( 'color' ),
						'preview'     => array(
							'type'     => 'css',
							'selector' => '{node}.fl-module-search .fl-search-text:hover, {node}.fl-module-search .fl-search-text:focus, {node}.fl-module-search .fl-search-text:hover::placeholder, {node}.fl-module-search .fl-search-text:focus::placeholder',
							'property' => 'color',
						),
					),
					'input_bg_color'       => array(
						'type'        => 'color',
						'label'       => __( 'Background Color', 'fl-builder' ),
						'show_reset'  => true,
						'show_alpha'  => true,
						'connections' => array( 'color' ),
						'preview'     => array(
							'type'     => 'css',
							'selector' => '{node}.fl-module-search .fl-search-text',
							'property' => 'background-color',
						),
					),
					'input_bg_hover_color' => array(
						'type'        => 'color',
						'label'       => __( 'Background Hover Color', 'fl-builder' ),
						'show_reset'  => true,
						'show_alpha'  => true,
						'connections' => array( 'color' ),
						'preview'     => array(
							'type'     => 'css',
							'selector' => '{node}.fl-module-search .fl-search-text:hover, {node}.fl-module-search .fl-search-text:focus',
							'property' => 'background-color',
						),
					),
					'input_typography'     => array(
						'type'       => 'typography',
						'label'      => __( 'Typography', 'fl-builder' ),
						'responsive' => true,
						'preview'    => array(
							'type'      => 'css',
							'selector'  => '{node}.fl-module-search .fl-search-text',
							'important' => true,
						),
					),
					'input_border'         => array(
						'type'    => 'border',
						'label'   => __( 'Border', 'fl-builder' ),
						'preview' => array(
							'type'      => 'css',
							'selector'  => '{node}.fl-module-search .fl-search-text',
							'important' => true,
						),
					),
					'input_border_hover'   => array(
						'type'    => 'border',
						'label'   => __( 'Border Hover', 'fl-builder' ),
						'preview' => array(
							'type' => 'none',
						),
					),
					'input_padding'        => array(
						'type'       => 'dimension',
						'label'      => __( 'Padding', 'fl-builder' ),
						'default'    => '12',
						'responsive' => true,
						'slider'     => true,
						'units'      => array( 'px' ),
						'preview'    => array(
							'type'     => 'css',
							'selector' => '{node}.fl-module-search .fl-search-text',
							'property' => 'padding',
						),
					),
				),
			),
			'button_style'      => array(
				'title'  => 'Button',
				'fields' => array(
					'btn_align'            => array(
						'type'    => 'align',
						'label'   => __( 'Alignment', 'fl-builder' ),
						'default' => 'center',
						'preview' => array(
							'type' => 'none',
						),
					),
					'btn_width'            => array(
						'type'    => 'select',
						'label'   => __( 'Width', 'fl-builder' ),
						'default' => 'auto',
						'options' => array(
							'auto'   => _x( 'Auto', 'Width.', 'fl-builder' ),
							'custom' => __( 'Custom', 'fl-builder' ),
						),
						'toggle'  => array(
							'auto'   => array(
								'fields' => array( 'btn_align' ),
							),
							'full'   => array(),
							'custom' => array(
								'fields' => array( 'btn_align', 'btn_custom_width' ),
							),
						),
					),
					'btn_custom_width'     => array(
						'type'    => 'unit',
						'label'   => __( 'Custom Width', 'fl-builder' ),
						'default' => '200',
						'slider'  => array(
							'px' => array(
								'min'  => 0,
								'max'  => 1000,
								'step' => 10,
							),
						),
						'units'   => array(
							'px',
							'vw',
							'%',
						),
						'preview' => array(
							'type'     => 'css',
							'selector' => '.fl-button:is(a, button)',
							'property' => 'width',
						),
					),
					'btn_padding'          => array(
						'type'       => 'dimension',
						'label'      => __( 'Padding', 'fl-builder' ),
						'responsive' => true,
						'slider'     => true,
						'units'      => array( 'px' ),
						'preview'    => array(
							'type'     => 'css',
							'selector' => '.fl-button:is(a, button), .fl-form-field input[type=search]',
							'property' => 'padding',
						),
					),
					'btn_text_color'       => array(
						'type'        => 'color',
						'connections' => array( 'color' ),
						'label'       => __( 'Text Color', 'fl-builder' ),
						'default'     => '',
						'show_reset'  => true,
						'show_alpha'  => true,
						'preview'     => array(
							'type'      => 'css',
							'selector'  => '.fl-button:is(a, button), .fl-button:is(a, button) *',
							'property'  => 'color',
							'important' => true,
						),
					),
					'btn_text_hover_color' => array(
						'type'        => 'color',
						'connections' => array( 'color' ),
						'label'       => __( 'Text Hover Color', 'fl-builder' ),
						'default'     => '',
						'show_reset'  => true,
						'show_alpha'  => true,
						'preview'     => array(
							'type' => 'none',
						),
					),
					'btn_typography'       => array(
						'type'       => 'typography',
						'label'      => __( 'Typography', 'fl-builder' ),
						'responsive' => true,
						'preview'    => array(
							'type'     => 'css',
							'selector' => '.fl-button:is(a, button)',
							// 'important' => true,
						),
					),
					'btn_bg_color'         => array(
						'type'        => 'color',
						'connections' => array( 'color' ),
						'label'       => __( 'Button Background Color', 'fl-builder' ),
						'default'     => '',
						'show_reset'  => true,
						'show_alpha'  => true,
						'preview'     => array(
							'type' => 'none',
						),
					),
					'btn_bg_hover_color'   => array(
						'type'        => 'color',
						'connections' => array( 'color' ),
						'label'       => __( 'Button Background Hover Color', 'fl-builder' ),
						'default'     => '',
						'show_reset'  => true,
						'show_alpha'  => true,
						'preview'     => array(
							'type' => 'none',
						),
					),
					'btn_style'            => array(
						'type'    => 'select',
						'label'   => __( 'Button Background Style', 'fl-builder' ),
						'default' => 'flat',
						'options' => array(
							'flat'     => __( 'Flat', 'fl-builder' ),
							'gradient' => __( 'Gradient', 'fl-builder' ),
						),
					),
					'btn_border'           => array(
						'type'       => 'border',
						'label'      => __( 'Border', 'fl-builder' ),
						'responsive' => true,
						'preview'    => array(
							'type'      => 'css',
							'selector'  => '{node}.fl-module-search .fl-button:is(a, button)',
							'important' => true,
						),
					),
					'btn_border_hover'     => array(
						'type'       => 'border',
						'label'      => __( 'Border Hover', 'fl-builder' ),
						'responsive' => true,
						'preview'    => array(
							'type' => 'none',
						),
					),
				),
			),
			'button_icon_color' => array(
				'title'  => 'Button Icon Colors',
				'fields' => array(
					'btn_icon_color'       => array(
						'type'        => 'color',
						'connections' => array( 'color' ),
						'default'     => '',
						'label'       => __( 'Icon Color', 'fl-builder' ),
						'show_reset'  => true,
						'show_alpha'  => true,
						'preview'     => array(
							'type'      => 'css',
							'property'  => 'color',
							'selector'  => 'i.fl-button-icon.fas:before',
							'important' => true,
						),
					),
					'btn_icon_color_hover' => array(
						'type'        => 'color',
						'connections' => array( 'color' ),
						'label'       => __( 'Icon Hover Color', 'fl-builder' ),
						'show_reset'  => true,
						'show_alpha'  => true,
						'preview'     => array(
							'type' => 'none',
						),
					),
				),
			),
			'fullscreen_style'  => array(
				'title'  => 'Fullscreen',
				'fields' => array(
					'fs_input_width'  => array(
						'type'     => 'unit',
						'label'    => __( 'Input Width', 'fl-builder' ),
						'default'  => '600',
						'sanitize' => 'absint',
						'units'    => array( 'px', '%' ),
						'slider'   => array(
							'min'  => 0,
							'max'  => 1100,
							'step' => 10,
						),
						'help'     => __( 'The max width of the input field inside the lightbox.', 'fl-builder' ),
						'preview'  => array(
							'type' => 'none',
						),
					),
					'fs_overlay_bg'   => array(
						'type'        => 'color',
						'label'       => __( 'Overlay Background Color', 'fl-builder' ),
						'show_reset'  => true,
						'show_alpha'  => true,
						'connections' => array( 'color' ),
						'preview'     => array(
							'type' => 'none',
						),
					),
					'fs_close_button' => array(
						'type'    => 'select',
						'label'   => __( 'Close Button', 'fl-builder' ),
						'default' => 'show',
						'options' => array(
							'hide' => __( 'Hide', 'fl-builder' ),
							'show' => __( 'Show', 'fl-builder' ),
						),
						'preview' => array(
							'type' => 'none',
						),
					),
				),
			),
		),
	),
	'content' => array(
		'title'    => __( 'Content', 'fl-builder' ),
		'sections' => array(
			'general'     => array(
				'title'  => '',
				'fields' => array(
					'result' => array(
						'type'    => 'select',
						'label'   => __( 'Results', 'fl-builder' ),
						'default' => 'redirect',
						'options' => array(
							'redirect' => __( 'Redirect to search page', 'fl-builder' ),
							'ajax'     => __( 'Display results below via Ajax', 'fl-builder' ),
						),
						'toggle'  => array(
							'ajax' => array(
								'sections' => array( 'ajax_result' ),
							),
						),
						'preview' => array(
							'type' => 'none',
						),
					),
				),
			),
			'ajax_result' => array(
				'title'  => __( 'Ajax Result', 'fl-builder' ),
				'fields' => array(
					'result_width'        => array(
						'type'    => 'select',
						'label'   => __( 'Width', 'fl-builder' ),
						'default' => 'full',
						'options' => array(
							'full'   => __( 'Full Width', 'fl-builder' ),
							'custom' => __( 'Custom', 'fl-builder' ),
						),
						'toggle'  => array(
							'full'   => array(),
							'custom' => array(
								'fields' => array( 'custom_result_width' ),
							),
						),
						'preview' => array(
							'type' => 'none',
						),
					),
					'custom_result_width' => array(
						'type'     => 'unit',
						'label'    => __( 'Custom Width', 'fl-builder' ),
						'default'  => '1100',
						'sanitize' => 'absint',
						'units'    => array( 'px', '%' ),
						'slider'   => array(
							'min'  => 0,
							'max'  => 1100,
							'step' => 10,
						),
						'help'     => __( 'The max width of the ajax result container.', 'fl-builder' ),
						'preview'  => array(
							'type' => 'none',
						),
					),
					'show_image'          => array(
						'type'    => 'select',
						'label'   => __( 'Featured Image', 'fl-builder' ),
						'default' => '1',
						'options' => array(
							'1' => __( 'Show', 'fl-builder' ),
							'0' => __( 'Hide', 'fl-builder' ),
						),
						'toggle'  => array(
							'1' => array(
								'fields' => array( 'image_size', 'crop', 'image_fallback' ),
							),
						),
						'preview' => array(
							'type' => 'none',
						),
					),
					'image_size'          => array(
						'type'    => 'photo-sizes',
						'label'   => __( 'Size', 'fl-builder' ),
						'default' => 'medium',
						'preview' => array(
							'type' => 'none',
						),
					),
					'crop'                => array(
						'type'    => 'select',
						'label'   => __( 'Crop', 'fl-builder' ),
						'default' => 'landscape',
						'options' => array(
							''       => _x( 'None', 'Photo Crop.', 'fl-builder' ),
							'square' => __( 'Square', 'fl-builder' ),
							'circle' => __( 'Circle', 'fl-builder' ),
						),
						'preview' => array(
							'type' => 'none',
						),
					),
					'image_fallback'      => array(
						'default'     => '',
						'type'        => 'photo',
						'show_remove' => true,
						'label'       => __( 'Fallback Image', 'fl-builder' ),
						'preview'     => array(
							'type' => 'none',
						),
					),
					'show_content'        => array(
						'type'    => 'select',
						'label'   => __( 'Content', 'fl-builder' ),
						'default' => '0',
						'options' => array(
							'1' => __( 'Show', 'fl-builder' ),
							'0' => __( 'Hide', 'fl-builder' ),
						),
						'toggle'  => array(
							'1' => array(
								'fields' => array( 'content_length' ),
							),
						),
						'preview' => array(
							'type' => 'none',
						),
					),
					'content_length'      => array(
						'type'        => 'text',
						'label'       => __( 'Content Length (Words)', 'fl-builder' ),
						'default'     => '55',
						'placeholder' => '55',
						'sanitize'    => 'absint',
						'preview'     => array(
							'type' => 'none',
						),
					),
					'no_results_message'  => array(
						'type'    => 'textarea',
						'label'   => __( 'No Results Message', 'fl-builder' ),
						'default' => __( "Sorry, we couldn't find any posts. Please try a different search.", 'fl-builder' ),
						'rows'    => 6,
						'preview' => array(
							'type' => 'none',
						),
					),
				),
			),
		),
	),
));

FLBuilder::register_module_deprecations( 'search', [
	// Register module version (v1) to deprecate the old rendered photo module HTML markup.
	'v1' => [],
] );

Anon7 - 2022
AnonSec Team