floatval( $animate_delay ) . 's', ) ); } } if ( ! empty( $css ) AND function_exists( 'vc_shortcode_custom_css_class' ) ) { $classes .= ' ' . vc_shortcode_custom_css_class( $css ); } $classes .= ( ! empty( $el_class ) ) ? ( ' ' . $el_class ) : ''; } // Get the image $img_arr = explode( '|', $img ); $img_html .= us_get_attachment_image( $img_arr[0], $size ); // Get the image for transparent header if set if ( ! empty( $img_transparent ) ) { $classes .= ' with_transparent'; $img_arr = explode( '|', $img_transparent ); $img_html .= us_get_attachment_image( $img_arr[0], $size ); } if ( $us_elm_context == 'shortcode' AND $img_html ) { if ( $meta ) { $attachment = get_post( $img ); // Use the Caption as a Title $title = trim( strip_tags( $attachment->post_excerpt ) ); if ( empty( $title ) ) { // If not, Use the Alt $title = trim( strip_tags( get_post_meta( $attachment->ID, '_wp_attachment_image_alt', TRUE ) ) ); } if ( empty( $title ) ) { // If no Alt, use the Title $title = trim( strip_tags( $attachment->post_title ) ); } $img_html .= '
'; } // Get url to the image to immitate shadow $img_src = wp_get_attachment_image_url( $img, $size ); if ( $style == 'shadow-2' ) { $img_shadow = ''; } } // Link if ( $onclick == 'lightbox' ) { $link_atts = ' href="' . wp_get_attachment_image_url( $img, 'full' ) . '" ref="magnificPopup"'; } else { $link_atts = us_generate_link_atts( $link ); } if ( ! empty( $link_atts ) ) { $tag = 'a'; } else { $tag = 'div'; } if ( empty( $img_html ) ) { // Check if image ID is URL if ( strpos( $img, 'http' ) !== FALSE ) { $img_html = '