| Server IP : 34.87.99.72 / Your IP : 216.73.217.31 Web Server : Apache/2.4.46 (Unix) OpenSSL/1.1.1n System : Linux zlock-bitnami-lamp-prod-v2-vm 4.19.0-16-cloud-amd64 #1 SMP Debian 4.19.181-1 (2021-03-19) x86_64 User : bitnami ( 1000) PHP Version : 7.4.18 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /opt/bitnami/apache/htdocs/web/wp-content/themes/kalium/vc_templates/ |
Upload File : |
<?php
/**
* Message Box
*
* Laborator.co
* www.laborator.co
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Direct access not allowed.
}
// Atts
if ( function_exists( 'vc_map_get_attributes' ) ) {
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
}
extract( $atts );
// Message field fix
$message_safe = $message;
if ( strpos( $message, '#E-' ) == 0 ) {
$message = vc_value_from_safe( $message );
}
// Element Class
$class = $this->getExtraClass( $el_class );
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class, $this->settings['base'], $atts );
$css_class = "alert {$css_class}";
switch ( $type ) {
case 'info':
$css_class .= ' alert-info';
break;
case 'success':
$css_class .= ' alert-success';
break;
case 'warning':
$css_class .= ' alert-warning';
break;
case 'error':
$css_class .= ' alert-danger';
break;
default:
$css_class .= ' alert-default';
}
?>
<div class="<?php echo esc_attr( $css_class ) . vc_shortcode_custom_css_class( $css, ' ' ); ?> fade in" role="alert">
<?php if ( $close_button ) : ?>
<button type="button" class="close" data-dismiss="alert">
<span aria-hidden="true"></span>
<span class="sr-only"><?php esc_html_e( 'Close', 'kalium' ); ?></span>
</button>
<?php endif; ?>
<?php echo wp_kses_post( apply_filters( 'the_content', $message ) ); ?>
</div>