plugin update(wp-media-folder)
This commit is contained in:
@@ -28,7 +28,7 @@ class WpmfGalleryAddonDivi extends Component {
|
||||
|| this.props.border_width !== nextProps.border_width || this.props.border_color !== nextProps.border_color || this.props.border_style !== nextProps.border_style
|
||||
|| this.props.enable_shadow !== nextProps.enable_shadow || this.props.shadow_color !== nextProps.shadow_color || this.props.shadow_horizontal !== nextProps.shadow_horizontal || this.props.shadow_vertical !== nextProps.shadow_vertical || this.props.shadow_blur !== nextProps.shadow_blur || this.props.shadow_spread !== nextProps.shadow_spread
|
||||
|| this.props.gallery_image_tags !== nextProps.gallery_image_tags || this.props.gallery_navigation !== nextProps.gallery_navigation || this.props.sub_galleries_listing !== nextProps.sub_galleries_listing || this.props.number_lines !== nextProps.number_lines
|
||||
|| this.props.disable_overlay !== nextProps.disable_overlay || this.props.hover_color !== nextProps.hover_color || this.props.hover_opacity !== nextProps.hover_opacity || this.props.hover_title_position !== nextProps.hover_title_position
|
||||
|| this.props.disable_overlay !== nextProps.disable_overlay || this.props.download_all !== nextProps.download_all || this.props.hover_color !== nextProps.hover_color || this.props.hover_opacity !== nextProps.hover_opacity || this.props.hover_title_position !== nextProps.hover_title_position
|
||||
|| this.props.hover_title_size !== nextProps.hover_title_size || this.props.hover_title_color !== nextProps.hover_title_color || this.props.hover_desc_position !== nextProps.hover_desc_position
|
||||
|| this.props.hover_desc_size !== nextProps.hover_desc_size || this.props.hover_desc_color !== nextProps.hover_desc_color) {
|
||||
this.loadHtml(nextProps);
|
||||
@@ -36,7 +36,15 @@ class WpmfGalleryAddonDivi extends Component {
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
if (parseInt(this.props.gallery_id) !== 0) {
|
||||
let gallery_id_string = this.props.gallery_id;
|
||||
let gallery_id;
|
||||
if (gallery_id_string.indexOf('-') != -1) {
|
||||
let gallery_ids = gallery_id_string.split('-');
|
||||
gallery_id = gallery_ids[1];
|
||||
} else {
|
||||
gallery_id = gallery_id_string;
|
||||
}
|
||||
if (gallery_id !== 0) {
|
||||
let t = this;
|
||||
let a = setInterval(function () {
|
||||
$(t.wrap.current).find('.loading_gallery').hide();
|
||||
@@ -73,7 +81,15 @@ class WpmfGalleryAddonDivi extends Component {
|
||||
|
||||
componentDidUpdate(prevProps) {
|
||||
// Deselect images when deselecting the block
|
||||
if (parseInt(this.props.gallery_id) !== 0 && !(this.props.gallery_id === prevProps.gallery_id && this.props.columns === prevProps.columns && this.props.theme === prevProps.theme && this.props.layout === prevProps.layout && this.props.row_height === prevProps.row_height && this.props.aspect_ratio === prevProps.aspect_ratio && this.props.size === prevProps.size && this.props.orderby === prevProps.orderby && this.props.order === prevProps.order && this.props.border_radius === prevProps.border_radius && this.props.gutterwidth === prevProps.gutterwidth && this.props.border_width === prevProps.border_width && this.props.border_color === prevProps.border_color && this.props.border_style === prevProps.border_style && this.props.enable_shadow === prevProps.enable_shadow && this.props.shadow_color === prevProps.shadow_color && this.props.shadow_horizontal === prevProps.shadow_horizontal && this.props.shadow_vertical === prevProps.shadow_vertical && this.props.shadow_blur === prevProps.shadow_blur && this.props.shadow_spread === prevProps.shadow_spread && this.props.gallery_image_tags === prevProps.gallery_image_tags && this.props.disable_overlay === prevProps.disable_overlay && this.props.gallery_navigation === prevProps.gallery_navigation && this.props.sub_galleries_listing === prevProps.sub_galleries_listing && this.props.number_lines === prevProps.number_lines && this.props.hover_color === prevProps.hover_color && this.props.hover_opacity === prevProps.hover_opacity && this.props.hover_title_position === prevProps.hover_title_position && this.props.hover_title_size === prevProps.hover_title_size && this.props.hover_title_color === prevProps.hover_title_color && this.props.hover_desc_position === prevProps.hover_desc_position && this.props.hover_desc_size === prevProps.hover_desc_size && this.props.hover_desc_color === prevProps.hover_desc_color)) {
|
||||
let gallery_id_string = this.props.gallery_id;
|
||||
let gallery_id;
|
||||
if (gallery_id_string.indexOf('-') != -1) {
|
||||
let gallery_ids = gallery_id_string.split('-');
|
||||
gallery_id = gallery_ids[1];
|
||||
} else {
|
||||
gallery_id = gallery_id_string;
|
||||
}
|
||||
if (gallery_id !== 0 && !(gallery_id === prevProps.gallery_id && this.props.columns === prevProps.columns && this.props.theme === prevProps.theme && this.props.layout === prevProps.layout && this.props.row_height === prevProps.row_height && this.props.aspect_ratio === prevProps.aspect_ratio && this.props.size === prevProps.size && this.props.orderby === prevProps.orderby && this.props.order === prevProps.order && this.props.border_radius === prevProps.border_radius && this.props.gutterwidth === prevProps.gutterwidth && this.props.border_width === prevProps.border_width && this.props.border_color === prevProps.border_color && this.props.border_style === prevProps.border_style && this.props.enable_shadow === prevProps.enable_shadow && this.props.shadow_color === prevProps.shadow_color && this.props.shadow_horizontal === prevProps.shadow_horizontal && this.props.shadow_vertical === prevProps.shadow_vertical && this.props.shadow_blur === prevProps.shadow_blur && this.props.shadow_spread === prevProps.shadow_spread && this.props.gallery_image_tags === prevProps.gallery_image_tags && this.props.disable_overlay === prevProps.disable_overlay && this.props.download_all === prevProps.download_all && this.props.gallery_navigation === prevProps.gallery_navigation && this.props.sub_galleries_listing === prevProps.sub_galleries_listing && this.props.number_lines === prevProps.number_lines && this.props.hover_color === prevProps.hover_color && this.props.hover_opacity === prevProps.hover_opacity && this.props.hover_title_position === prevProps.hover_title_position && this.props.hover_title_size === prevProps.hover_title_size && this.props.hover_title_color === prevProps.hover_title_color && this.props.hover_desc_position === prevProps.hover_desc_position && this.props.hover_desc_size === prevProps.hover_desc_size && this.props.hover_desc_color === prevProps.hover_desc_color)) {
|
||||
let t = this;
|
||||
let a = setInterval(function () {
|
||||
$(t.wrap.current).find('.loading_gallery').hide();
|
||||
@@ -376,6 +392,7 @@ class WpmfGalleryAddonDivi extends Component {
|
||||
sub_galleries_listing: props.sub_galleries_listing,
|
||||
display_tag: props.gallery_image_tags,
|
||||
disable_overlay: props.disable_overlay,
|
||||
download_all: props.download_all,
|
||||
hover_color: props.hover_color,
|
||||
hover_opacity: props.hover_opacity,
|
||||
hover_title_position: props.hover_title_position,
|
||||
@@ -439,7 +456,15 @@ class WpmfGalleryAddonDivi extends Component {
|
||||
</svg>
|
||||
);
|
||||
|
||||
if (parseInt(this.props.gallery_id) === 0) {
|
||||
let gallery_id_string = this.props.gallery_id;
|
||||
let gallery_id;
|
||||
if (gallery_id_string.indexOf('-') != -1) {
|
||||
let gallery_ids = gallery_id_string.split('-');
|
||||
gallery_id = gallery_ids[1];
|
||||
} else {
|
||||
gallery_id = gallery_id_string;
|
||||
}
|
||||
if (gallery_id === 0) {
|
||||
return (
|
||||
<div className="wpmf-divi-container wpmf-gallery-divi-wrap" ref={this.wrap}>
|
||||
<div id="divi-gallery-addon-placeholder" className="divi-gallery-addon-placeholder">
|
||||
|
||||
@@ -220,6 +220,17 @@ class WpmfGalleryAddonDivi extends ET_Builder_Module
|
||||
'default' => 'off',
|
||||
'default_on_front' => 'off'
|
||||
),
|
||||
'download_all' => array(
|
||||
'label' => esc_html__('Download All Images', 'wpmf'),
|
||||
'type' => 'yes_no_button',
|
||||
'option_category' => 'configuration',
|
||||
'options' => array(
|
||||
'on' => esc_html__('On', 'wpmf'),
|
||||
'off' => esc_html__('Off', 'wpmf'),
|
||||
),
|
||||
'default' => 'off',
|
||||
'default_on_front' => 'off'
|
||||
),
|
||||
'columns' => array(
|
||||
'label' => esc_html__('Columns', 'wpmf'),
|
||||
'type' => 'range',
|
||||
@@ -579,6 +590,7 @@ class WpmfGalleryAddonDivi extends ET_Builder_Module
|
||||
$sub_galleries_listing = (!empty($this->props['sub_galleries_listing']) && $this->props['sub_galleries_listing'] === 'on') ? 1 : 0;
|
||||
$gallery_image_tags = (!empty($this->props['gallery_image_tags']) && $this->props['gallery_image_tags'] === 'on') ? 1 : 0;
|
||||
$disable_overlay = (!empty($this->props['disable_overlay']) && $this->props['disable_overlay'] === 'on') ? 1 : 0;
|
||||
$download_all = (!empty($this->props['download_all']) && $this->props['download_all'] === 'on') ? 1 : 0;
|
||||
if (!empty($this->props['enable_shadow']) && $this->props['enable_shadow'] === 'on') {
|
||||
$img_shadow = $this->props['shadow_horizontal'] . ' ' . $this->props['shadow_vertical'] . ' ' . $this->props['shadow_blur'] . ' ' . $this->props['shadow_spread'] . ' ' . $this->props['shadow_color'];
|
||||
} else {
|
||||
@@ -602,7 +614,7 @@ class WpmfGalleryAddonDivi extends ET_Builder_Module
|
||||
} else {
|
||||
$gallery_id = $gallery_id_string;
|
||||
}
|
||||
return do_shortcode('[wpmfgallery gallery_id="'. (int)$gallery_id .'" display_tree="' . esc_attr($gallery_navigation) . '" sub_galleries_listing="' . esc_attr($sub_galleries_listing) . '" display_tag="' . esc_attr($gallery_image_tags) . '" disable_overlay="' . esc_attr($disable_overlay) . '" display="' . esc_attr($this->props['theme']) . '" layout="' . esc_attr($this->props['layout']) . '" row_height="' . esc_attr($this->props['row_height']) . '" aspect_ratio="' . esc_attr($this->props['aspect_ratio']) . '" columns="' . esc_attr($this->props['columns']) . '" size="' . esc_attr($this->props['size']) . '" targetsize="' . esc_attr($this->props['targetsize']) . '" link="' . esc_attr($this->props['action']) . '" wpmf_orderby="' . esc_attr($this->props['orderby']) . '" wpmf_order="' . esc_attr($this->props['order']) . '" gutterwidth="' . esc_attr($this->props['gutterwidth']) . '" border_width="' . esc_attr($this->props['border_width']) . '" border_style="' . esc_attr($this->props['border_style']) . '" border_color="' . esc_attr($this->props['border_color']) . '" img_shadow="' . esc_attr($img_shadow) . '" img_border_radius="' . esc_attr($this->props['border_radius']) . '" number_lines="' . esc_attr($this->props['number_lines']) . '" hover_color="'. $this->props['hover_color'] .'" hover_opacity="'. $this->props['hover_opacity'] .'" hover_title_position="'. $this->props['hover_title_position'] .'" hover_title_size="'. $this->props['hover_title_size'] .'" hover_title_color="'. $this->props['hover_title_color'] .'" hover_desc_position="'. $this->props['hover_desc_position'] .'" hover_desc_size="'. $this->props['hover_desc_size'] .'" hover_desc_color="'. $this->props['hover_desc_color'] .'"]');
|
||||
return do_shortcode('[wpmfgallery gallery_id="'. (int)$gallery_id .'" display_tree="' . esc_attr($gallery_navigation) . '" sub_galleries_listing="' . esc_attr($sub_galleries_listing) . '" display_tag="' . esc_attr($gallery_image_tags) . '" download_all="' . esc_attr($download_all) . '" disable_overlay="' . esc_attr($disable_overlay) . '" display="' . esc_attr($this->props['theme']) . '" layout="' . esc_attr($this->props['layout']) . '" row_height="' . esc_attr($this->props['row_height']) . '" aspect_ratio="' . esc_attr($this->props['aspect_ratio']) . '" columns="' . esc_attr($this->props['columns']) . '" size="' . esc_attr($this->props['size']) . '" targetsize="' . esc_attr($this->props['targetsize']) . '" link="' . esc_attr($this->props['action']) . '" wpmf_orderby="' . esc_attr($this->props['orderby']) . '" wpmf_order="' . esc_attr($this->props['order']) . '" gutterwidth="' . esc_attr($this->props['gutterwidth']) . '" border_width="' . esc_attr($this->props['border_width']) . '" border_style="' . esc_attr($this->props['border_style']) . '" border_color="' . esc_attr($this->props['border_color']) . '" img_shadow="' . esc_attr($img_shadow) . '" img_border_radius="' . esc_attr($this->props['border_radius']) . '" number_lines="' . esc_attr($this->props['number_lines']) . '" hover_color="'. $this->props['hover_color'] .'" hover_opacity="'. $this->props['hover_opacity'] .'" hover_title_position="'. $this->props['hover_title_position'] .'" hover_title_size="'. $this->props['hover_title_size'] .'" hover_title_color="'. $this->props['hover_title_color'] .'" hover_desc_position="'. $this->props['hover_desc_position'] .'" hover_desc_size="'. $this->props['hover_desc_size'] .'" hover_desc_color="'. $this->props['hover_desc_color'] .'"]');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user