Upload Image...
';
}
// Ensure key existence when builder setting is
// not touched, to extract responsive widths.
if ( ! array_key_exists( 'width', $atts ) ) {
$atts['width'] = '100';
}
$classes = array();
if ( $class ) $classes[] = $class;
if ( $visibility ) $classes[] = $visibility;
$classes_inner = array( 'img-inner' );
$image_meta = wp_prepare_attachment_for_js( $id );
$image_title = filter_var( $image_title, FILTER_VALIDATE_BOOLEAN );
$link_atts = array(
'target' => $target,
'rel' => array( $rel ),
);
if ( is_numeric( $id ) ) {
if ( ! $org_img ) {
$org_img = wp_get_attachment_image_src( $id, $lightbox_image_size );
$org_img = $org_img ? $org_img[0] : '';
}
if ( $caption && $caption == 'true' ) {
$caption = is_array( $image_meta ) ? $image_meta['caption'] : '';
}
} else {
if ( ! $org_img ) {
$org_img = $id;
}
}
// If caption is enabled.
$link_start = '';
$link_end = '';
$link_class = '';
if ( $link ) {
if ( strpos( $link, 'watch?v=' ) !== false ) {
$icon = 'icon-play';
$link_class = 'open-video';
if ( ! $image_overlay ) {
$image_overlay = 'rgba(0,0,0,.2)';
}
}
$link_start = '
'; ?>
'; ?>
'; ?>
'; ?>
array(
'selector' => '',
'property' => 'width',
'unit' => '%',
),
);
echo ux_builder_element_style_tag( $_id, $args, $atts );
?>