OwlCyberSecurity - MANAGER
Edit File: static-services.php
<?php /** * Static Service */ add_shortcode( 'pearl_static_service', 'pearl_static_service' ); function pearl_static_service( $atts ) { extract( shortcode_atts( array( 'icon' => '', 'title' => '', 'desc' => '', 'url' => '', 'bottom_space' => 'high-space', 'icon_type' => '', 'color_scheme' => '', 'style' => 'right_text', ), $atts ) ); ob_start(); ?> <div class="col-md-12 static-service"> <?php if ( $style == 'right_text' ) { if ( $icon_type ) { ?> <div class="services-sec-four <?php echo $color_scheme; ?> clearfix"> <?php if ( ! empty( $icon ) ) { ?> <div class="icon"> <?php echo '<i class="' . $icon . '"></i>'; ?> </div> <?php } ?> <div class="detail"> <?php if ( ! empty( $title ) ) { if ( ! empty( $url ) ) { echo '<h6><a href="' . esc_url( $url ) . '">' . esc_html( $title ) . '</a></h6>'; } else { echo '<h6>' . $title . '</h6>'; } } if ( ! empty( $desc ) ) { echo '<p>' . $desc . '</p>'; } ?> </div> </div> <?php } else { ?> <div class="service-sec-one <?php echo sanitize_html_class( $bottom_space ); ?>"> <?php if ( ! empty( $icon ) ) { ?> <div class="icon"> <?php echo '<i class="' . $icon . '"></i>'; ?> </div> <?php } ?> <div class="detail"> <?php if ( ! empty( $title ) ) { if ( ! empty( $url ) ) { echo '<h5><a href="' . esc_url( $url ) . '">' . esc_html( $title ) . '</a></h5>'; } else { echo '<h5>' . $title . '</h5>'; } } if ( ! empty( $desc ) ) { echo '<p>' . $desc . '</p>'; } ?> </div> </div> <?php } } else { ?> <div class="service-sec"> <?php if ( ! empty( $icon ) ) { ?> <div class="icon"> <?php echo '<i class="' . $icon . '"></i>'; ?> </div> <?php } ?> <?php if ( ! empty( $title ) ) { if ( ! empty( $url ) ) { echo '<h6><a href="' . esc_url( $url ) . '">' . esc_html( $title ) . '</a></h6>'; } else { echo '<h6>' . $title . '</h6>'; } } if ( ! empty( $desc ) ) { echo '<p>' . $desc . '</p>'; } ?> </div> <?php } ?> </div> <?php return ob_get_clean(); } vc_map( array( "name" => esc_html__( "Pearl Static Service", 'pearl-medical-framework' ), "base" => "pearl_static_service", "class" => "", "category" => esc_html__( "MedicalGuide Theme", 'pearl-medical-framework' ), "params" => array( array( "type" => "textfield", "class" => "", "heading" => esc_html__( "Icon", 'pearl-medical-framework' ), "param_name" => "icon", "value" => '', "description" => esc_html__( "Please provide an icon class here.", 'pearl-medical-framework' ), ), array( "type" => "textfield", "class" => "", "heading" => esc_html__( "Title", 'pearl-medical-framework' ), "param_name" => "title", "value" => '', "description" => esc_html__( "Please provide a service title here.", 'pearl-medical-framework' ), "admin_label" => true ), array( "type" => "textarea", "class" => "", "heading" => esc_html__( "Description", 'pearl-medical-framework' ), "param_name" => "desc", "value" => '', "description" => esc_html__( "Please provide service description here.", 'pearl-medical-framework' ), "admin_label" => true ), array( "type" => "textfield", "class" => "", "heading" => esc_html__( "URL (optional)", 'pearl-medical-framework' ), "param_name" => "url", "value" => '', "description" => esc_html__( "Provide a URL if you want to link this service to a page.", 'pearl-medical-framework' ), "admin_label" => true ), array( "type" => "dropdown", "class" => "", "heading" => esc_html__( "Style", 'pearl-medical-framework' ), "param_name" => "style", "value" => array( 'Right Text' => 'right_text', 'Bottom Text' => 'bottom_text' ), "admin_label" => true ), array( 'type' => 'checkbox', 'heading' => "Small Icon.", 'param_name' => "icon_type", 'value' => "small", "dependency" => array( 'element' => 'style', 'value' => array( 'right_text' ) ) ), array( "type" => "dropdown", "class" => "", "heading" => esc_html__( "Color Scheme", 'pearl-medical-framework' ), "param_name" => "color_scheme", "description" => esc_html__( "If you choose light color scheme then the service block text color will be dark. However, if you choose dark color scheme then the service block text color will be white.", 'pearl-medical-framework' ), "value" => array( 'Light' => 'light', 'Dark' => 'dark' ), "dependency" => array( 'element' => 'icon_type', 'value' => array( 'true' ) ) ), array( "type" => "dropdown", "class" => "", "heading" => esc_html__( "Bottom Space", 'pearl-medical-framework' ), "param_name" => "bottom_space", "value" => array( 'High' => 'high-space', 'Low' => 'low-space' ), "dependency" => array( 'element' => 'style', 'value' => array( 'right_text' ) ) ) ) ) );