HEX
Server: LiteSpeed
System: Linux premium221.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
User: madepabj (2566)
PHP: 8.3.26
Disabled: NONE
Upload Files
File: //home/madepabj/hc-cosmetics.com/wp-content/plugins/dbea-shortcodes/shortcodes/sns_counter.php
<?php
// SNS Member
add_shortcode('sns_counter', 'dbea_counter_template');
add_action('vc_after_init', 'dbea_counter_settings');
function dbea_counter_template($atts, $content = null) {
    ob_start();
    if ($template = dbea_shortcode_template('sns_counter'))
        include $template;
    return ob_get_clean();
}
function dbea_counter_settings() {
	$extra_class = dbea_extra_class();
	vc_map( array(
		"name"  => esc_html__("SNS Counter", 'dbea-shortcodes'),
		"base" => "sns_counter",
		"show_settings_on_create" => true ,
		"is_container" => false ,
		"icon" => "vc_icon_snstheme",
		"class" => "vc_icon_snstheme",
		"content_element" => true ,
		"category" => esc_html__('DBea', 'dbea-shortcodes'),
		'description' => esc_html__( 'Display box count to', 'dbea-shortcodes' ),
		"params" => array(
			array(
				"type" => "dropdown",
				"class" => "",
				"heading" => esc_html__("Use icon?","dbea-shortcodes"),
				"param_name" => "enable_icon",
				"value" => array(
					esc_html__('Icon font', 'dbea-shortcodes') => "1",
					esc_html__('Image', 'dbea-shortcodes') => "2",
					esc_html__('No', 'dbea-shortcodes') => "0"
				),
				"description" => ""
			),
			array(
				'type' => 'dropdown',
				'heading' => esc_html__( 'Icon library', 'dbea-shortcodes' ),
				'value' => array(
					esc_html__( 'Font Awesome', 'dbea-shortcodes' ) => 'fontawesome',
					esc_html__( 'Linecons', 'dbea-shortcodes' ) => 'linecons',
				),
				'param_name' => 'icon_type',
				'description' => esc_html__( 'Select icon library.', 'dbea-shortcodes' ),
				'dependency' => array(
					'element' => 'enable_icon',
					'value' => '1',
				),
			),
			array(
				'type' => 'iconpicker',
				'heading' => esc_html__( 'Icon', 'dbea-shortcodes' ),
				'param_name' => 'icon_fontawesome',
				'value' => 'fa fa-adjust', // default value to backend editor admin_label
				'settings' => array(
					'emptyIcon' => false,
					// default true, display an "EMPTY" icon?
					'iconsPerPage' => 4000,
					// default 100, how many icons per/page to display, we use (big number) to display all icons in single page
				),
				'dependency' => array(
					'element' => 'icon_type',
					'value' => 'fontawesome',
				),
				'description' => esc_html__( 'Select icon from library.', 'dbea-shortcodes' ),
			),
			array(
				'type' => 'iconpicker',
				'heading' => esc_html__( 'Icon', 'dbea-shortcodes' ),
				'param_name' => 'icon_linecons',
				'value' => 'vc_li vc_li-heart', // default value to backend editor admin_label
				'settings' => array(
					'emptyIcon' => false, // default true, display an "EMPTY" icon?
					'type' => 'linecons',
					'iconsPerPage' => 4000, // default 100, how many icons per/page to display
				),
				'dependency' => array(
					'element' => 'icon_type',
					'value' => 'linecons',
				),
				'description' => esc_html__( 'Select icon from library.', 'dbea-shortcodes' ),
			),
			array(
				"type" => "colorpicker",
				"value" => "",
				"heading" => esc_html__("Color for icon", "dbea-shortcodes"),
				"param_name" => "icon_color",
				'dependency' => array(
					'element' => 'enable_icon',
					'value' => '1',
				),
		    ),
		    array(
		      	"type" => "attach_image",
		      	"heading" => esc_html__("Icon image", "dbea-shortcodes"),
		      	"param_name" => "icon_image",
		      	'dependency' => array(
					'element' => 'enable_icon',
					'value' => '2',
			   	),
		    ),
		  //   array(
				// "type" => "colorpicker",
				// "value" => "",
				// "heading" => esc_html__("Background Color for icon image", "dbea-shortcodes"),
				// "param_name" => "bg_i_color",
				// 'dependency' => array(
				// 	'element' => 'enable_icon',
				// 	'value' => '2',
				// ),
		  //   ),
			array(
				"type" => "textfield",
				"heading" => esc_html__("Font size for icon", "dbea-shortcodes"),
				"param_name" => "icon_font_size" ,
				"description" => esc_html__("It's font-size for icon you sellected, example: 24px", "dbea-shortcodes"),
				'dependency' => array(
					'element' => 'enable_icon',
					'value' => '1',
				),
			),
	  		array(
		      	"type" => "textfield",
		      	"heading" => esc_html__("Max width for icon image", "dbea-shortcodes"),
		      	"param_name" => "icon_width",
		      	"description" => esc_html__("Example: 80px", "dbea-shortcodes"),
		      	'dependency' => array(
					'element' => 'enable_icon',
					'value' => '2',
			   	),
		    ),
		  	array(
		      "type" => "textfield",
		      "heading" => esc_html__("Value to Count", "dbea-shortcodes"),
		      "param_name" => "value" ,
			  "description" => "This value must be an integer", 
			  "admin_label" => true
		    ),
		    array(
				"type" => "colorpicker",
				"value" => "",
				"heading" => esc_html__("Color for Value", "dbea-shortcodes"),
				"param_name" => "value_color"
		    ),
			array(
				"type" => "textfield",
				"heading" => esc_html__("Font size for Value", "dbea-shortcodes"),
				"param_name" => "value_font_size" ,
				"description" => esc_html__("It's font-size for Value, example: 18px", "dbea-shortcodes")
			),
		    array(
		      "type" => "textfield",
		      "heading" => esc_html__("Unit", "dbea-shortcodes"),
		      "param_name" => "unit",
			  "description" => 'You can use any text such as % , cm or any other . Leave Blank if you do not want to display any unit value'
		    ),
		    array(
		      "type" => "textfield",
		      "heading" => esc_html__("Counter Title", "dbea-shortcodes"),
		      "param_name" => "title" ,
			  "value" => esc_html__("Your Title Goes Here...","dbea-shortcodes"),
		    ),
		    array(
				"type" => "colorpicker",
				"value" => "",
				"heading" => esc_html__("Color for Title", "dbea-shortcodes"),
				"param_name" => "title_color"
		    ),
			array(
				"type" => "textfield",
				"heading" => esc_html__("Font size for Title", "dbea-shortcodes"),
				"param_name" => "title_font_size" ,
				"description" => esc_html__("It's font-size for Title, example: 12px", "dbea-shortcodes")
			),
			array(
				"type" => "textfield",
				"heading" => esc_html__("From to count", "dbea-shortcodes"),
				"param_name" => "from" ,
				"value"		=> "0",
				"description" => esc_html__("The number the element should start at, example: 0", "dbea-shortcodes")
			),
			array(
				"type" => "textfield",
				"heading" => esc_html__("Speed to count", "dbea-shortcodes"),
				"param_name" => "speed",
				"value"		=> "900",
				"description" => esc_html__("How long it should take to count between the target numbers, example: 900", "dbea-shortcodes")
			),
			array(
				"type" => "textfield",
				"heading" => esc_html__("Interval to count", "dbea-shortcodes"),
				"param_name" => "interval",
				"value"		=> "10",
				"description" => esc_html__("How often the element should be updated, example: 10", "dbea-shortcodes")
			),
			$extra_class,
			vc_map_add_css_animation(),
	  	)

	));
}