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_single_post.php
<?php
// SNS List Post
add_shortcode('sns_single_post', 'dbea_single_post_template');
add_action('vc_after_init', 'dbea_single_post_settings');
function dbea_single_post_template($atts, $content = null) {
    ob_start();
    if ($template = dbea_shortcode_template('sns_single_post'))
        include $template;
    return ob_get_clean();
}
function dbea_single_post_settings() {
	$extra_class = dbea_extra_class();
	add_filter( 'vc_autocomplete_sns_single_post_sp_callback', 'vc_include_field_search', 10, 1 ); // Get suggestion(find). Must return an array
	add_filter( 'vc_autocomplete_sns_single_post_sp_render', 'vc_include_field_render', 10, 1 ); // Render exact product. Must return an array (label,value)
	vc_map( array(
	"name" => esc_html__("SNS Single Post",'dbea-shortcodes'),
	"base" => "sns_single_post",
	"icon" => "sns_icon_listposts",
	"class" => "sns_listposts",
	"category" => esc_html__("DBea",'dbea-shortcodes'),
	"description" => esc_html__( "Show single post", 'dbea-shortcodes' ),
		"params" => array(
			array(
				'type' => 'autocomplete',
				'heading' => __( 'Select post', 'dbea-shortcodes' ),
				'param_name' => 'sp',
				'description' => __( 'Select posts, pages, etc. by title.', 'dbea-shortcodes' ),
				'settings' => array(
					'multiple' => false,
				),
			),
			array(
		      "type" => "attach_image",
		      "heading" => esc_html__("Want use custom image for that post above?", 'dbea-shortcodes'),
		      "param_name" => "custom_img",
		      "admin_label" => true,
		    ),
			vc_map_add_css_animation(),
			$extra_class,
		)
	) );
}