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_grid_items.php
<?php
// SNS Carousel
add_shortcode('sns_grid_items', 'dbea_grid_items_template');
add_action('vc_after_init', 'dbea_grid_item_settings');
function dbea_grid_items_template($atts, $content = null) {
    ob_start();
    if ($template = dbea_shortcode_template('sns_grid_items'))
        include $template;
    return ob_get_clean();
}
function dbea_grid_item_settings() {
	//Your "container" content element should extend WPBakeryShortCodesContainer class to inherit all required functionality
	if ( class_exists( 'WPBakeryShortCodesContainer' ) ) {
    	class WPBakeryShortCode_SNS_Grid_Items extends WPBakeryShortCodesContainer {}
    }
	$extra_class = dbea_extra_class();
	$css_animation = dbea_css_animation();
	if ( function_exists('vc_map') ) vc_map( array(
		"name"  => esc_html__("SNS Grid Items", 'dbea-shortcodes'),
		"base" => "sns_grid_items",
		"icon" => "vc_icon_snstheme",
		"class" => "vc_icon_snstheme",
		"content_element" => true ,
		"category" => esc_html__('DBea', 'dbea-shortcodes'),
		"description" => esc_html__( 'A grid contain items', 'dbea-shortcodes' ),
		"as_parent" => array('except' => 'sns_grid_items'),
	    // "content_element" => true,
	    // "show_settings_on_create" => true,
	    // "is_container" => true,
	    "js_view" => 'VcColumnView',
		"params" => array(
			array(
				"type" => "textfield",
				"class" => "",
				"heading" => esc_html__("Number column/row on Desktop",'dbea-shortcodes'),
				"param_name" => "n_desktop",
				"value" => esc_html__("1",'dbea-shortcodes'),
			),
			array(
				"type" => "textfield",
				"class" => "",
				"heading" => esc_html__("Number column/row on Tablet Landscape",'dbea-shortcodes'),
				"param_name" => "n_tablet",
				"value" => esc_html__("1",'dbea-shortcodes'),
			),
			array(
				"type" => "textfield",
				"heading" => esc_html__("Number column/row on Tablet Portrait",'dbea-shortcodes'),
				"param_name" => "n_tabletp",
				"admin_label" => true,
				"value" =>  esc_html__("1", 'dbea-shortcodes'),
			),
			array(
				"type" => "textfield",
				"class" => "",
				"heading" => esc_html__("Number column/row on Mobile Landscape",'dbea-shortcodes'),
				"param_name" => "n_mobile_l",
				"value" => esc_html__("1",'dbea-shortcodes'),
			),
			array(
				"type" => "textfield",
				"class" => "",
				"heading" => esc_html__("Number column/row on Mobile Portrait",'dbea-shortcodes'),
				"param_name" => "n_mobile_p",
				"value" => esc_html__("1",'dbea-shortcodes'),
			),
			$extra_class,
			vc_map_add_css_animation(),
		)
	) );
}