MOON
Server: Apache
System: Linux server.netcommlabs.in 3.10.0-1160.83.1.el7.x86_64 #1 SMP Wed Jan 25 16:41:43 UTC 2023 x86_64
User: dermova (1051)
PHP: 5.4.45
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/dermova/public_html/india/wp-content/plugins/rit-core/inc/shortcode/rit_services.php
<?php
/**
 * The Shortcode Services
 */
function rit_services_shortcode( $atts) {
    $atts = shortcode_atts(
        array(
            'icon_image'    =>'',
            'icon_fa'       => 'fa-umbrella',
            'title'         => 'Free delivery worldwide',
            'btn_names'     => 'Read More',
            'url_link'      => '#',
            'des'           =>''
        ), $atts );

    ob_start(); ?>
    <div class="widget widget-services">
        <div class="widget-content widget-services-content clearfix">
            <div class="icon pull-left">
                <?php
                $icon    = wp_get_attachment_image_src( $atts['icon_image'], array( 32, 26 ) );
                if ( !empty( $icon ) && isset($icon)) {
                    $url_link = $icon[0];
                    echo '<img class="icon-image" src="'.$url_link .'" alt="icon"> ';
                }
                else{
                    echo '<i class="fa '.$atts['icon_fa'].'"></i>';
                }
                ?>
            </div>
            <div class="services-content">
                <div class="title">
                    <h3 class="title-service"><?php echo esc_html($atts['title']);?></h3>
                </div>
                <div class="des-services"><p><?php echo $atts['des'];?></p></div>
                <div class="button-services">
                    <a href="<?php esc_url($atts['url_link']); ?>"><?php echo $atts['btn_names'];?></a>
                    <i class="fa fa-caret-right"></i>
                </div>

            </div>
        </div>
    </div>
    <!-- /.services -->

    <?php
    $output = ob_get_contents();
    ob_end_clean();

    return $output;
}

add_shortcode( 'rit_services', 'rit_services_shortcode' );

/**
 * The VC Functions
 */
function rit_services_shortcode_vc() {

    vc_map(
        array(
            'icon'     => 'rit-vc-services',
            'name'     => __( 'RIT - Services', RIT_TEXT_DOMAIN ),
            'base'     => 'rit_services',
            'category' => __( 'RIT', RIT_TEXT_DOMAIN ),
            'params'   => array(
                array(
                    'type'        => 'attach_image',
                    'heading'     => __( 'Icon Image(size default :32x26 )', RIT_TEXT_DOMAIN ),
                    'param_name'  => 'icon_image',
                    'description' => __( 'Select images from media library.', RIT_TEXT_DOMAIN ),
                    'value'      => ''
                ),
                array(
                    'type'       => 'textfield',
                    'heading'    => __( 'Icon ', RIT_TEXT_DOMAIN ),
                    'param_name' => 'icon_fa',
                    'value'      => 'fa-umbrella',
                    'description' => __( 'Select icon from http://fortawesome.github.io', RIT_TEXT_DOMAIN )
                ),
                array(
                    'type'       => 'textfield',
                    'heading'    => __( 'Title', RIT_TEXT_DOMAIN ),
                    'param_name' => 'title',
                    'value'      => 'Free delivery worldwide',
                ),
                array(
                    'type'       => 'textfield',
                    'heading'    => __( 'Button Name', RIT_TEXT_DOMAIN ),
                    'param_name' => 'btn_names',
                    'value'      => 'Read more',
                ),
                array(
                    'type'       => 'textfield',
                    'heading'    => __( 'URL link', RIT_TEXT_DOMAIN ),
                    'param_name' => 'url_link',
                    'value'      => '#',
                ),
                array(
                    'type' => 'textarea',
                    'holder' => 'div',
                    'heading' => __( 'Content', RIT_TEXT_DOMAIN ),
                    'param_name' => 'des',
                    'value' =>''
                ),

            )
        )
    );
}

add_action( 'vc_before_init', 'rit_services_shortcode_vc' );