| Server IP : 172.67.187.206 / Your IP : 172.71.28.155 Web Server : Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/5.6.30 System : Windows NT WIN-ECQAAA40806 6.2 build 9200 (Windows Server 2012 Standard Edition) i586 User : SYSTEM ( 0) PHP Version : 5.6.30 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /Inetpub/www/training/wp-content/themes/flatsome/inc/shortcodes/ |
Upload File : |
<?php
// [gap]
function flatsome_gap_shortcode( $atts, $content = null ) {
extract( $atts = shortcode_atts( array(
'_id' => 'gap-' . rand(),
'height' => '30px',
'height__sm' => '',
'height__md' => '',
'class' => '',
'visibility' => '',
), $atts ) );
$classes = array( 'gap-element', 'clearfix' );
if ( $class ) {
$classes[] = $class;
}
if ( $visibility ) {
$classes[] = $visibility;
}
$classes = implode( ' ', $classes );
$args = array(
'height' => array(
'selector' => '',
'property' => 'padding-top',
),
);
ob_start();
?>
<div id="<?php echo esc_attr( $_id ); ?>" class="<?php echo esc_attr( $classes ); ?>" style="display:block; height:auto;">
<?php echo ux_builder_element_style_tag( $_id, $args, $atts ); // phpcs:disable WordPress.XSS.EscapeOutput.OutputNotEscaped ?>
</div>
<?php
return ob_get_clean();
}
add_shortcode( 'gap', 'flatsome_gap_shortcode' );