OwlCyberSecurity - MANAGER
Edit File: contact-information.php
<?php /** * Contacts List */ add_shortcode( 'pearl_contact_information', 'pearl_contact_information' ); function pearl_contact_information( $atts ) { // Params extraction extract( shortcode_atts( array( 'title' => '', 'desc' => '', 'phone' => '', 'fax' => '', 'email' => '', 'site' => '', 'address' => '', 'facebook_link' => '', 'twitter_link' => '', 'youtube_link' => '', 'vimeo_link' => '', ), $atts ) ); $contact_title = $title; $contact_desc = $desc; $contact_phone = $phone; $contact_fax = $fax; $contact_email = $email; $contact_site = $site; $contact_address = $address; $contact_social['facebook_link'] = $facebook_link; $contact_social['twitter_link'] = $twitter_link; $contact_social['youtube_link'] = $youtube_link; $contact_social['vimeo_link'] = $vimeo_link; ob_start(); ?> <div class="contact-get"> <?php if ( ! empty( $contact_title ) || ! empty( $contact_desc ) ) : ?> <div class="main-title"> <?php if ( ! empty( $contact_title ) ) : echo '<h2>' . wp_kses( $contact_title, array( 'strong' => array() ) ) . '</h2>'; endif; if ( ! empty( $contact_desc ) ) : echo '<p>' . esc_textarea( $contact_desc ) . '</p>'; endif; ?> </div> <?php endif; ?> <div class="get-in-touch"> <div class="detail"> <?php if ( ! empty( $contact_phone ) ) : echo '<span><b>' . esc_html__( 'Phone:', 'pearl-medical-framework' ) . '</b> ' . esc_html( $contact_phone ) . '</span>'; endif; if ( ! empty( $contact_fax ) ) : echo '<span><b>' . esc_html__( 'Fax:', 'pearl-medical-framework' ) . '</b> ' . esc_html( $contact_fax ) . '</span>'; endif; if ( ! empty( $contact_email ) && is_email( $contact_email ) ) : echo '<span><b>' . esc_html__( 'Email:', 'pearl-medical-framework' ) . '</b> <a href="mailto:' . esc_attr( $contact_email ) . '">' . antispambot( sanitize_email( $contact_email ) ) . '</a></span>'; endif; if ( ! empty( $contact_site ) ) : echo '<span><b>' . esc_html__( 'Website:', 'pearl-medical-framework' ) . '</b> <a href="' . esc_url( $contact_site ) . '" target="_blank">' . esc_url( $contact_site ) . '</a></span>'; endif; if ( ! empty( $contact_address ) ) : echo '<span><b>' . esc_html__( 'Address:', 'pearl-medical-framework' ) . '</b> ' . esc_textarea( $contact_address ) . '</span>'; endif; ?> </div> <?php if ( array_filter( $contact_social ) ) { echo '<div class="social-icons">'; if ( ! empty( $contact_social['facebook_link'] ) ) : echo '<a href="' . esc_url( $contact_social['facebook_link'] ) . '" class="fb" target="_blank"><i class="icon-euro"></i></a>'; endif; if ( ! empty( $contact_social['twitter_link'] ) ) : echo '<a href="' . esc_url( $contact_social['twitter_link'] ) . '" class="tw" target="_blank"><i class="icon-yen"></i></a>'; endif; if ( ! empty( $contact_social['youtube_link'] ) ) : echo '<a href="' . esc_url( $contact_social['youtube_link'] ) . '" class="gp" target="_blank"><i class="icon-youtube"></i></a>'; endif; if ( ! empty( $contact_social['vimeo_link'] ) ) : echo '<a href="' . esc_url( $contact_social['vimeo_link'] ) . '" class="vimeo" target="_blank"><i class="icon-vimeo4"></i></a>'; endif; echo '</div>'; } ?> </div> </div> <?php return ob_get_clean(); } /** * Contact Information */ vc_map( array( 'name' => esc_html__( 'Contact Information', 'pearl-medical-framework' ), 'base' => 'pearl_contact_information', 'class' => '', "category" => esc_html__( "MedicalGuide Theme", 'pearl-medical-framework' ), 'params' => array( array( 'type' => 'textfield', 'class' => '', 'heading' => esc_html__( 'Title', 'pearl-medical-framework' ), "admin_label" => true, 'param_name' => 'title', ), array( 'type' => 'textarea', 'class' => '', 'heading' => esc_html__( 'Description', 'pearl-medical-framework' ), "admin_label" => true, 'param_name' => 'desc', ), array( 'type' => 'textfield', 'class' => '', 'heading' => esc_html__( 'Phone Number', 'pearl-medical-framework' ), "admin_label" => true, 'param_name' => 'phone', ), array( 'type' => 'textfield', 'class' => '', 'heading' => esc_html__( 'Fax Number', 'pearl-medical-framework' ), "admin_label" => true, 'param_name' => 'fax', ), array( 'type' => 'textfield', 'class' => '', 'heading' => esc_html__( 'Email', 'pearl-medical-framework' ), "admin_label" => true, 'param_name' => 'email', ), array( 'type' => 'textfield', 'class' => '', 'heading' => esc_html__( 'Website URL', 'pearl-medical-framework' ), "admin_label" => true, 'param_name' => 'site', ), array( 'type' => 'textarea', 'class' => '', 'heading' => esc_html__( 'Address', 'pearl-medical-framework' ), "admin_label" => true, 'param_name' => 'address', ), array( 'type' => 'textfield', 'class' => '', 'heading' => esc_html__( 'Facebook URL', 'pearl-medical-framework' ), "admin_label" => true, 'param_name' => 'facebook_link', ), array( 'type' => 'textfield', 'class' => '', 'heading' => esc_html__( 'Twitter URL', 'pearl-medical-framework' ), "admin_label" => true, 'param_name' => 'twitter_link', ), array( 'type' => 'textfield', 'class' => '', 'heading' => esc_html__( 'YouTube URL', 'pearl-medical-framework' ), "admin_label" => true, 'param_name' => 'youtube_link', ), array( 'type' => 'textfield', 'class' => '', 'heading' => esc_html__( 'Vimeo URL', 'pearl-medical-framework' ), "admin_label" => true, 'param_name' => 'vimeo_link', ) ) ) );