plugin updates
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
/* Prohibit direct script loading */
|
||||
defined('ABSPATH') || die('No direct script access allowed!');
|
||||
// phpcs:disable WordPress.Security.EscapeOutput -- Content already escaped in the method
|
||||
echo $default_theme;
|
||||
echo $portfolio_theme;
|
||||
echo $masonry_theme;
|
||||
echo $slider_theme;
|
||||
// phpcs:enable
|
||||
@@ -0,0 +1,311 @@
|
||||
<?php
|
||||
/* Prohibit direct script loading */
|
||||
defined('ABSPATH') || die('No direct script access allowed!');
|
||||
if (empty($settings['aspect_ratio'])) {
|
||||
$settings['aspect_ratio'] = 'default';
|
||||
}
|
||||
?>
|
||||
<div class="ju-settings-option wpmf_width_100 p-lr-20">
|
||||
<div class="wpmf_row_full">
|
||||
<h3 class="settings_theme_name"><?php echo esc_html($theme_label); ?></h3>
|
||||
<div class="wpmf_glr_settings">
|
||||
<div class="ju-settings-option wpmf-no-shadow wpmf_width_20 p-d-10">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text wpmf_width_auto" data-wpmftippy="<?php esc_html_e('Number of columns
|
||||
by default in the gallery theme', 'wpmf'); ?>">
|
||||
<?php esc_html_e('Columns', 'wpmf'); ?>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<select class="columns"
|
||||
name="wpmf_glr_settings[theme][<?php echo esc_html($theme_name) ?>][columns]">
|
||||
<?php for ($i = 1; $i <= 8; $i ++) { ?>
|
||||
<option value="<?php echo esc_html($i) ?>" <?php selected((int) $settings['columns'], (int) $i) ?> >
|
||||
<?php echo esc_html($i) ?>
|
||||
</option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf-no-shadow wpmf_width_20 p-d-10">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text wpmf_width_auto" data-wpmftippy="<?php esc_html_e('Image size to load
|
||||
by default as thumbnail', 'wpmf'); ?>">
|
||||
<?php esc_html_e('Gallery image size', 'wpmf'); ?>
|
||||
</label>
|
||||
<label class="size">
|
||||
<select class="size" name="wpmf_glr_settings[theme][<?php echo esc_html($theme_name) ?>][size]">
|
||||
<?php
|
||||
$sizes_value = json_decode(get_option('wpmf_gallery_image_size_value'));
|
||||
$sizes = apply_filters('image_size_names_choose', array(
|
||||
'thumbnail' => __('Thumbnail', 'wpmf'),
|
||||
'medium' => __('Medium', 'wpmf'),
|
||||
'large' => __('Large', 'wpmf'),
|
||||
'full' => __('Full Size', 'wpmf'),
|
||||
));
|
||||
?>
|
||||
|
||||
<?php foreach ($sizes_value as $key) : ?>
|
||||
<?php if (!empty($sizes[$key])) : ?>
|
||||
<option value="<?php echo esc_attr($key); ?>" <?php selected($settings['size'], $key); ?>>
|
||||
<?php echo esc_html($sizes[$key]); ?>
|
||||
</option>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php endforeach; ?>
|
||||
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf-no-shadow wpmf_width_20 p-d-10">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text wpmf_width_auto" data-wpmftippy="<?php esc_html_e('Image size to load by default as full
|
||||
size (opened in the lightbox)', 'wpmf'); ?>">
|
||||
<?php esc_html_e('Lightbox size', 'wpmf'); ?>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<select class="targetsize"
|
||||
name="wpmf_glr_settings[theme][<?php echo esc_html($theme_name) ?>][targetsize]">
|
||||
<?php
|
||||
$sizes = array(
|
||||
'thumbnail' => __('Thumbnail', 'wpmf'),
|
||||
'medium' => __('Medium', 'wpmf'),
|
||||
'large' => __('Large', 'wpmf'),
|
||||
'full' => __('Full Size', 'wpmf'),
|
||||
);
|
||||
?>
|
||||
|
||||
<?php foreach ($sizes as $key => $name) : ?>
|
||||
<option value="<?php echo esc_attr($key); ?>"
|
||||
<?php selected($settings['targetsize'], $key); ?>>
|
||||
<?php echo esc_html($name); ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf-no-shadow wpmf_width_20 p-d-10">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text wpmf_width_auto" data-wpmftippy="<?php esc_html_e('Action when the user
|
||||
click on the image thumbnail', 'wpmf'); ?>">
|
||||
<?php esc_html_e('Action on click', 'wpmf'); ?>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<select class="link-to" name="wpmf_glr_settings[theme][<?php echo esc_html($theme_name) ?>][link]">
|
||||
<option value="file" <?php selected($settings['link'], 'file'); ?>>
|
||||
<?php esc_html_e('Lightbox', 'wpmf'); ?>
|
||||
</option>
|
||||
<option value="post" <?php selected($settings['link'], 'post'); ?>>
|
||||
<?php esc_html_e('Attachment Page', 'wpmf'); ?>
|
||||
</option>
|
||||
<option value="none" <?php selected($settings['link'], 'none'); ?>>
|
||||
<?php esc_html_e('None', 'wpmf'); ?>
|
||||
</option>
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf-no-shadow wpmf_width_20 p-d-10">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text wpmf_width_auto" data-wpmftippy="<?php esc_html_e('Image gallery
|
||||
default ordering', 'wpmf'); ?>">
|
||||
<?php esc_html_e('Order by', 'wpmf'); ?>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<select class="wpmf_orderby"
|
||||
name="wpmf_glr_settings[theme][<?php echo esc_html($theme_name) ?>][orderby]">
|
||||
<option value="post__in" <?php selected($settings['orderby'], 'post__in'); ?>>
|
||||
<?php esc_html_e('Custom', 'wpmf'); ?>
|
||||
</option>
|
||||
<option value="rand" <?php selected($settings['orderby'], 'rand'); ?>>
|
||||
<?php esc_html_e('Random', 'wpmf'); ?>
|
||||
</option>
|
||||
<option value="title" <?php selected($settings['orderby'], 'title'); ?>>
|
||||
<?php esc_html_e('Title', 'wpmf'); ?>
|
||||
</option>
|
||||
<option value="date" <?php selected($settings['orderby'], 'date'); ?>>
|
||||
<?php esc_html_e('Date', 'wpmf'); ?>
|
||||
</option>
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<?php if ($theme_name === 'slider_theme') : ?>
|
||||
<div class="ju-settings-option wpmf-no-shadow wpmf_width_20 p-d-10">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text wpmf_width_auto" data-wpmftippy="<?php esc_html_e('By default, use ascending
|
||||
or descending order', 'wpmf'); ?>">
|
||||
<?php esc_html_e('Order', 'wpmf'); ?>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<select
|
||||
name="wpmf_glr_settings[theme][<?php echo esc_html($theme_name) ?>][order]">
|
||||
<option value="ASC" <?php selected($settings['order'], 'ASC'); ?>>
|
||||
<?php esc_html_e('Ascending', 'wpmf'); ?>
|
||||
</option>
|
||||
<option value="DESC" <?php selected($settings['order'], 'DESC'); ?>>
|
||||
<?php esc_html_e('Descending', 'wpmf'); ?>
|
||||
</option>
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf-no-shadow wpmf_width_20 p-d-10">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text">
|
||||
<span class="text"><?php esc_html_e('Transition duration (ms)', 'wpmf'); ?></span>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<input type="number"
|
||||
name="wpmf_glr_settings[theme][<?php echo esc_html($theme_name) ?>][duration]"
|
||||
value="<?php echo esc_attr($settings['duration']) ?>">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf-no-shadow wpmf_width_20 p-d-10">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text wpmf_width_auto">
|
||||
<?php esc_html_e('Aspect ratio', 'wpmf'); ?>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<select class="wpmf_orderby"
|
||||
name="wpmf_glr_settings[theme][<?php echo esc_html($theme_name) ?>][aspect_ratio]">
|
||||
<?php
|
||||
$aspect_ratios = array(
|
||||
'default' => esc_html__('Default', 'wpmf'),
|
||||
'1_1' => '1:1',
|
||||
'3_2' => '3:2',
|
||||
'2_3' => '2:3',
|
||||
'4_3' => '4:3',
|
||||
'3_4' => '3:4',
|
||||
'16_9' => '16:9',
|
||||
'9_16' => '9:16',
|
||||
'21_9' => '21:9',
|
||||
'9_21' => '9:21'
|
||||
);
|
||||
foreach ($aspect_ratios as $aspect_ratio_value => $aspect_ratio_label) :
|
||||
?>
|
||||
<option value="<?php echo esc_attr($aspect_ratio_value) ?>" <?php selected($settings['aspect_ratio'], $aspect_ratio_value); ?>>
|
||||
<?php echo esc_html($aspect_ratio_label) ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option cboption wpmf-no-shadow wpmf_width_100 p-d-10">
|
||||
<h4><?php esc_html_e('Slider Animation', 'wpmf'); ?></h4>
|
||||
<div>
|
||||
<div data-value="fade" class="gallery-slider-animation ju-settings-option wpmf_width_20 wpmf-no-shadow <?php echo ($slider_animation === 'fade') ? 'animation_selected' : '' ?>">
|
||||
<div class="wpmf_row_full">
|
||||
<i class="material-icons wpmf_middle">
|
||||
blur_linear
|
||||
</i>
|
||||
<label class="wpmf_middle"><?php esc_html_e('Fade', 'wpmf') ?></label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div data-value="slide" class="gallery-slider-animation ju-settings-option wpmf_width_20 wpmf-no-shadow <?php echo ($slider_animation === 'slide') ? 'animation_selected' : '' ?>">
|
||||
<div class="wpmf_row_full">
|
||||
<?php if ($slider_animation === 'slide') { ?>
|
||||
<img class="wpmf_middle img_slide" src="<?php echo esc_url(WPMF_PLUGIN_URL . '/assets/images/slide_white.png') ?>">
|
||||
<?php } else { ?>
|
||||
<img class="wpmf_middle" src="<?php echo esc_url(WPMF_PLUGIN_URL . '/assets/images/slide.png') ?>">
|
||||
<?php } ?>
|
||||
<label class="wpmf_middle"><?php esc_html_e('Slide', 'wpmf') ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wpmfcard">
|
||||
<label class="radio">
|
||||
<input type="hidden" name="wpmf_slider_animation" class="wpmf_slider_animation"
|
||||
value="<?php echo esc_html($slider_animation) ?>">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf-no-shadow wpmf_width_100 p-d-10">
|
||||
<b class="ju-setting-label setting wpmf-no-padding text wpmf_left">
|
||||
<?php esc_html_e('Automatic animation', 'wpmf'); ?>
|
||||
</b>
|
||||
|
||||
<label class="wpmf_left">
|
||||
<input type="hidden"
|
||||
name="wpmf_glr_settings[theme][<?php echo esc_html($theme_name) ?>][auto_animation]"
|
||||
value="0">
|
||||
<span class="ju-switch-button">
|
||||
<label class="switch">
|
||||
<?php if (isset($settings['auto_animation']) && (int) $settings['auto_animation'] === 1) : ?>
|
||||
<input type="checkbox"
|
||||
name="wpmf_glr_settings[theme][<?php echo esc_html($theme_name) ?>][auto_animation]"
|
||||
value="1" checked>
|
||||
<?php else : ?>
|
||||
<input type="checkbox"
|
||||
name="wpmf_glr_settings[theme][<?php echo esc_html($theme_name) ?>][auto_animation]"
|
||||
value="1">
|
||||
<?php endif; ?>
|
||||
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($theme_name !== 'slider_theme') : ?>
|
||||
<div class="ju-settings-option wpmf-no-shadow wpmf_width_20 p-d-10">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text wpmf_width_auto" data-wpmftippy="<?php esc_html_e('By default, use ascending
|
||||
or descending order', 'wpmf'); ?>">
|
||||
<?php esc_html_e('Order', 'wpmf'); ?>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<select
|
||||
name="wpmf_glr_settings[theme][<?php echo esc_html($theme_name) ?>][order]">
|
||||
<option value="ASC" <?php selected($settings['order'], 'ASC'); ?>>
|
||||
<?php esc_html_e('Ascending', 'wpmf'); ?>
|
||||
</option>
|
||||
<option value="DESC" <?php selected($settings['order'], 'DESC'); ?>>
|
||||
<?php esc_html_e('Descending', 'wpmf'); ?>
|
||||
</option>
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($theme_name === 'default_theme' || $theme_name === 'portfolio_theme') : ?>
|
||||
<div class="ju-settings-option wpmf-no-shadow wpmf_width_20 p-d-10">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text wpmf_width_auto">
|
||||
<?php esc_html_e('Aspect ratio', 'wpmf'); ?>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<select class="wpmf_orderby"
|
||||
name="wpmf_glr_settings[theme][<?php echo esc_html($theme_name) ?>][aspect_ratio]">
|
||||
<?php
|
||||
$aspect_ratios = array(
|
||||
'default' => esc_html__('Default', 'wpmf'),
|
||||
'1_1' => '1:1',
|
||||
'3_2' => '3:2',
|
||||
'2_3' => '2:3',
|
||||
'4_3' => '4:3',
|
||||
'3_4' => '3:4',
|
||||
'16_9' => '16:9',
|
||||
'9_16' => '9:16',
|
||||
'21_9' => '21:9',
|
||||
'9_21' => '9:21'
|
||||
);
|
||||
foreach ($aspect_ratios as $aspect_ratio_value => $aspect_ratio_label) :
|
||||
?>
|
||||
<option value="<?php echo esc_attr($aspect_ratio_value) ?>" <?php selected($settings['aspect_ratio'], $aspect_ratio_value); ?>>
|
||||
<?php echo esc_html($aspect_ratio_label) ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
/* Prohibit direct script loading */
|
||||
defined('ABSPATH') || die('No direct script access allowed!');
|
||||
?>
|
||||
<div id="advanced" class="tab-content">
|
||||
<div class="content-box content-wpmf-advanced">
|
||||
<div class="ju-settings-option">
|
||||
<div class="wpmf_row_full">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,377 @@
|
||||
<?php
|
||||
/* Prohibit direct script loading */
|
||||
defined('ABSPATH') || die('No direct script access allowed!');
|
||||
?>
|
||||
<div id="google_drive_box" class="tab-content">
|
||||
<div class="wpmf_width_100 p-tb-20 wpmf_left top_bar">
|
||||
<h1 class="wpmf_left"><?php esc_html_e('Google Drive', 'wpmf') ?></h1>
|
||||
<?php
|
||||
do_action('cloudconnector_wpmf_display_ggd_connect_button');
|
||||
if (isset($googleconfig['googleClientId']) && $googleconfig['googleClientId'] !== ''
|
||||
&& isset($googleconfig['googleClientSecret']) && $googleconfig['googleClientSecret'] !== '') {
|
||||
if (empty($googleconfig['connected'])) {
|
||||
$urlGoogle = $googleDrive->getAuthorisationUrl();
|
||||
?>
|
||||
<div class="btn_wpmf_saves">
|
||||
<a class="ju-button orange-button waves-effect waves-light btndrive ggd-connector-button" href="#"
|
||||
onclick="window.location.assign('<?php echo esc_html($urlGoogle); ?>','foo','width=600,height=600');return false;">
|
||||
<?php esc_html_e('Connect Google Drive', 'wpmf') ?></a>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
} else {
|
||||
$url_logout = admin_url('options-general.php?page=option-folder&task=wpmf&function=wpmf_gglogout');
|
||||
?>
|
||||
<div class="btn_wpmf_saves">
|
||||
<a class="ju-button no-background orange-button waves-effect waves-light btndrive ggd-connector-button"
|
||||
href="<?php echo esc_html($url_logout) ?>">
|
||||
<?php esc_html_e('Disconnect Google Drive', 'wpmf') ?></a>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
$config_mode = get_option('joom_cloudconnector_wpmf_ggd_connect_mode', 'manual');
|
||||
if ($config_mode && $config_mode === 'automatic') {
|
||||
echo '<div class="btn_wpmf_saves"><div class="ggd-connector-button"></div></div>';
|
||||
} else {
|
||||
echo '<div class="btn_wpmf_saves"><div class="ggd-connector-button"></div></div>';
|
||||
require WP_MEDIA_FOLDER_PLUGIN_DIR . '/class/pages/settings/submit_button.php';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="content-box">
|
||||
<?php
|
||||
// phpcs:ignore WordPress.Security.NonceVerification.Missing -- View request, no action
|
||||
if (isset($_POST['btn_wpmf_save'])) {
|
||||
?>
|
||||
<div class="wpmf_width_100 top_bar saved_infos" style="padding: 20px 0">
|
||||
<?php
|
||||
require WP_MEDIA_FOLDER_PLUGIN_DIR . '/class/pages/settings/saved_info.php';
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="wpmf_width_100 ju-settings-option">
|
||||
<div class="p-d-20">
|
||||
<?php
|
||||
if (is_plugin_active('wp-media-folder-addon/wp-media-folder-addon.php')) {
|
||||
// phpcs:ignore WordPress.Security.EscapeOutput -- Content already escaped in the method
|
||||
echo $html_tabgoogle;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="google_photo" class="tab-content">
|
||||
<div class="wpmf_width_100 p-tb-20 wpmf_left top_bar">
|
||||
<h1 class="wpmf_left"><?php esc_html_e('Google Photos', 'wpmf') ?></h1>
|
||||
<?php
|
||||
do_action('cloudconnector_wpmf_display_gpt_connect_button');
|
||||
if (isset($google_photo_config['googleClientId']) && $google_photo_config['googleClientId'] !== ''
|
||||
&& isset($google_photo_config['googleClientSecret']) && $google_photo_config['googleClientSecret'] !== '') {
|
||||
if (empty($google_photo_config['connected'])) {
|
||||
$urlGooglePhoto = $googlePhoto->getAuthorisationUrl();
|
||||
?>
|
||||
<div class="btn_wpmf_saves">
|
||||
<a class="ju-button orange-button waves-effect waves-light btndrive gpt-connector-button" href="#"
|
||||
onclick="window.location.assign('<?php echo esc_html($urlGooglePhoto); ?>','foo','width=600,height=600');return false;">
|
||||
<?php esc_html_e('Connect Google Photo', 'wpmf') ?></a>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<div class="btn_wpmf_saves">
|
||||
<a class="ju-button no-background orange-button waves-effect waves-light btndrive gpt-connector-button"
|
||||
href="<?php echo esc_html(admin_url('options-general.php?page=option-folder&task=wpmf&function=wpmf_google_photo_logout')) ?>">
|
||||
<?php esc_html_e('Disconnect Google Photo', 'wpmf') ?></a>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
$config_mode = get_option('joom_cloudconnector_wpmf_gpt_connect_mode', 'manual');
|
||||
if ($config_mode && $config_mode === 'automatic') {
|
||||
echo '<div class="btn_wpmf_saves"><div class="gpt-connector-button"></div></div>';
|
||||
} else {
|
||||
echo '<div class="btn_wpmf_saves"><div class="gpt-connector-button"></div></div>';
|
||||
require WP_MEDIA_FOLDER_PLUGIN_DIR . '/class/pages/settings/submit_button.php';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="content-box">
|
||||
<?php
|
||||
// phpcs:ignore WordPress.Security.NonceVerification.Missing -- View request, no action
|
||||
if (isset($_POST['btn_wpmf_save'])) {
|
||||
?>
|
||||
<div class="wpmf_width_100 top_bar saved_infos" style="padding: 20px 0">
|
||||
<?php
|
||||
require WP_MEDIA_FOLDER_PLUGIN_DIR . '/class/pages/settings/saved_info.php';
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="wpmf_width_100 ju-settings-option">
|
||||
<div class="p-d-20">
|
||||
<?php
|
||||
if (is_plugin_active('wp-media-folder-addon/wp-media-folder-addon.php')) {
|
||||
// phpcs:ignore WordPress.Security.EscapeOutput -- Content already escaped in the method
|
||||
echo $html_google_photo;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="dropbox_box" class="tab-content">
|
||||
<div class="wpmf_width_100 p-tb-20 wpmf_left top_bar">
|
||||
<h1 class="wpmf_left"><?php esc_html_e('Dropbox', 'wpmf') ?></h1>
|
||||
<?php
|
||||
do_action('cloudconnector_wpmf_display_dropbox_connect_button');
|
||||
if (isset($dropboxconfig['dropboxKey']) && $dropboxconfig['dropboxKey'] !== ''
|
||||
&& isset($dropboxconfig['dropboxSecret']) && $dropboxconfig['dropboxSecret'] !== '') {
|
||||
if ($Dropbox->checkAuth()) {
|
||||
try {
|
||||
$urlDropbox = $Dropbox->getAuthorizeDropboxUrl();
|
||||
} catch (Exception $e) {
|
||||
$urlDropbox = '';
|
||||
}
|
||||
}
|
||||
if ($Dropbox->checkAuth()) {
|
||||
?>
|
||||
<div class="btn_wpmf_saves">
|
||||
<a class="ju-button orange-button waves-effect waves-light btndrive dropbox-connector-button" href="#"
|
||||
onclick="window.open('<?php echo esc_html($urlDropbox); ?>','foo','width=600,height=600');return false;">
|
||||
<?php esc_html_e('Connect Dropbox', 'wpmf') ?></a>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
} else { ?>
|
||||
<div class="btn_wpmf_saves">
|
||||
<a class="ju-button no-background orange-button waves-effect waves-light btndrive dropbox-connector-button"
|
||||
href="<?php echo esc_html(admin_url('options-general.php?page=option-folder&task=wpmf&function=wpmf_dropboxlogout')) ?>">
|
||||
<?php esc_html_e('Disconnect Dropbox', 'wpmf') ?></a>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
$config_mode = get_option('joom_cloudconnector_wpmf_dropbox_connect_mode', 'manual');
|
||||
if ($config_mode && $config_mode === 'automatic') {
|
||||
echo '<div class="btn_wpmf_saves"><div class="dropbox-connector-button"></div></div>';
|
||||
} else {
|
||||
echo '<div class="btn_wpmf_saves"><div class="dropbox-connector-button"></div></div>';
|
||||
require WP_MEDIA_FOLDER_PLUGIN_DIR . '/class/pages/settings/submit_button.php';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="content-box">
|
||||
<?php
|
||||
// phpcs:ignore WordPress.Security.NonceVerification.Missing -- View request, no action
|
||||
if (isset($_POST['btn_wpmf_save'])) {
|
||||
?>
|
||||
<div class="wpmf_width_100 top_bar saved_infos" style="padding: 20px 0">
|
||||
<?php
|
||||
require WP_MEDIA_FOLDER_PLUGIN_DIR . '/class/pages/settings/saved_info.php';
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="wpmf_width_100 ju-settings-option">
|
||||
<div class="p-d-20">
|
||||
<?php
|
||||
if (is_plugin_active('wp-media-folder-addon/wp-media-folder-addon.php')) {
|
||||
// phpcs:ignore WordPress.Security.EscapeOutput -- Content already escaped in the method
|
||||
echo $html_tabdropbox;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="one_drive_box" class="tab-content">
|
||||
<div class="wpmf_width_100 p-tb-20 wpmf_left top_bar">
|
||||
<h1 class="wpmf_left"><?php esc_html_e('OneDrive Personal', 'wpmf') ?></h1>
|
||||
<?php
|
||||
require WP_MEDIA_FOLDER_PLUGIN_DIR . '/class/pages/settings/submit_button.php';
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="content-box">
|
||||
<?php
|
||||
// phpcs:ignore WordPress.Security.NonceVerification.Missing -- View request, no action
|
||||
if (isset($_POST['btn_wpmf_save'])) {
|
||||
?>
|
||||
<div class="wpmf_width_100 top_bar saved_infos" style="padding: 20px 0">
|
||||
<?php
|
||||
require WP_MEDIA_FOLDER_PLUGIN_DIR . '/class/pages/settings/saved_info.php';
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="wpmf_width_100 ju-settings-option">
|
||||
<div class="p-d-20">
|
||||
<?php
|
||||
if (is_plugin_active('wp-media-folder-addon/wp-media-folder-addon.php')) {
|
||||
// phpcs:ignore WordPress.Security.EscapeOutput -- Content already escaped in the method
|
||||
echo $html_onedrive_settings;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if (is_plugin_active('wp-media-folder-addon/wp-media-folder-addon.php')) :
|
||||
?>
|
||||
<h1 class="wpmf_left"><?php esc_html_e('OneDrive Business', 'wpmf') ?></h1>
|
||||
<div class="wpmf_width_100 ju-settings-option">
|
||||
<div class="p-d-20">
|
||||
<?php
|
||||
// phpcs:ignore WordPress.Security.EscapeOutput -- Content already escaped in the method
|
||||
echo $html_onedrive_business_settings;
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="nextcloud" class="tab-content">
|
||||
<div class="wpmf_width_100 p-tb-20 wpmf_left top_bar">
|
||||
<h1 class="wpmf_left"><?php esc_html_e('Nextcloud', 'wpmf') ?></h1>
|
||||
<?php
|
||||
require WP_MEDIA_FOLDER_PLUGIN_DIR . '/class/pages/settings/submit_button.php';
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="content-box">
|
||||
<?php
|
||||
// phpcs:ignore WordPress.Security.NonceVerification.Missing -- View request, no action
|
||||
if (isset($_POST['btn_wpmf_save'])) {
|
||||
?>
|
||||
<div class="wpmf_width_100 top_bar saved_infos" style="padding: 20px 0">
|
||||
<?php
|
||||
require WP_MEDIA_FOLDER_PLUGIN_DIR . '/class/pages/settings/saved_info.php';
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="wpmf_width_100 ju-settings-option">
|
||||
<div class="p-d-20">
|
||||
<?php
|
||||
if (is_plugin_active('wp-media-folder-addon/wp-media-folder-addon.php')) {
|
||||
// phpcs:ignore WordPress.Security.EscapeOutput -- Content already escaped in the method
|
||||
echo $html_nextcloud;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="storage_provider" class="tab-content">
|
||||
<div class="wpmf_width_100 p-tb-20 wpmf_left top_bar">
|
||||
<h1 class="wpmf_left">
|
||||
<?php
|
||||
$clouds = array(
|
||||
'aws3' => array('key' => 'aws3', 'name' => 'Amazon S3'),
|
||||
'digitalocean' => array('key' => 'digitalocean', 'name' => 'DigitalOcean'),
|
||||
'wasabi' => array('key' => 'wasabi', 'name' => 'Wasabi'),
|
||||
'google_cloud_storage' => array('key' => 'google_cloud_storage', 'name' => 'Google Cloud Storage'),
|
||||
'linode' => array('key' => 'linode', 'name' => 'Linode'),
|
||||
'bunny_cdn_edge' => array('key' => 'bunny_cdn_edge', 'name' => 'Bunny CDN Edge Storage')
|
||||
);
|
||||
|
||||
// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- No action, nonce is not required
|
||||
if (isset($_GET['cloud'])) {
|
||||
// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- No action, nonce is not required
|
||||
$storage = $_GET['cloud'];
|
||||
} else {
|
||||
$storage = get_option('wpmf_cloud_endpoint');
|
||||
if (empty($storage)) {
|
||||
$storage = 'aws3';
|
||||
}
|
||||
}
|
||||
|
||||
echo esc_html($clouds[$storage]['name'])
|
||||
?>
|
||||
</h1>
|
||||
<?php
|
||||
require WP_MEDIA_FOLDER_PLUGIN_DIR . '/class/pages/settings/submit_button.php';
|
||||
?>
|
||||
</div>
|
||||
<div class="content-box content-wpmf-general">
|
||||
<?php
|
||||
// phpcs:ignore WordPress.Security.NonceVerification.Missing -- View request, no action
|
||||
if (isset($_POST['btn_wpmf_save'])) {
|
||||
?>
|
||||
<div class="wpmf_width_100 top_bar saved_infos" style="padding: 20px 0">
|
||||
<?php
|
||||
require WP_MEDIA_FOLDER_PLUGIN_DIR . '/class/pages/settings/saved_info.php';
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<div>
|
||||
<div class="wpmf_row_full">
|
||||
<?php
|
||||
if (is_plugin_active('wp-media-folder-addon/wp-media-folder-addon.php')) {
|
||||
// phpcs:ignore WordPress.Security.EscapeOutput -- Content already escaped in the method
|
||||
echo $html_tabaws3;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="synchronization" class="tab-content">
|
||||
<div class="wpmf_width_100 p-tb-20 wpmf_left top_bar">
|
||||
<h1 class="wpmf_left"><?php esc_html_e('Synchronization', 'wpmf') ?></h1>
|
||||
<?php
|
||||
require WP_MEDIA_FOLDER_PLUGIN_DIR . '/class/pages/settings/submit_button.php';
|
||||
?>
|
||||
</div>
|
||||
<div class="content-box content-wpmf-general">
|
||||
<?php
|
||||
// phpcs:ignore WordPress.Security.NonceVerification.Missing -- View request, no action
|
||||
if (isset($_POST['btn_wpmf_save'])) {
|
||||
?>
|
||||
<div class="wpmf_width_100 top_bar saved_infos" style="padding: 20px 0">
|
||||
<?php
|
||||
require WP_MEDIA_FOLDER_PLUGIN_DIR . '/class/pages/settings/saved_info.php';
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<div>
|
||||
<div class="wpmf_row_full">
|
||||
<?php
|
||||
if (is_plugin_active('wp-media-folder-addon/wp-media-folder-addon.php')) {
|
||||
// phpcs:ignore WordPress.Security.EscapeOutput -- Content already escaped in the method
|
||||
echo $synchronization;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,615 @@
|
||||
<?php
|
||||
/* Prohibit direct script loading */
|
||||
defined('ABSPATH') || die('No direct script access allowed!');
|
||||
?>
|
||||
<div id="rename_on_upload" class="tab-content">
|
||||
<div class="content-box content-wpmf-files-folders">
|
||||
<div class="ju-settings-option">
|
||||
<div class="wpmf_row_full">
|
||||
<input type="hidden" name="wpmf_media_rename" value="0">
|
||||
<label data-wpmftippy="<?php esc_html_e('Tag available: {sitename} - {foldername} - {folderslug} - {date} - {original name} - {timestamp} .
|
||||
Note: # will be replaced by increasing numbers', 'wpmf') ?>"
|
||||
class="ju-setting-label text"><?php esc_html_e('Activate media rename on upload', 'wpmf') ?>
|
||||
</label>
|
||||
<div class="ju-switch-button">
|
||||
<label class="switch">
|
||||
<input type="checkbox" name="wpmf_media_rename" value="1"
|
||||
<?php
|
||||
if (isset($media_rename) && (int)$media_rename === 1) {
|
||||
echo 'checked';
|
||||
}
|
||||
?>
|
||||
>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf_right m-r-0">
|
||||
<div class="wpmf_row_full">
|
||||
<label for="wpmf_patern" class="ju-setting-label text"
|
||||
data-wpmftippy="<?php esc_html_e('Tag avaiable: {sitename} - {foldername} - {folderslug} - {date} - {original name} .
|
||||
Note: # will be replaced by increasing numbers', 'wpmf') ?>" style="min-width: 50px">
|
||||
<?php esc_html_e('Pattern', 'wpmf') ?>
|
||||
</label>
|
||||
<label class="line-height-50">
|
||||
<input type="text" name="wpmf_patern"
|
||||
id="wpmf_patern" class="regular-text wpmf_width_60"
|
||||
value="<?php echo esc_attr($wpmf_pattern); ?>">
|
||||
</label>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="title_h3"><?php esc_html_e('Format Media Titles', 'wpmf'); ?></h3>
|
||||
<h4 class="title_h4">
|
||||
<label data-wpmftippy="<?php esc_html_e('Remove characters automatically on media upload', 'wpmf'); ?>"
|
||||
class="text"><?php esc_html_e('Remove Characters', 'wpmf') ?>
|
||||
</label>
|
||||
</h4>
|
||||
|
||||
<div class="ju-settings-option wpmf-no-shadow">
|
||||
<div class="wpmf_row_full">
|
||||
<input type="hidden" name="format_mediatitle" value="0">
|
||||
<label data-wpmftippy="<?php esc_html_e('Additionally to the file rename on upload pattern, you can apply rename options below', 'wpmf') ?>"
|
||||
class="ju-setting-label text"><?php esc_html_e('Activate format media title', 'wpmf') ?>
|
||||
</label>
|
||||
<div class="ju-switch-button">
|
||||
<label class="switch">
|
||||
<input type="checkbox" name="format_mediatitle" value="1"
|
||||
<?php
|
||||
if (isset($format_mediatitle) && (int)$format_mediatitle === 1) {
|
||||
echo 'checked';
|
||||
}
|
||||
?>
|
||||
>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wpmf_row_full wpmf-no-margin">
|
||||
<div class="wrap_left">
|
||||
<div class="wpmf-field-setting">
|
||||
<input type="hidden" name="wpmf_options_format_title[hyphen]" value="0">
|
||||
<div class="pure-checkbox">
|
||||
<input id="wpmf_hyphen" type="checkbox" name="wpmf_options_format_title[hyphen]"
|
||||
<?php checked($options_format_title['hyphen'], 1) ?> value="1">
|
||||
<label for="wpmf_hyphen" class="ju-setting-label"><?php esc_html_e('Hyphen', 'wpmf') ?>
|
||||
-</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wpmf-field-setting">
|
||||
<div class="pure-checkbox">
|
||||
<input type="hidden" name="wpmf_options_format_title[period]" value="0">
|
||||
<input id="wpmf_period" type="checkbox"
|
||||
name="wpmf_options_format_title[period]"
|
||||
<?php checked($options_format_title['period'], 1) ?> value="1">
|
||||
<label for="wpmf_period" class="ju-setting-label"><?php esc_html_e('Period', 'wpmf') ?>
|
||||
.</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wpmf-field-setting">
|
||||
<div class="pure-checkbox">
|
||||
<input type="hidden" name="wpmf_options_format_title[plus]" value="0">
|
||||
<input id="wpmf_plus" type="checkbox"
|
||||
name="wpmf_options_format_title[plus]"
|
||||
<?php checked($options_format_title['plus'], 1) ?> value="1">
|
||||
<label for="wpmf_plus" class="ju-setting-label"><?php esc_html_e('Plus', 'wpmf') ?> +</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wpmf-field-setting">
|
||||
<div class="pure-checkbox">
|
||||
<input type="hidden" name="wpmf_options_format_title[ampersand]" value="0">
|
||||
<input id="wpmf_ampersand" type="checkbox"
|
||||
name="wpmf_options_format_title[ampersand]"
|
||||
<?php checked($options_format_title['ampersand'], 1) ?> value="1">
|
||||
<label for="wpmf_ampersand" class="ju-setting-label"><?php esc_html_e('Ampersand', 'wpmf') ?>
|
||||
@</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wpmf-field-setting">
|
||||
<div class="pure-checkbox">
|
||||
<input type="hidden" name="wpmf_options_format_title[copyright]" value="0">
|
||||
<input id="wpmf_copyright" type="checkbox"
|
||||
name="wpmf_options_format_title[copyright]"
|
||||
<?php checked($options_format_title['copyright'], 1) ?> value="1">
|
||||
<label for="wpmf_copyright" class="ju-setting-label"><?php esc_html_e('Copyright', 'wpmf') ?>
|
||||
©</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wpmf-field-setting">
|
||||
<div class="pure-checkbox">
|
||||
<input type="hidden" name="wpmf_options_format_title[square_brackets]" value="0">
|
||||
<input id="wpmf_square_brackets" type="checkbox"
|
||||
name="wpmf_options_format_title[square_brackets]"
|
||||
<?php checked($options_format_title['square_brackets'], 1) ?> value="1">
|
||||
<label for="wpmf_square_brackets"
|
||||
class="ju-setting-label"><?php esc_html_e('Square brackets', 'wpmf') ?> []</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wpmf-field-setting">
|
||||
<div class="pure-checkbox">
|
||||
<input type="hidden" name="wpmf_options_format_title[curly_brackets]" value="0">
|
||||
<input id="wpmf_curly_brackets" type="checkbox"
|
||||
name="wpmf_options_format_title[curly_brackets]"
|
||||
<?php checked($options_format_title['curly_brackets'], 1) ?> value="1">
|
||||
<label for="wpmf_curly_brackets"
|
||||
class="ju-setting-label"><?php esc_html_e('Curly brackets', 'wpmf') ?> {}</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wpmf-field-setting">
|
||||
<div class="pure-checkbox">
|
||||
<input type="hidden" name="wpmf_options_format_title[underscore]" value="0">
|
||||
<input id="wpmf_underscore" type="checkbox"
|
||||
name="wpmf_options_format_title[underscore]"
|
||||
<?php checked($options_format_title['underscore'], 1) ?> value="1">
|
||||
<label for="wpmf_underscore" class="ju-setting-label"><?php esc_html_e('Underscore', 'wpmf') ?>
|
||||
_</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wrap_right">
|
||||
<div class="wpmf-field-setting">
|
||||
<div class="pure-checkbox">
|
||||
<input type="hidden" name="wpmf_options_format_title[tilde]" value="0">
|
||||
<input id="wpmf_tilde" type="checkbox"
|
||||
name="wpmf_options_format_title[tilde]"
|
||||
<?php checked($options_format_title['tilde'], 1) ?> value="1">
|
||||
<label for="wpmf_tilde" class="ju-setting-label"><?php esc_html_e('Tilde', 'wpmf') ?> ~</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wpmf-field-setting">
|
||||
<div class="pure-checkbox">
|
||||
<input type="hidden" name="wpmf_options_format_title[hash]" value="0">
|
||||
<input id="wpmf_hash" type="checkbox"
|
||||
name="wpmf_options_format_title[hash]"
|
||||
<?php checked($options_format_title['hash'], 1) ?> value="1">
|
||||
<label for="wpmf_hash" class="ju-setting-label"><?php esc_html_e('Hash/pound', 'wpmf') ?>
|
||||
#</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wpmf-field-setting">
|
||||
<div class="pure-checkbox">
|
||||
<input type="hidden" name="wpmf_options_format_title[number]" value="0">
|
||||
<input id="wpmf_number" type="checkbox"
|
||||
name="wpmf_options_format_title[number]"
|
||||
<?php checked($options_format_title['number'], 1) ?> value="1">
|
||||
<label for="wpmf_number" class="ju-setting-label"><?php esc_html_e('All numbers', 'wpmf') ?>
|
||||
0-9</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wpmf-field-setting">
|
||||
<div class="pure-checkbox">
|
||||
<input type="hidden" name="wpmf_options_format_title[round_brackets]" value="0">
|
||||
<input id="wpmf_round_brackets" type="checkbox"
|
||||
name="wpmf_options_format_title[round_brackets]"
|
||||
<?php checked($options_format_title['round_brackets'], 1) ?> value="1">
|
||||
<label for="wpmf_round_brackets"
|
||||
class="ju-setting-label"><?php esc_html_e('Round brackets', 'wpmf') ?> ()</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wpmf-field-setting">
|
||||
<div class="pure-checkbox">
|
||||
<input type="hidden" name="wpmf_options_format_title[alt]" value="0">
|
||||
<input id="wpmf_alt" type="checkbox"
|
||||
name="wpmf_options_format_title[alt]"
|
||||
<?php checked($options_format_title['alt'], 1) ?> value="1">
|
||||
<label for="wpmf_alt"
|
||||
class="ju-setting-label"><?php esc_html_e('Copy title to Alternative Text Field?', 'wpmf') ?>
|
||||
(-)</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wpmf-field-setting">
|
||||
<div class="pure-checkbox">
|
||||
<input type="hidden" name="wpmf_options_format_title[description]" value="0">
|
||||
<input id="wpmf_description" type="checkbox"
|
||||
name="wpmf_options_format_title[description]"
|
||||
<?php checked($options_format_title['description'], 1) ?> value="1">
|
||||
<label for="wpmf_description"
|
||||
class="ju-setting-label"><?php esc_html_e('Copy title to Description Field?', 'wpmf') ?>
|
||||
(.)</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wpmf-field-setting">
|
||||
<div class="pure-checkbox">
|
||||
<input type="hidden" name="wpmf_options_format_title[caption]" value="0">
|
||||
<input id="wpmf_caption" type="checkbox"
|
||||
name="wpmf_options_format_title[caption]"
|
||||
<?php checked($options_format_title['caption'], 1) ?> value="1">
|
||||
<label for="wpmf_caption"
|
||||
class="ju-setting-label"><?php esc_html_e('Copy title to Caption Field?', 'wpmf') ?>
|
||||
(_)</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf_width_100 p-lr-20 wpmf-no-shadow">
|
||||
<div class="wpmf_row_full">
|
||||
<h2>
|
||||
<label data-wpmftippy="<?php esc_html_e('Add capital letters automatically on media upload', 'wpmf'); ?>"
|
||||
class="text"><?php esc_html_e('Automatic capitalization', 'wpmf') ?>
|
||||
</label>
|
||||
</h2>
|
||||
|
||||
<label>
|
||||
<select name="wpmf_options_format_title[capita]" class="wpmf_width_100">
|
||||
<option <?php selected($options_format_title['capita'], 'cap_all') ?>
|
||||
value="cap_all"><?php esc_html_e('Capitalize All Words', 'wpmf'); ?></option>
|
||||
<option <?php selected($options_format_title['capita'], 'cap_first') ?>
|
||||
value="cap_first"><?php esc_html_e('Capitalize First Word Only', 'wpmf'); ?></option>
|
||||
<option <?php selected($options_format_title['capita'], 'all_lower') ?>
|
||||
value="all_lower"><?php esc_html_e('All Words Lower Case', 'wpmf'); ?></option>
|
||||
<option <?php selected($options_format_title['capita'], 'all_upper') ?>
|
||||
value="all_upper"><?php esc_html_e('All Words Upper Case', 'wpmf'); ?></option>
|
||||
<option <?php selected($options_format_title['capita'], 'dont_alter') ?>
|
||||
value="dont_alter"><?php esc_html_e('Don\'t Alter (title text isn\'t modified in any way)', 'wpmf'); ?></option>
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="watermark" class="tab-content">
|
||||
<div class="content-box content-wpmf-files-folders">
|
||||
<div class="ju-settings-option wpmf_width_100 p-lr-20">
|
||||
<div class="ju-settings-option wpmf_width_40 wpmf-no-shadow wpmf-no-padding wpmf-no-margin">
|
||||
<div class="wpmf_row_full">
|
||||
<input type="hidden" name="wpmf_option_image_watermark" value="0">
|
||||
<b data-wpmftippy="<?php esc_html_e('Watermark will be applied only after saving the
|
||||
settings and regenerate the thumnails (hit the regenerate thumnails button)', 'wpmf'); ?>"
|
||||
class="ju-setting-label text wpmf-no-padding"><?php esc_html_e('Images watermark', 'wpmf') ?></b>
|
||||
<div class="ju-switch-button">
|
||||
<label class="switch">
|
||||
<input type="checkbox" id="cb_option_image_watermark"
|
||||
name="wpmf_option_image_watermark" value="1"
|
||||
<?php
|
||||
if (isset($option_image_watermark) && (int)$option_image_watermark === 1) {
|
||||
echo 'checked';
|
||||
}
|
||||
?>
|
||||
>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf_width_100 wpmf-no-shadow">
|
||||
<div class="wpmf_row_full">
|
||||
<label data-wpmftippy="<?php esc_html_e('Select a picture that will be applied over your images', 'wpmf') ?>"
|
||||
class="p-b-20 wpmf_left text label_text">
|
||||
<?php esc_html_e('Select an image', 'wpmf') ?>
|
||||
</label>
|
||||
<div class="wpmf_width_100">
|
||||
<label for="wpmf_watermark_image"></label>
|
||||
<input type="text" readonly name="wpmf_watermark_image"
|
||||
id="wpmf_watermark_image" class="regular-text wpmf_width_70 wpmf-middle"
|
||||
value="<?php echo esc_attr($watermark_image); ?>">
|
||||
<input type="hidden" name="wpmf_watermark_image_id"
|
||||
id="wpmf_watermark_image_id" class="regular-text"
|
||||
value="<?php echo esc_attr($watermark_image_id); ?>">
|
||||
<div class="min-w-0 ju-button waves-effect waves-light wpmf_watermark_select_image">
|
||||
<?php esc_html_e('+ Select', 'wpmf') ?>
|
||||
</div>
|
||||
<div class="min-w-0 ju-button waves-effect waves-light wpmf_watermark_clear_image"><?php esc_html_e('Clear', 'wpmf') ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf-no-shadow">
|
||||
<div class="wpmf_row_full">
|
||||
<label data-wpmftippy="<?php esc_html_e('Set the watermark opacity (0-100)', 'wpmf'); ?>"
|
||||
class="p-b-20 wpmf_left text label_text">
|
||||
<?php esc_html_e('Watermark opacity', 'wpmf') ?>
|
||||
</label>
|
||||
<div class="wrap_apply wpmf_width_100">
|
||||
<div>
|
||||
<label>
|
||||
<input type="number" class="small-text"
|
||||
name="watermark_opacity"
|
||||
value="<?php echo (int)$watermark_opacity ?>" min="0" max="100">
|
||||
</label>
|
||||
<label><?php esc_html_e('%', 'wpmf') ?></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf-no-shadow">
|
||||
<div class="wpmf_row_full">
|
||||
<label data-wpmftippy="<?php esc_html_e('Select the watermark image position', 'wpmf'); ?>"
|
||||
class="p-b-20 wpmf_left text label_text">
|
||||
<?php esc_html_e('Watermark position', 'wpmf') ?>
|
||||
</label>
|
||||
<label class="wpmf_width_100">
|
||||
<select name="wpmf_watermark_position" class="wpmf_width_50">
|
||||
<option
|
||||
<?php selected($watermark_position, 'center'); ?>
|
||||
value="center"><?php esc_html_e('Center', 'wpmf') ?></option>
|
||||
<option
|
||||
<?php selected($watermark_position, 'bottom_left'); ?>
|
||||
value="bottom_left"><?php esc_html_e('Bottom Left', 'wpmf') ?></option>
|
||||
<option
|
||||
<?php selected($watermark_position, 'bottom_right'); ?>
|
||||
value="bottom_right"><?php esc_html_e('Bottom Right', 'wpmf') ?></option>
|
||||
<option
|
||||
<?php selected($watermark_position, 'top_right'); ?>
|
||||
value="top_right"><?php esc_html_e('Top Right', 'wpmf') ?></option>
|
||||
<option
|
||||
<?php selected($watermark_position, 'top_left'); ?>
|
||||
value="top_left"><?php esc_html_e('Top Left', 'wpmf') ?></option>
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf-no-shadow wpmf-no-padding">
|
||||
<div class="wpmf_row_full">
|
||||
<label data-wpmftippy="<?php esc_html_e('Make a watermark fit each photo size, resize the width of the watermark', 'wpmf'); ?>"
|
||||
class="p-b-20 wpmf_left text label_text">
|
||||
<?php esc_html_e('Set size of watermark from picture', 'wpmf') ?>
|
||||
</label>
|
||||
<div class="wrap_apply wpmf_width_100">
|
||||
<div>
|
||||
<label>
|
||||
<input type="number" class="small-text"
|
||||
name="watermark_image_scaling"
|
||||
value="<?php echo (int)$watermark_image_scaling ?>">
|
||||
</label>
|
||||
<label><?php esc_html_e('%', 'wpmf') ?></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf-no-shadow">
|
||||
<div class="wpmf_row_full">
|
||||
<label data-wpmftippy="<?php esc_html_e('Select the watermark margin unit', 'wpmf'); ?>"
|
||||
class="p-b-20 wpmf_left text label_text">
|
||||
<?php esc_html_e('Margin unit', 'wpmf') ?>
|
||||
</label>
|
||||
<label class="wpmf_width_100">
|
||||
<select name="watermark_margin_unit" class="watermark_margin_unit">
|
||||
<option
|
||||
<?php selected($watermark_margin_unit, 'px'); ?>
|
||||
value="px"><?php esc_html_e('px', 'wpmf') ?></option>
|
||||
<option
|
||||
<?php selected($watermark_margin_unit, '%'); ?>
|
||||
value="%"><?php esc_html_e('%', 'wpmf') ?></option>
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf_width_100 wpmf-no-shadow">
|
||||
<div class="wpmf_row_full">
|
||||
<label data-wpmftippy="<?php esc_html_e('Watermark image margin', 'wpmf'); ?>"
|
||||
class="p-b-20 wpmf_left text label_text">
|
||||
<?php esc_html_e('Image margin', 'wpmf') ?>
|
||||
</label>
|
||||
<div class="wpmf_width_100">
|
||||
<div class="ju-settings-option wpmf-no-shadow wpmf_width_25 wpmf-no-margin">
|
||||
<label class="wtm-label-small-text label_text"><?php esc_html_e('Top', 'wpmf') ?></label>
|
||||
<label>
|
||||
<input type="number" class="small-text"
|
||||
name="watermark_margin[top]"
|
||||
value="<?php echo (int)$watermark_margin['top'] ?>">
|
||||
</label>
|
||||
<label class="watermark_unit"><?php echo esc_html($watermark_margin_unit) ?></label>
|
||||
</div>
|
||||
<div class="ju-settings-option wpmf-no-shadow wpmf_width_25 wpmf-no-margin">
|
||||
<label class="wtm-label-small-text label_text"><?php esc_html_e('Right', 'wpmf') ?></label>
|
||||
<label>
|
||||
<input type="number" class="small-text"
|
||||
name="watermark_margin[right]"
|
||||
value="<?php echo (int)$watermark_margin['right'] ?>">
|
||||
</label>
|
||||
<label class="watermark_unit"><?php echo esc_html($watermark_margin_unit) ?></label>
|
||||
</div>
|
||||
<div class="ju-settings-option wpmf-no-shadow wpmf_width_25 wpmf-no-margin">
|
||||
<label class="wtm-label-small-text label_text"><?php esc_html_e('Bottom', 'wpmf') ?></label>
|
||||
<label>
|
||||
<input type="number" class="small-text"
|
||||
name="watermark_margin[bottom]"
|
||||
value="<?php echo (int)$watermark_margin['bottom'] ?>">
|
||||
</label>
|
||||
<label class="watermark_unit"><?php echo esc_html($watermark_margin_unit) ?></label>
|
||||
</div>
|
||||
<div class="ju-settings-option wpmf-no-shadow wpmf_width_25 wpmf-no-margin">
|
||||
<label class="wtm-label-small-text label_text"><?php esc_html_e('Left', 'wpmf') ?></label>
|
||||
<label>
|
||||
<input type="number" class="small-text"
|
||||
name="watermark_margin[left]"
|
||||
value="<?php echo (int)$watermark_margin['left'] ?>">
|
||||
</label>
|
||||
<label class="watermark_unit"><?php echo esc_html($watermark_margin_unit) ?></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf_width_100 p-lr-20">
|
||||
<div class="ju-settings-option wpmf-no-shadow">
|
||||
<div class="wpmf_row_full">
|
||||
<h4 data-wpmftippy="<?php esc_html_e('Select the size where you want to apply the watermark', 'wpmf'); ?>"
|
||||
class="text title_h4 font-size-16 color-7f8a98"><?php esc_html_e('Apply watermark on', 'wpmf') ?></h4>
|
||||
<div class="ju-settings-option wpmf-no-shadow wpmf_width_100">
|
||||
<div class="pure-checkbox ju-setting-label line-height-30">
|
||||
<input type="hidden" name="wpmf_image_watermark_apply[all_size]" value="0">
|
||||
<input id="wpmf_watermark_position_all" type="checkbox"
|
||||
name="wpmf_image_watermark_apply[all_size]"
|
||||
<?php checked($image_watermark_apply['all_size'], 1) ?> value="1">
|
||||
<label for="wpmf_watermark_position_all"><?php esc_html_e('All sizes', 'wpmf') ?></label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$sizes = apply_filters('image_size_names_choose', array(
|
||||
'thumbnail' => __('Thumbnail', 'wpmf'),
|
||||
'medium' => __('Medium', 'wpmf'),
|
||||
'large' => __('Large', 'wpmf'),
|
||||
'full' => __('Full Size', 'wpmf'),
|
||||
));
|
||||
foreach ($sizes as $ksize => $vsize) :
|
||||
?>
|
||||
<div class="ju-settings-option wpmf-no-shadow wpmf_width_100">
|
||||
<div class="pure-checkbox ju-setting-label line-height-30">
|
||||
<input type="hidden" name="wpmf_image_watermark_apply[<?php echo esc_html($ksize) ?>]"
|
||||
value="0">
|
||||
<?php if (isset($image_watermark_apply[$ksize]) && (int)$image_watermark_apply[$ksize] === 1) : ?>
|
||||
<input id="wpmf_watermark_position_<?php echo esc_html($ksize) ?>"
|
||||
type="checkbox" class="wpmf_image_watermark_apply"
|
||||
name="wpmf_image_watermark_apply[<?php echo esc_html($ksize) ?>]"
|
||||
checked value="1">
|
||||
<?php else : ?>
|
||||
<input id="wpmf_watermark_position_<?php echo esc_html($ksize) ?>"
|
||||
type="checkbox" class="wpmf_image_watermark_apply"
|
||||
name="wpmf_image_watermark_apply[<?php echo esc_html($ksize) ?>]" value="1">
|
||||
<?php endif; ?>
|
||||
<label for="wpmf_watermark_position_<?php echo esc_html($ksize) ?>"><?php echo esc_html($vsize) ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if (is_plugin_active('wp-media-folder-gallery-addon/wp-media-folder-gallery-addon.php')) : ?>
|
||||
<div class="ju-settings-option wpmf-no-shadow wpmf_right m-r-0">
|
||||
<div class="wpmf_row_full">
|
||||
<h4 data-wpmftippy="<?php esc_html_e('Select the size where you want to apply the watermark', 'wpmf'); ?>"
|
||||
class="text title_h4 font-size-16 color-7f8a98"><?php esc_html_e('Watermark on photograph image', 'wpmf') ?></h4>
|
||||
<?php
|
||||
$sizes = array(
|
||||
'all_size' => array(
|
||||
'name' => esc_html__('All sizes', 'wpmf'),
|
||||
'width' => 0,
|
||||
'height' => 0
|
||||
)
|
||||
);
|
||||
$saved_sizes = wpmfGetOption('photograper_default_dimensions');
|
||||
$sizes = array_merge($sizes, $saved_sizes);
|
||||
$sizes['full'] = array(
|
||||
'name' => esc_html__('Original size', 'wpmf'),
|
||||
'width' => 0,
|
||||
'height' => 0
|
||||
);
|
||||
|
||||
foreach ($sizes as $ksize => $vsize) :
|
||||
?>
|
||||
<div class="ju-settings-option wpmf-no-shadow wpmf_width_100">
|
||||
<div class="pure-checkbox ju-setting-label line-height-30">
|
||||
<input type="hidden"
|
||||
name="photograper_image_watermark_apply[<?php echo esc_html($ksize) ?>]"
|
||||
value="0">
|
||||
<?php if (isset($photograper_image_watermark_apply[$ksize]) && (int)$photograper_image_watermark_apply[$ksize] === 1) : ?>
|
||||
<input id="wpmf_watermark_position_<?php echo esc_html($ksize) ?>"
|
||||
type="checkbox"
|
||||
class="<?php echo ($ksize === 'all_size') ? 'wpmf_check_all_photograper_size' : 'wpmf_photograper_image_watermark_apply' ?>"
|
||||
name="photograper_image_watermark_apply[<?php echo esc_html($ksize) ?>]"
|
||||
checked value="1">
|
||||
<?php else : ?>
|
||||
<input id="wpmf_watermark_position_<?php echo esc_html($ksize) ?>"
|
||||
type="checkbox"
|
||||
class="<?php echo ($ksize === 'all_size') ? 'wpmf_check_all_photograper_size' : 'wpmf_photograper_image_watermark_apply' ?>"
|
||||
name="photograper_image_watermark_apply[<?php echo esc_html($ksize) ?>]"
|
||||
value="1">
|
||||
<?php endif; ?>
|
||||
<label for="wpmf_watermark_position_<?php echo esc_html($ksize) ?>"><?php echo esc_html($vsize['name']) ?></label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="ju-settings-option wpmf-no-shadow">
|
||||
<div class="wpmf_row_full">
|
||||
<h4 data-wpmftippy="<?php esc_html_e('Exclude Folders', 'wpmf'); ?>"
|
||||
class="text title_h4 font-size-16 color-7f8a98"><?php esc_html_e('Exclude Folders', 'wpmf') ?></h4>
|
||||
<input type="hidden" name="wpmf_watermark_exclude_folders">
|
||||
<div class="wrap_apply">
|
||||
<div class="watermark_exclude_folders tree_option_folders">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php if (is_plugin_active('wp-media-folder-gallery-addon/wp-media-folder-gallery-addon.php')) : ?>
|
||||
<div class="ju-settings-option wpmf-transparent">
|
||||
<div class="wpmf_row_full">
|
||||
<input type="hidden" name="watermark_exclude_public_gallery" value="0">
|
||||
<label class="ju-setting-label text"><?php esc_html_e('Exclude public galleries', 'wpmf') ?>
|
||||
</label>
|
||||
<div class="ju-switch-button">
|
||||
<label class="switch">
|
||||
<input type="checkbox" name="watermark_exclude_public_gallery" value="1"
|
||||
<?php
|
||||
if (isset($watermark_exclude_public_gallery) && (int)$watermark_exclude_public_gallery === 1) {
|
||||
echo 'checked';
|
||||
}
|
||||
?>
|
||||
>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf-transparent">
|
||||
<div class="wpmf_row_full">
|
||||
<input type="hidden" name="watermark_exclude_photograph_gallery" value="0">
|
||||
<label class="ju-setting-label text"><?php esc_html_e('Exclude photographer galleries', 'wpmf') ?>
|
||||
</label>
|
||||
<div class="ju-switch-button">
|
||||
<label class="switch">
|
||||
<input type="checkbox" name="watermark_exclude_photograph_gallery" value="1"
|
||||
<?php
|
||||
if (isset($watermark_exclude_photograph_gallery) && (int)$watermark_exclude_photograph_gallery === 1) {
|
||||
echo 'checked';
|
||||
}
|
||||
?>
|
||||
>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="wpmf_row_full">
|
||||
<label class="ju-setting-label text"></label>
|
||||
<button type="button"
|
||||
class="ju-button no-background orange-button waves-effect waves-light wpmf_watermark_regeneration"
|
||||
><?php esc_html_e('Thumbnail regeneration', 'wpmf') ?></button>
|
||||
<button type="button"
|
||||
class="ju-button orange-button no-background waves-effect waves-light btn_stop_watermark"
|
||||
><?php esc_html_e('Stop the process', 'wpmf') ?></button>
|
||||
<div class="wpmf-process-bar-full process_watermark_thumb_full">
|
||||
<div class="wpmf-process-bar process_watermark_thumb" data-w="0"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,105 @@
|
||||
<?php
|
||||
/* Prohibit direct script loading */
|
||||
defined('ABSPATH') || die('No direct script access allowed!');
|
||||
?>
|
||||
<div id="galleryadd_default_settings" class="tab-content">
|
||||
<div class="content-box content-wpmf-general">
|
||||
<?php
|
||||
if (is_plugin_active('wp-media-folder-gallery-addon/wp-media-folder-gallery-addon.php')) {
|
||||
// phpcs:ignore WordPress.Security.EscapeOutput -- Content already escaped in the method
|
||||
echo $gallery_settings_html;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="gallery_shortcode_generator" class="tab-content">
|
||||
<div class="content-box content-wpmf-general">
|
||||
<div class="wpmf_width_100 p-d-20 ju-settings-option">
|
||||
<?php
|
||||
if (is_plugin_active('wp-media-folder-gallery-addon/wp-media-folder-gallery-addon.php')) {
|
||||
// phpcs:ignore WordPress.Security.EscapeOutput -- Content already escaped in the method
|
||||
echo $gallery_shortcode_html;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="gallery_social_sharing" class="tab-content">
|
||||
<div class="content-box content-wpmf-general">
|
||||
<div class="ju-settings-option">
|
||||
<div class="wpmf_row_full">
|
||||
<input type="hidden" name="social_sharing" value="0">
|
||||
<label data-wpmftippy="<?php esc_html_e('Possibility to load social sharing buttons on hover to image in gallery', 'wpmf'); ?>"
|
||||
class="ju-setting-label text"><?php esc_html_e('Enable social sharing buttons', 'wpmf') ?></label>
|
||||
<div class="ju-switch-button">
|
||||
<label class="switch">
|
||||
<input type="checkbox" name="social_sharing" value="1"
|
||||
<?php
|
||||
if (isset($social_sharing) && (int) $social_sharing === 1) {
|
||||
echo 'checked';
|
||||
}
|
||||
?>
|
||||
>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf_width_100 p-lr-20">
|
||||
<div class="ju-settings-option wpmf-no-shadow">
|
||||
<div class="wpmf_row_full">
|
||||
<h4 class="text font-size-19 line-height-30">
|
||||
<img src="<?php echo esc_url(WPMF_PLUGIN_URL . '/assets/images/social/facebook/facebook.png') ?>"
|
||||
srcset="<?php echo esc_url(WPMF_PLUGIN_URL . '/assets/images/social/facebook/facebook@2x.png') ?> 2x, <?php echo esc_url(WPMF_PLUGIN_URL . '/assets/images/social/facebook/facebook@3x.png') ?> 3x"
|
||||
class="img_social">
|
||||
<label class="social-label wpmf_middle"><?php esc_html_e('Facebook', 'wpmf') ?></label>
|
||||
</h4>
|
||||
<input title="facebook" type="text" name="social_sharing_link[facebook]"
|
||||
class="regular-text" value="<?php echo esc_attr($social_sharing_link['facebook']); ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf-no-shadow">
|
||||
<div class="wpmf_row_full">
|
||||
<h4 class="text font-size-19 line-height-30">
|
||||
<img src="<?php echo esc_url(WPMF_PLUGIN_URL . '/assets/images/social/twitter/twitter.png') ?>"
|
||||
srcset="<?php echo esc_url(WPMF_PLUGIN_URL . '/assets/images/social/twitter/twitter@2x.png') ?> 2x, <?php echo esc_url(WPMF_PLUGIN_URL . '/assets/images/social/twitter/twitter@3x.png') ?> 3x"
|
||||
class="img_social">
|
||||
<label class="social-label wpmf_middle"><?php esc_html_e('Twitter', 'wpmf') ?></label>
|
||||
</h4>
|
||||
<input title="twitter" type="text" name="social_sharing_link[twitter]"
|
||||
class="regular-text" value="<?php echo esc_attr($social_sharing_link['twitter']); ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf-no-shadow">
|
||||
<div class="wpmf_row_full">
|
||||
<h4 class="text font-size-19 line-height-30">
|
||||
<img src="<?php echo esc_url(WPMF_PLUGIN_URL . '/assets/images/social/instagram/instagram.png') ?>"
|
||||
srcset="<?php echo esc_url(WPMF_PLUGIN_URL . '/assets/images/social/instagram/instagram@2x.png') ?> 2x, <?php echo esc_url(WPMF_PLUGIN_URL . '/assets/images/social/instagram/instagram@3x.png') ?> 3x"
|
||||
class="img_social">
|
||||
<label class="social-label wpmf_middle"><?php esc_html_e('Instagram', 'wpmf') ?></label>
|
||||
</h4>
|
||||
<input title="instagram" type="text" name="social_sharing_link[instagram]"
|
||||
class="regular-text" value="<?php echo esc_attr($social_sharing_link['instagram']); ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf-no-shadow">
|
||||
<div class="wpmf_row_full">
|
||||
<h4 class="text font-size-19 line-height-30">
|
||||
<img src="<?php echo esc_url(WPMF_PLUGIN_URL . '/assets/images/social/pinterest/pinterest.png') ?>"
|
||||
srcset="<?php echo esc_url(WPMF_PLUGIN_URL . '/assets/images/social/pinterest/pinterest@2x.png') ?> 2x, <?php echo esc_url(WPMF_PLUGIN_URL . '/assets/images/social/pinterest/pinterest@3x.png') ?> 3x"
|
||||
class="img_social">
|
||||
<label class="social-label wpmf_middle"><?php esc_html_e('Pinterest', 'wpmf') ?></label>
|
||||
</h4>
|
||||
<input title="pinterest" type="text" name="social_sharing_link[pinterest]"
|
||||
class="regular-text" value="<?php echo esc_attr($social_sharing_link['pinterest']); ?>">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/* Prohibit direct script loading */
|
||||
defined('ABSPATH') || die('No direct script access allowed!');
|
||||
?>
|
||||
<div class="tab-content">
|
||||
<div class="content-box content-wpmf-general">
|
||||
<?php
|
||||
if (is_plugin_active('wp-media-folder-gallery-addon/wp-media-folder-gallery-addon.php')) {
|
||||
// phpcs:ignore WordPress.Security.EscapeOutput -- Content already escaped in the method
|
||||
echo $gallery_photographer_settings_html;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,603 @@
|
||||
<?php
|
||||
/* Prohibit direct script loading */
|
||||
defined('ABSPATH') || die('No direct script access allowed!');
|
||||
global $wpdb;
|
||||
$featured_image_folder = wpmfGetOption('featured_image_folder');
|
||||
?>
|
||||
<div id="additional_features" class="tab-content">
|
||||
<div class="content-box content-wpmf-general">
|
||||
<div class="ju-settings-option">
|
||||
<div class="wpmf_row_full">
|
||||
<input type="hidden" name="wpmf_option_mediafolder" value="0">
|
||||
<label data-wpmftippy="<?php esc_html_e('Load WP Media Folder files on frontend. Activate it if
|
||||
you want to use a frontend page builder along with the media manager', 'wpmf'); ?>"
|
||||
class="ju-setting-label text"><?php esc_html_e('WP Media Folder on frontend', 'wpmf') ?></label>
|
||||
<div class="ju-switch-button">
|
||||
<label class="switch">
|
||||
<input type="checkbox" name="wpmf_option_mediafolder"
|
||||
value="1"
|
||||
<?php
|
||||
if (isset($option_mediafolder) && (int) $option_mediafolder === 1) {
|
||||
echo 'checked';
|
||||
}
|
||||
?>
|
||||
>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf_right m-r-0">
|
||||
<div class="wpmf_row_full">
|
||||
<input type="hidden" name="show_folder_id" value="0">
|
||||
<label data-wpmftippy="<?php esc_html_e('Display and copy the folder ID by making a right click on the folder', 'wpmf'); ?>"
|
||||
class="ju-setting-label text"><?php esc_html_e('Display folder ID', 'wpmf') ?></label>
|
||||
<div class="ju-switch-button">
|
||||
<label class="switch">
|
||||
<input type="checkbox" id="cb_option_show_folder_id" name="show_folder_id" class="show_folder_id"
|
||||
value="1"
|
||||
<?php
|
||||
if (isset($show_folder_id) && (int) $show_folder_id === 1) {
|
||||
echo 'checked';
|
||||
}
|
||||
?>
|
||||
>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option">
|
||||
<div class="wpmf_row_full">
|
||||
<input type="hidden" name="hide_tree" value="0">
|
||||
<label data-wpmftippy="<?php esc_html_e('Load a left folder tree on the left part of the media manager for a faster folder navigation', 'wpmf'); ?>"
|
||||
class="ju-setting-label text"><?php esc_html_e('Enable folder tree', 'wpmf') ?></label>
|
||||
<div class="ju-switch-button">
|
||||
<label class="switch">
|
||||
<input type="checkbox" name="hide_tree"
|
||||
value="1"
|
||||
<?php
|
||||
if (isset($hide_tree) && (int) $hide_tree === 1) {
|
||||
echo 'checked';
|
||||
}
|
||||
?>
|
||||
>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf_right m-r-0">
|
||||
<div class="wpmf_row_full">
|
||||
<input type="hidden" name="enable_folders" value="0">
|
||||
<label data-wpmftippy="<?php esc_html_e('Enable or not the display of folders in the main view on top of the media', 'wpmf'); ?>"
|
||||
class="ju-setting-label text"><?php esc_html_e('Enable folders on top of media', 'wpmf') ?></label>
|
||||
<div class="ju-switch-button">
|
||||
<label class="switch">
|
||||
<input type="checkbox" name="enable_folders"
|
||||
value="1"
|
||||
<?php
|
||||
if (isset($enable_folders) && (int) $enable_folders === 1) {
|
||||
echo 'checked';
|
||||
}
|
||||
?>
|
||||
>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option">
|
||||
<div class="wpmf_row_full">
|
||||
<input type="hidden" name="wpmf_option_countfiles" value="0">
|
||||
<label data-wpmftippy="<?php esc_html_e('Display the number of media
|
||||
available in each folder, in the folder tree. This option is applied for administrator role only.', 'wpmf'); ?>"
|
||||
class="ju-setting-label text"><?php esc_html_e('Media count', 'wpmf') ?></label>
|
||||
<div class="ju-switch-button">
|
||||
<label class="switch">
|
||||
<input type="checkbox" id="cb_option_countfiles" name="wpmf_option_countfiles"
|
||||
value="1"
|
||||
<?php
|
||||
if (isset($option_countfiles) && (int) $option_countfiles === 1) {
|
||||
echo 'checked';
|
||||
}
|
||||
?>
|
||||
>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf_right m-r-0">
|
||||
<div class="wpmf_row_full">
|
||||
<input type="hidden" name="root_media_count" value="0">
|
||||
<label data-wpmftippy="<?php esc_html_e('Display the number of media
|
||||
available in root folder, in the folder tree. This option is applied for administrator role only.', 'wpmf'); ?>"
|
||||
class="ju-setting-label text"><?php esc_html_e('Root media count', 'wpmf') ?></label>
|
||||
<div class="ju-switch-button">
|
||||
<label class="switch">
|
||||
<input type="checkbox" name="root_media_count"
|
||||
value="1"
|
||||
<?php
|
||||
if (isset($root_media_count) && (int) $root_media_count === 1) {
|
||||
echo 'checked';
|
||||
}
|
||||
?>
|
||||
>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option">
|
||||
<div class="wpmf_row_full">
|
||||
<input type="hidden" name="wpmf_option_override" value="0">
|
||||
<label data-wpmftippy="<?php esc_html_e('Possibility to replace an existing file by another one.', 'wpmf'); ?>"
|
||||
class="ju-setting-label text"><?php esc_html_e('Override file', 'wpmf') ?></label>
|
||||
<div class="ju-switch-button">
|
||||
<label class="switch">
|
||||
<input type="checkbox" id="cb_option_override"
|
||||
name="wpmf_option_override" value="1"
|
||||
<?php
|
||||
if (isset($option_override) && (int) $option_override === 1) {
|
||||
echo 'checked';
|
||||
}
|
||||
?>
|
||||
>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf_right m-r-0">
|
||||
<div class="wpmf_row_full">
|
||||
<input type="hidden" name="wpmf_option_duplicate" value="0">
|
||||
<label data-wpmftippy="<?php esc_html_e('Add a button to duplicate a media from the media manager', 'wpmf'); ?>"
|
||||
class="ju-setting-label text"><?php esc_html_e('Duplicate file', 'wpmf') ?>
|
||||
</label>
|
||||
<div class="ju-switch-button">
|
||||
<label class="switch">
|
||||
<input type="checkbox" id="cb_option_duplicate"
|
||||
name="wpmf_option_duplicate" value="1"
|
||||
<?php
|
||||
if (isset($option_duplicate) && (int) $option_duplicate === 1) {
|
||||
echo 'checked';
|
||||
}
|
||||
?>
|
||||
>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option">
|
||||
<div class="wpmf_row_full">
|
||||
<input type="hidden" name="wpmf_option_hoverimg" value="0">
|
||||
<label data-wpmftippy="<?php esc_html_e('On mouse hover on an image, a large preview is displayed', 'wpmf'); ?>"
|
||||
class="ju-setting-label text"><?php esc_html_e('Hover image', 'wpmf') ?></label>
|
||||
<div class="ju-switch-button">
|
||||
<label class="switch">
|
||||
<input type="checkbox" id="cb_option_hoverimg" name="wpmf_option_hoverimg" value="1"
|
||||
<?php
|
||||
if (isset($option_hoverimg) && (int) $option_hoverimg === 1) {
|
||||
echo 'checked';
|
||||
}
|
||||
?>
|
||||
>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf_right m-r-0">
|
||||
<div class="wpmf_row_full">
|
||||
<input type="hidden" name="wpmf_useorder" value="0">
|
||||
<label data-wpmftippy="<?php esc_html_e('Additional filters will be added in the media views.', 'wpmf'); ?>"
|
||||
class="ju-setting-label text"><?php esc_html_e('Enable the filter and order feature', 'wpmf') ?></label>
|
||||
<div class="ju-switch-button">
|
||||
<label class="switch">
|
||||
<input type="checkbox" name="wpmf_useorder" value="1"
|
||||
<?php
|
||||
if (isset($useorder) && (int) $useorder === 1) {
|
||||
echo 'checked';
|
||||
}
|
||||
?>
|
||||
>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option">
|
||||
<div class="wpmf_row_full">
|
||||
<input type="hidden" name="load_gif" value="0">
|
||||
<label data-wpmftippy="<?php esc_html_e('Automatically play the GIF animation on page load. By default it’s a static image in WordPress', 'wpmf') ?>"
|
||||
class="ju-setting-label text"><?php esc_html_e('Load GIF file on page load', 'wpmf') ?>
|
||||
</label>
|
||||
<div class="ju-switch-button">
|
||||
<label class="switch">
|
||||
<input type="checkbox" name="load_gif" value="1"
|
||||
<?php
|
||||
if (isset($load_gif) && (int) $load_gif === 1) {
|
||||
echo 'checked';
|
||||
}
|
||||
?>
|
||||
>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf_right m-r-0">
|
||||
<div class="wpmf_row_full">
|
||||
<input type="hidden" name="wpmf_option_media_remove" value="0">
|
||||
<label data-wpmftippy="<?php esc_html_e('When you remove a folder all media inside will also be
|
||||
removed if this option is activated. Use with caution.', 'wpmf'); ?>"
|
||||
class="ju-setting-label text"><?php esc_html_e('Remove a folder with its media', 'wpmf') ?></label>
|
||||
<div class="ju-switch-button">
|
||||
<label class="switch">
|
||||
<input type="checkbox" id="cb_option_media_remove"
|
||||
name="wpmf_option_media_remove" value="1"
|
||||
<?php
|
||||
if (isset($option_media_remove) && (int) $option_media_remove === 1) {
|
||||
echo 'checked';
|
||||
}
|
||||
?>
|
||||
>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option">
|
||||
<div class="wpmf_row_full">
|
||||
<input type="hidden" name="search_file_include_childrent" value="0">
|
||||
<label data-wpmftippy="<?php esc_html_e('If enabled, when you search file in a folder, it will search in its subfolders too', 'wpmf'); ?>"
|
||||
class="ju-setting-label text"><?php esc_html_e('Search file in a folder and its subfolder', 'wpmf') ?></label>
|
||||
<div class="ju-switch-button">
|
||||
<label class="switch">
|
||||
<input type="checkbox"
|
||||
name="search_file_include_childrent" value="1"
|
||||
<?php
|
||||
if (isset($search_file_include_childrent) && (int) $search_file_include_childrent === 1) {
|
||||
echo 'checked';
|
||||
}
|
||||
?>
|
||||
>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf_right m-r-0">
|
||||
<div class="wpmf_row_full">
|
||||
<input type="hidden" name="delete_all_datas" value="0">
|
||||
<label data-wpmftippy="<?php esc_html_e('Delete all data on uninstall (including addons)', 'wpmf'); ?>"
|
||||
class="ju-setting-label text"><?php esc_html_e('Delete all data on uninstall (including addons)', 'wpmf') ?></label>
|
||||
<div class="ju-switch-button">
|
||||
<label class="switch">
|
||||
<input type="checkbox" id="cb_option_delete_all_datas" name="delete_all_datas" class="delete_all_datas"
|
||||
value="1"
|
||||
<?php
|
||||
if (isset($delete_all_datas) && (int) $delete_all_datas === 1) {
|
||||
echo 'checked';
|
||||
}
|
||||
?>
|
||||
>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
<?php if (isset($delete_all_datas) && (int) $delete_all_datas === 1) : ?>
|
||||
<p class="description delete_all_label show"><?php esc_html_e('Beware: If some cloud system are connected and some private links are added in your content, you will have media broken links', 'wpmf') ?></p>
|
||||
<?php else : ?>
|
||||
<p class="description delete_all_label hide"><?php esc_html_e('Beware: If some cloud system are connected and some private links are added in your content, you will have media broken links', 'wpmf') ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option">
|
||||
<div class="wpmf_row_full">
|
||||
<input type="hidden" name="hide_remote_video" value="0">
|
||||
<label data-wpmftippy="<?php esc_html_e('Remote video feature: include and manage remote video from Youtube Vimeo or Dailymotion', 'wpmf'); ?>"
|
||||
class="ju-setting-label text"><?php esc_html_e('Enable remote video feature', 'wpmf') ?></label>
|
||||
<div class="ju-switch-button">
|
||||
<label class="switch">
|
||||
<input type="checkbox" name="hide_remote_video"
|
||||
value="1"
|
||||
<?php
|
||||
if (isset($hide_remote_video) && (int) $hide_remote_video === 1) {
|
||||
echo 'checked';
|
||||
}
|
||||
?>
|
||||
>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf_right m-r-0">
|
||||
<div class="wpmf_row_full">
|
||||
<input type="hidden" name="enable_download_media" value="0">
|
||||
<label data-wpmftippy="<?php esc_html_e('Right click on an image or file in the media manager to download it. Image original sized will be downloaded', 'wpmf'); ?>"
|
||||
class="ju-setting-label text"><?php esc_html_e('Enable download media', 'wpmf') ?></label>
|
||||
<div class="ju-switch-button">
|
||||
<label class="switch">
|
||||
<input type="checkbox" name="enable_download_media"
|
||||
value="1"
|
||||
<?php
|
||||
if (isset($enable_download_media) && (int) $enable_download_media === 1) {
|
||||
echo 'checked';
|
||||
}
|
||||
?>
|
||||
>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="default_featured_image_wrap">
|
||||
<div class="featured_image_wrap">
|
||||
<input type="hidden" class="default_featured_image" name="default_featured_image" value="0">
|
||||
<label data-wpmftippy="<?php esc_html_e('Select a default image or a random image from a media folder to be loaded by default in any new post. The image can be replaced by editing it in the post of course', 'wpmf'); ?>"
|
||||
class="ju-setting-label text"><?php esc_html_e('Default featured image', 'wpmf') ?></label>
|
||||
<div class="radio_group">
|
||||
<label><input type="radio" class="radio_group_input" name="default_featured_image_type" <?php checked($default_featured_image_type, 'fixed', true) ?> value="fixed"> <?php esc_html_e('Specific image', 'wpmf') ?></label>
|
||||
<label><input type="radio" class="radio_group_input" name="default_featured_image_type" <?php checked($default_featured_image_type, 'random', true) ?> value="random"> <?php esc_html_e('Random image from folder', 'wpmf') ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wpmf_row_full">
|
||||
<div data-option="fixed" class="radion_option_content feature_image_fixed <?php echo ($default_featured_image_type === 'fixed') ? '' : 'hide' ?>">
|
||||
<div class="featured_image_img <?php echo (empty($default_featured_image)) ? 'hide' : '' ?>">
|
||||
<?php if (!empty($default_featured_image)) : ?>
|
||||
<img src="<?php echo esc_url(wp_get_attachment_image_url($default_featured_image, 'thumbnail')) ?>">
|
||||
<?php else : ?>
|
||||
<img src="">
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php if (!empty($default_featured_image)) : ?>
|
||||
<input type="text" readonly="" class="regular-text wpmf_width_50 wpmf-middle default_featured_image_url" value="<?php echo esc_url(wp_get_attachment_image_url($default_featured_image, 'full')) ?>">
|
||||
<?php else : ?>
|
||||
<input type="text" readonly="" class="regular-text wpmf_width_50 wpmf-middle default_featured_image_url" value="">
|
||||
<?php endif; ?>
|
||||
<button type="button" class="ju-button waves-effect waves-light min-w-0 select_default_featured_image"><?php esc_html_e('+ Select', 'wpmf') ?></button>
|
||||
<button type="button" class="ju-button waves-effect waves-light min-w-0 wpmf-remove-featured-image"><?php esc_html_e('Clear', 'wpmf') ?></button>
|
||||
|
||||
</div>
|
||||
<div data-option="random" class="radion_option_content feature_image_dropdown <?php echo ($default_featured_image_type === 'random') ? '' : 'hide' ?>">
|
||||
<label data-wpmftippy="<?php esc_html_e('Use random image from a media folder to be loaded by default in any new post. The image can be replaced by editing it in the post of course', 'wpmf'); ?>"
|
||||
class="ju-setting-label text"><?php esc_html_e('Select a folder', 'wpmf') ?></label>
|
||||
<!--<select name="featured_image_folder" class="featured_image_folder" data-value="<?php /*echo (int)$featured_image_folder */?>"></select>-->
|
||||
<div class="feature_image_folders tree_option_folders" data-value="<?php echo (int)$featured_image_folder ?>">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--------------------------------------- filter and order ----------------------------------->
|
||||
<div id="media_filtering" class="tab-content">
|
||||
<div class="content-box wpmf-config-gallery">
|
||||
<div id="wpmf_filter_dimension" class="media_filter_block wpmf_left">
|
||||
<ul class="wpmf_filter_dimension wpmf-no-margin">
|
||||
<li class="div_list_child accordion-section control-section control-section-default open">
|
||||
<h3 class="accordion-section-title wpmf-section-title dimension_title"
|
||||
data-title="filldimension"
|
||||
tabindex="0"><?php esc_html_e('List default filter size', 'wpmf') ?>
|
||||
<i class="zmdi zmdi-chevron-up"></i>
|
||||
<i class="zmdi zmdi-chevron-down"></i>
|
||||
</h3>
|
||||
<ul class="content_list_filldimension">
|
||||
<?php
|
||||
if (count($a_dimensions) > 0) :
|
||||
foreach ($a_dimensions as $a_dimension) :
|
||||
?>
|
||||
<li class="wpmf_width_100 ju-settings-option customize-control customize-control-select item_dimension"
|
||||
style="display: list-item;" data-value="<?php echo esc_html($a_dimension); ?>" data-type="default">
|
||||
<div class="wpmf_row_full">
|
||||
<div class="pure-checkbox ju-setting-label">
|
||||
<input title id="<?php echo esc_attr($a_dimension) ?>" type="checkbox"
|
||||
name="dimension[]"
|
||||
value="<?php echo esc_attr($a_dimension) ?>"
|
||||
<?php
|
||||
if (in_array($a_dimension, $array_s_de)) {
|
||||
echo 'checked';
|
||||
}
|
||||
?>
|
||||
>
|
||||
<label class="lb" for="<?php echo esc_html($a_dimension) ?>"><?php echo esc_html($a_dimension) ?></label>
|
||||
<label class="ju-switch-button">
|
||||
<i class="material-icons wpmf-md-edit"
|
||||
data-label="dimension"
|
||||
data-value="<?php echo esc_html($a_dimension); ?>"
|
||||
title="<?php esc_html_e('Edit dimension', 'wpmf'); ?>">
|
||||
border_color
|
||||
</i>
|
||||
|
||||
<i class="material-icons wpmf-delete" data-label="dimension"
|
||||
data-value="<?php echo esc_html($a_dimension); ?>"
|
||||
title="<?php esc_html_e('Remove dimension', 'wpmf'); ?>">delete_outline</i>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<?php
|
||||
endforeach;
|
||||
endif;
|
||||
?>
|
||||
|
||||
<li class="wpmf_width_100 p-d-20 ju-settings-option customize-control customize-control-select dimension"
|
||||
style="display: list-item;">
|
||||
<div class="wpmf_width_40 wpmf_left">
|
||||
<span class="label_text_bold"><?php esc_html_e('Width', 'wpmf'); ?></span>
|
||||
<label>
|
||||
<input name="wpmf_width_dimension" min="0"
|
||||
class="small-text wpmf_width_dimension"
|
||||
type="number">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="wpmf_width_50 wpmf_right wpmf_text_right">
|
||||
<span class="label_text_bold"><?php esc_html_e('Height', 'wpmf'); ?></span>
|
||||
<label>
|
||||
<input name="wpmf_height_dimension" min="0"
|
||||
class="small-text wpmf_height_dimension"
|
||||
type="number">
|
||||
</label>
|
||||
<span class="label_text_bold m-l-20"><?php esc_html_e('px', 'wpmf'); ?></span>
|
||||
</div>
|
||||
|
||||
<div class="wpmf_width_100">
|
||||
<span
|
||||
class="wpmf_width_100 m-t-30 ju-button no-background orange-button waves-effect waves-light add_dimension" data-type="default">
|
||||
<?php esc_html_e('Add new size', 'wpmf'); ?></span>
|
||||
<span data-label="dimension" id="edit_dimension"
|
||||
class="m-t-10 wpmf_left ju-button orange-button waves-effect waves-light wpmfedit edit_dimension"
|
||||
style="display: none;" data-type="default">
|
||||
<?php esc_html_e('Save', 'wpmf'); ?>
|
||||
</span>
|
||||
<span id="can_dimension"
|
||||
class="m-t-10 wpmf_right ju-button no-background orange-button waves-effect waves-light wpmf_can"
|
||||
data-label="dimension"
|
||||
style="display: none;"><?php esc_html_e('Cancel', 'wpmf'); ?></span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<p class="description">
|
||||
<?php esc_html_e('Image dimension filtering available in filter.
|
||||
Display image with a dimension and above.', 'wpmf'); ?>
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="wpmf_filter_weights" class="media_filter_block wpmf_right">
|
||||
<ul class="wpmf_filter_weight wpmf-no-margin">
|
||||
<li class="div_list_child accordion-section control-section control-section-default open">
|
||||
<h3 class="accordion-section-title wpmf-section-title sizes_title"
|
||||
data-title="fillweight"
|
||||
tabindex="0"><?php esc_html_e('List default filter weight', 'wpmf') ?>
|
||||
<i class="zmdi zmdi-chevron-up"></i>
|
||||
<i class="zmdi zmdi-chevron-down"></i>
|
||||
</h3>
|
||||
<ul class="content_list_fillweight">
|
||||
<?php
|
||||
if (count($a_weights) > 0) :
|
||||
foreach ($a_weights as $a_weight) :
|
||||
$labels = explode('-', $a_weight[0]);
|
||||
if ($a_weight[1] === 'kB') {
|
||||
$label = ($labels[0] / 1024) . ' kB-' . ($labels[1] / 1024) . ' kB';
|
||||
} else {
|
||||
$label = $labels[0] / (1024 * 1024);
|
||||
$label .= ' MB-';
|
||||
$label .= $labels[1] / (1024 * 1024);
|
||||
$label .= ' MB';
|
||||
}
|
||||
?>
|
||||
|
||||
<li class="wpmf_width_100 ju-settings-option customize-control customize-control-select item_weight"
|
||||
style="display: list-item;" data-value="<?php echo esc_html($a_weight[0]); ?>"
|
||||
data-unit="<?php echo esc_html($a_weight[1]); ?>">
|
||||
<div class="wpmf_row_full">
|
||||
<div class="pure-checkbox ju-setting-label">
|
||||
<input title
|
||||
id="<?php echo esc_html($a_weight[0] . ',' . $a_weight[1]) ?>"
|
||||
type="checkbox" name="weight[]"
|
||||
value="<?php echo esc_attr($a_weight[0] . ',' . $a_weight[1]) ?>"
|
||||
data-unit="<?php echo esc_html($a_weight[1]); ?>"
|
||||
<?php
|
||||
if (in_array($a_weight, $array_s_we)) {
|
||||
echo 'checked';
|
||||
}
|
||||
?>
|
||||
>
|
||||
<label class="lb" for="<?php echo esc_html($a_weight[0] . ',' . $a_weight[1]) ?>">
|
||||
<?php echo esc_html($label) ?>
|
||||
</label>
|
||||
<label class="ju-switch-button">
|
||||
<i class="material-icons wpmf-md-edit" data-label="weight"
|
||||
data-value="<?php echo esc_html($a_weight[0]); ?>"
|
||||
data-unit="<?php echo esc_html($a_weight[1]); ?>"
|
||||
title="<?php esc_html_e('Edit weight', 'wpmf'); ?>">border_color</i>
|
||||
<i class="material-icons wpmf-delete" data-label="weight"
|
||||
data-value="<?php echo esc_html($a_weight[0]); ?>"
|
||||
data-unit="<?php echo esc_html($a_weight[1]); ?>"
|
||||
title="<?php esc_html_e('Remove weight', 'wpmf'); ?>">delete_outline</i>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<?php
|
||||
endforeach;
|
||||
endif;
|
||||
?>
|
||||
|
||||
<li class="wpmf_width_100 p-d-20 ju-settings-option customize-control customize-control-select weight"
|
||||
style="display: list-item;">
|
||||
<div class="wpmf_width_40 wpmf_left">
|
||||
<span class="label_text_bold"><?php esc_html_e('Min', 'wpmf'); ?></span>
|
||||
<label>
|
||||
<input name="wpmf_min_weight" min="0" class="small-text wpmf_min_weight"
|
||||
type="number">
|
||||
</label>
|
||||
</div>
|
||||
<div class="wpmf_width_60 wpmf_right wpmf_text_right">
|
||||
<span class="label_text_bold"><?php esc_html_e('Max', 'wpmf'); ?></span>
|
||||
<label>
|
||||
<input name="wpmf_max_weight" min="0" class="small-text wpmf_max_weight"
|
||||
type="number">
|
||||
</label>
|
||||
<span class="label_text_bold m-l-20">
|
||||
<label>
|
||||
<select class="wpmfunit" data-label="weight">
|
||||
<option value="kB"><?php esc_html_e('kB', 'wpmf'); ?></option>
|
||||
<option value="MB"><?php esc_html_e('MB', 'wpmf'); ?></option>
|
||||
</select>
|
||||
</label>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wpmf_width_100">
|
||||
<span id="add_weight"
|
||||
class="wpmf_width_100 m-t-30 ju-button no-background orange-button waves-effect waves-light add_weight"><?php esc_html_e('Add weight', 'wpmf'); ?></span>
|
||||
<span data-label="weight" id="edit_weight"
|
||||
class="m-t-10 wpmf_left ju-button orange-button waves-effect waves-light wpmfedit edit_weight"
|
||||
style="display: none;">
|
||||
<?php esc_html_e('Save', 'wpmf'); ?>
|
||||
</span>
|
||||
<span id="can_dimension"
|
||||
class="m-t-10 wpmf_right ju-button no-background orange-button waves-effect waves-light wpmf_can"
|
||||
data-label="weight"
|
||||
style="display: none">
|
||||
<?php esc_html_e('Cancel', 'wpmf'); ?></span>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
<p class="description">
|
||||
<?php esc_html_e('Select weight range which you would
|
||||
like to display in media library filter', 'wpmf'); ?>
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,310 @@
|
||||
<?php
|
||||
/* Prohibit direct script loading */
|
||||
defined('ABSPATH') || die('No direct script access allowed!');
|
||||
$slug = 'imagerecycle-pdf-image-compression';
|
||||
$plugin_file = 'imagerecycle-pdf-image-compression/wp-image-recycle.php';
|
||||
|
||||
if (isset($_GET['action'])) {
|
||||
if (!file_exists(WP_PLUGIN_DIR . '/imagerecycle-pdf-image-compression')) {
|
||||
$ac = 'install-plugin_' . $slug;
|
||||
} else {
|
||||
$ac = 'activate-plugin_' . $plugin_file;
|
||||
}
|
||||
|
||||
if (empty($_GET['_wpnonce'])
|
||||
|| !wp_verify_nonce($_GET['_wpnonce'], $ac)) {
|
||||
die();
|
||||
}
|
||||
|
||||
if (!defined('IFRAME_REQUEST') && in_array($_GET['action'], array(
|
||||
'update-selected',
|
||||
'activate-plugin',
|
||||
'update-selected-themes'
|
||||
))
|
||||
) {
|
||||
define('IFRAME_REQUEST', true);
|
||||
}
|
||||
|
||||
require_once(ABSPATH . 'wp-admin/admin.php');
|
||||
include_once(ABSPATH . 'wp-admin/includes/class-wp-upgrader.php');
|
||||
|
||||
$get_plugin = isset($_REQUEST['plugin']) ? trim($_REQUEST['plugin']) : '';
|
||||
$act = isset($_REQUEST['action']) ? $_REQUEST['action'] : '';
|
||||
if ('install-plugin' === $act) {
|
||||
/**
|
||||
* Filter check capability of current user to install plugin
|
||||
*
|
||||
* @param boolean The current user has the given capability
|
||||
* @param string Action name
|
||||
*
|
||||
* @return boolean
|
||||
*
|
||||
* @ignore Hook already documented
|
||||
*/
|
||||
$wpmf_capability = apply_filters('wpmf_user_can', current_user_can('install_plugins'), 'install_imagerecycle_plugin');
|
||||
if (!$wpmf_capability) {
|
||||
wp_die(esc_html__('You do not have sufficient permissions to install plugins on this site.', 'wpmf'));
|
||||
}
|
||||
include_once(ABSPATH . 'wp-admin/includes/plugin-install.php'); //for plugins_api..
|
||||
$setting_tab_value = 'wpmf-image-compression';
|
||||
check_admin_referer('install-plugin_' . $get_plugin);
|
||||
$api = plugins_api('plugin_information', array(
|
||||
'slug' => $get_plugin,
|
||||
'fields' => array(
|
||||
'short_description' => false,
|
||||
'sections' => false,
|
||||
'requires' => false,
|
||||
'rating' => false,
|
||||
'ratings' => false,
|
||||
'downloaded' => false,
|
||||
'last_updated' => false,
|
||||
'added' => false,
|
||||
'tags' => false,
|
||||
'compatibility' => false,
|
||||
'homepage' => false,
|
||||
'donate_link' => false,
|
||||
),
|
||||
));
|
||||
|
||||
if (is_wp_error($api)) {
|
||||
// phpcs:ignore WordPress.Security.EscapeOutput -- Content already escaped in the method
|
||||
wp_die($api);
|
||||
}
|
||||
|
||||
// phpcs:disable WordPress.WP.GlobalVariablesOverride.Prohibited -- Use to merge params in Plugin_Installer_Skin construct
|
||||
$title = __('Plugin Install', 'wpmf');
|
||||
$parent_file = 'plugins.php';
|
||||
$submenu_file = 'plugin-install.php';
|
||||
$title = sprintf(__('Installing Plugin: %s', 'wpmf'), $api->name . ' ' . $api->version);
|
||||
$nonce = 'install-plugin_' . $get_plugin;
|
||||
$url = 'update.php?action=install-plugin&plugin=' . urlencode($get_plugin);
|
||||
if (isset($_GET['from'])) {
|
||||
$url .= '&from=' . urlencode(stripslashes($_GET['from']));
|
||||
}
|
||||
// phpcs:enable
|
||||
$upgrader = new Plugin_Upgrader(new Plugin_Installer_Skin(compact('title', 'url', 'nonce', 'plugin', 'api')));
|
||||
$upgrader->install($api->download_link);
|
||||
} elseif ('activate' === $act) {
|
||||
/**
|
||||
* Filter check capability of current user to active plugin
|
||||
*
|
||||
* @param boolean The current user has the given capability
|
||||
* @param string Action name
|
||||
*
|
||||
* @return boolean
|
||||
*
|
||||
* @ignore Hook already documented
|
||||
*/
|
||||
$wpmf_capability = apply_filters('wpmf_user_can', current_user_can('activate_plugins'), 'active_imagerecycle_plugin');
|
||||
if (!$wpmf_capability) {
|
||||
wp_die(esc_html__('You do not have sufficient permissions to activate plugins for this site.', 'wpmf'));
|
||||
}
|
||||
|
||||
if (is_multisite() && !is_network_admin() && is_network_only_plugin($get_plugin)) {
|
||||
wp_redirect(self_admin_url('plugins.php?plugin_status=' . $status . '&paged=' . $page . '&s=' . $s));
|
||||
exit;
|
||||
}
|
||||
|
||||
check_admin_referer('activate-plugin_' . $get_plugin);
|
||||
|
||||
$result = activate_plugin(
|
||||
$get_plugin,
|
||||
self_admin_url('plugins.php?error=true&plugin=' . $get_plugin),
|
||||
is_network_admin()
|
||||
);
|
||||
if (is_wp_error($result)) {
|
||||
if ('unexpected_output' === $result->get_error_code()) {
|
||||
$u = 'plugins.php?error=true&charsout=' . strlen($result->get_error_data());
|
||||
$u .= '&plugin=' . $get_plugin . '&plugin_status=' . $status . '&paged=' . $page . '&s=' . $s;
|
||||
$redirect = self_admin_url($u);
|
||||
wp_redirect(
|
||||
add_query_arg(
|
||||
'_error_nonce',
|
||||
wp_create_nonce('plugin-activation-error_' . $get_plugin),
|
||||
$redirect
|
||||
)
|
||||
);
|
||||
exit;
|
||||
} else {
|
||||
// phpcs:ignore WordPress.Security.EscapeOutput -- Content already escaped in the method
|
||||
wp_die($result);
|
||||
}
|
||||
}
|
||||
|
||||
if (!is_network_admin()) {
|
||||
$recent = (array) get_option('recently_activated');
|
||||
unset($recent[$get_plugin]);
|
||||
update_option('recently_activated', $recent);
|
||||
} else {
|
||||
$recent = (array) get_site_option('recently_activated');
|
||||
unset($recent[$get_plugin]);
|
||||
update_site_option('recently_activated', $recent);
|
||||
}
|
||||
|
||||
if (isset($_GET['from']) && 'import' === $_GET['from']) {
|
||||
wp_redirect(self_admin_url('import.php?import=' . str_replace('-importer', '', dirname($get_plugin)))); // overrides the ?error=true one above and redirects to the Imports page, stripping the -importer suffix
|
||||
} else {
|
||||
// overrides the ?error=true one above
|
||||
wp_redirect(
|
||||
self_admin_url('options-general.php?page=option-folder')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="content-box content-wpmf-image-compression">
|
||||
<?php if (file_exists(WP_PLUGIN_DIR . '/imagerecycle-pdf-image-compression') && is_plugin_active($plugin_file)) : ?>
|
||||
<div class="main-presentation"
|
||||
style="margin: 0 auto 20px;max-width: 1200px;font-family: helvetica,arial,sans-serif;">
|
||||
<div class="main-textcontent" align="center">
|
||||
<a href="https://www.imagerecycle.com/" target="_blank"> <img
|
||||
src="https://www.imagerecycle.com/images/Notification-mail/logo-image-recycle.png"
|
||||
alt="logo image recycle" width="500" height="84" class="CToWUd"
|
||||
style="display: block; outline: medium none; text-decoration: none;
|
||||
margin-left: auto; margin-right: auto; margin-top:15px;">
|
||||
</a>
|
||||
<p style="background-color: #ffffff; color: #445566; font-family: helvetica,arial,sans-serif;
|
||||
font-size: 24px; line-height: 24px; padding-right: 10px; padding-left: 10px;"
|
||||
align="center"><strong>Great! ImageRecycle is installed<br></strong></p>
|
||||
<p style="background-color: #ffffff; color: #445566; font-family: helvetica,arial,sans-serif;
|
||||
font-size: 14px; line-height: 22px; padding-left: 20px; padding-right: 20px; text-align: center;">
|
||||
<strong>Speed optimization of your WordPress website is highly recommended for SEO. The image
|
||||
compression is one of the tools that help to reduce your page size significantly while
|
||||
preserving the image quality.<br/><br/>You can now manage all you images and compression from
|
||||
the ImageRecycle plugin, menu Media > ImageRecycle.<br/><br/></strong> ImageRecycle got a
|
||||
dedicated plugin for WordPress that run the images optimization automatically on your website &
|
||||
PDF
|
||||
<br/>In order to start the optimization process, please install the WordPress plugin. Enjoy!</p>
|
||||
<p></p>
|
||||
<p>
|
||||
<?php
|
||||
echo '<a style="width: 250px; float: right; background: #554766;
|
||||
line-height: 18px; text-align: center; margin-left:4px;color: #fff;
|
||||
font-size: 14px;text-decoration: none; text-transform: uppercase;
|
||||
padding: 8px 20px; font-weight:bold;"
|
||||
class="edit" href="upload.php?page=wp-image-recycle-page"
|
||||
aria-label="Activate ImageRecycle pdf & image compression">
|
||||
' . esc_html__('ImageRecycle is properly installed: manage images', 'wpmf') . '</a>';
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<div class="main-presentation"
|
||||
style="margin: 0 auto 0;max-width: 1200px; background-color:#fff;
|
||||
font-family: helvetica,arial,sans-serif;">
|
||||
<div class="main-textcontent" align="center">
|
||||
<a href="https://www.imagerecycle.com/" target="_blank"> <img
|
||||
src="https://www.imagerecycle.com/images/Notification-mail/logo-image-recycle.png"
|
||||
alt="logo image recycle" width="500" height="84"
|
||||
style="display: block; outline: medium none; text-decoration: none;
|
||||
margin-left: auto; margin-right: auto; margin-top:15px;">
|
||||
</a>
|
||||
<p style="background-color: #ffffff; color: #445566;
|
||||
font-family: helvetica,arial,sans-serif; font-size: 24px; line-height: 24px;
|
||||
padding-right: 10px; padding-left: 10px;"
|
||||
align="center"><strong>Get faster with lightweight images!<br></strong></p>
|
||||
<p style="background-color: #ffffff; color: #445566;
|
||||
font-family: helvetica,arial,sans-serif; font-size: 14px; line-height: 22px;
|
||||
padding:20px; text-align: center;">
|
||||
<strong>Speed optimization of your WordPress website is highly recommended for SEO. The image
|
||||
compression is one of the tools that help to reduce your page size significantly while
|
||||
preserving the image quality.<br><img
|
||||
src="https://www.imagerecycle.com/images/No-compress/Optimization.gif"
|
||||
alt="optimization"
|
||||
style="display: block; outline: medium none; text-decoration: none;
|
||||
margin-left: auto; margin-right: auto; margin-top:15px;"><br>WP
|
||||
Media Folder is fully integrated with ImageRecycle service, you have a free trial with no
|
||||
engagement and we provide a 20% OFF coupon! Use the coupon here: <a
|
||||
href="https://www.imagerecycle.com/" target="_blank">www.imagerecycle.com</a></strong>
|
||||
</p>
|
||||
<div
|
||||
style="background-color:#fafafa; border: 2px dashed #ccc; border-left: 5px solid #A1B660;
|
||||
font-size: 30px; padding: 20px; line-height: 40px;">
|
||||
ImageRecycle 20% OFF, apply on all memberships: WPMF-20
|
||||
</div>
|
||||
<p style="background-color: #ffffff; color: #445566; font-family: helvetica,arial,sans-serif;
|
||||
font-size: 12px; line-height: 22px; padding-left: 20px; padding-right: 20px;
|
||||
text-align: center; font-style: italic;">
|
||||
ImageRecycle got a dedicated plugin for WordPress that run the images and PDF optimization
|
||||
automatically on your website.
|
||||
<br>In order to start the optimization process, please install the WordPress plugin. Enjoy!</p>
|
||||
<p></p>
|
||||
<p>
|
||||
<?php
|
||||
if (!file_exists(WP_PLUGIN_DIR . '/imagerecycle-pdf-image-compression')) {
|
||||
$url = wp_nonce_url(
|
||||
self_admin_url('options-general.php?page=option-folder&action=install-plugin&plugin=' . $slug),
|
||||
'install-plugin_' . $slug
|
||||
);
|
||||
if (is_multisite()) {
|
||||
/**
|
||||
* Filter check capability of current user to check install plugins on multiple site
|
||||
*
|
||||
* @param boolean The current user has the given capability
|
||||
* @param string Action name
|
||||
*
|
||||
* @return boolean
|
||||
*
|
||||
* @ignore Hook already documented
|
||||
*/
|
||||
$wpmf_capability = apply_filters('wpmf_user_can', current_user_can('manage_network_plugins'), 'install_network_imagerecycle_plugins');
|
||||
if ($wpmf_capability) {
|
||||
echo '<a style="float: right; background: #554766;line-height: 18px; text-align: center;
|
||||
color: #fff;font-size: 14px;text-decoration: none; text-transform: uppercase;
|
||||
padding: 5px 20px; font-weight:bold;"
|
||||
target="_blank" class="edit" data-slug="imagerecycle-pdf-image-compression"
|
||||
href="' . esc_html($url) . '" aria-label="Install ImageRecycle pdf & image compression 2.1.1 now"
|
||||
data-name="ImageRecycle pdf & image compression 2.1.1">
|
||||
' . esc_html__('Install ImageRecycle plugin', 'wpmf') . '</a>';
|
||||
}
|
||||
} else {
|
||||
echo '<a style="float: right; background: #554766;line-height: 18px; text-align: center;
|
||||
color: #fff;font-size: 14px;text-decoration: none;
|
||||
text-transform: uppercase; padding: 5px 20px; font-weight:bold;"
|
||||
target="_blank" class="edit" data-slug="imagerecycle-pdf-image-compression"
|
||||
href="' . esc_html($url) . '" aria-label="Install ImageRecycle pdf & image compression 2.1.1 now"
|
||||
data-name="ImageRecycle pdf & image compression 2.1.1">
|
||||
' . esc_html__('Install ImageRecycle plugin', 'wpmf') . '</a>';
|
||||
}
|
||||
} else {
|
||||
if (!is_plugin_active($plugin_file)) {
|
||||
$url = wp_nonce_url(
|
||||
'options-general.php?page=option-folder&action=activate&plugin=' . $plugin_file,
|
||||
'activate-plugin_' . $plugin_file
|
||||
);
|
||||
if (is_multisite()) {
|
||||
/**
|
||||
* Filter check capability of current user to check active plugins on multiple site
|
||||
*
|
||||
* @param boolean The current user has the given capability
|
||||
* @param string Action name
|
||||
*
|
||||
* @return boolean
|
||||
*
|
||||
* @ignore Hook already documented
|
||||
*/
|
||||
$wpmf_capability = apply_filters('wpmf_user_can', current_user_can('manage_network_plugins'), 'activate_network_imagerecycle_plugins');
|
||||
if ($wpmf_capability) {
|
||||
echo '<a style="float: right; background: #554766;line-height: 18px;
|
||||
text-align: center; color: #fff;font-size: 14px;text-decoration: none;
|
||||
text-transform: uppercase; padding: 5px 20px; font-weight:bold;"
|
||||
href="' . esc_html($url) . '" class="edit" aria-label="Activate ImageRecycle pdf & image compression">
|
||||
' . esc_html__('Activate Plugin', 'wpmf') . '</a>';
|
||||
}
|
||||
} else {
|
||||
echo '<a style="float: right; background: #554766; line-height: 18px;
|
||||
text-align: center;color: #fff;font-size: 14px;text-decoration: none;
|
||||
text-transform: uppercase; padding: 5px 20px; font-weight:bold;"
|
||||
href="' . esc_html($url) . '" class="edit" aria-label="Activate ImageRecycle pdf & image compression">
|
||||
' . esc_html__('Activate Plugin', 'wpmf') . '</a>';
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
@@ -0,0 +1,375 @@
|
||||
<?php
|
||||
/* Prohibit direct script loading */
|
||||
defined('ABSPATH') || die('No direct script access allowed!');
|
||||
wp_enqueue_style(
|
||||
'wpmf-mdl',
|
||||
WPMF_PLUGIN_URL . 'assets/css/modal-dialog/mdl-jquery-modal-dialog.css',
|
||||
array(),
|
||||
WPMF_VERSION
|
||||
);
|
||||
|
||||
wp_enqueue_style(
|
||||
'wpmf-deep_orange',
|
||||
WPMF_PLUGIN_URL . 'assets/css/modal-dialog/material.deep_orange-amber.min.css',
|
||||
array(),
|
||||
WPMF_VERSION
|
||||
);
|
||||
|
||||
wp_enqueue_script(
|
||||
'wpmf-mdl',
|
||||
WPMF_PLUGIN_URL . 'assets/js/modal-dialog/mdl-jquery-modal-dialog.js',
|
||||
array('jquery'),
|
||||
WPMF_VERSION
|
||||
);
|
||||
|
||||
wp_enqueue_style(
|
||||
'wpmf-notice-style',
|
||||
WPMF_PLUGIN_URL . 'assets/css/notice_style.css',
|
||||
array(),
|
||||
WPMF_VERSION
|
||||
);
|
||||
|
||||
wp_enqueue_script(
|
||||
'wpmf-import-external-cats',
|
||||
WPMF_PLUGIN_URL . 'assets/js/imports/import_eml.js',
|
||||
array('jquery'),
|
||||
WPMF_VERSION
|
||||
);
|
||||
$bytes = apply_filters('import_upload_size_limit', wp_max_upload_size());
|
||||
$size = size_format($bytes);
|
||||
?>
|
||||
<div id="wordpress_import" class="tab-content">
|
||||
<div id="server_export" class="wpmf_width_100">
|
||||
<div class="wpmf_width_100 top_bar">
|
||||
<h1><?php echo esc_html__('Library Import/Export', 'wpmf') ?></h1>
|
||||
<p class="import_export_desc description"><?php echo esc_html__('Export and Import your WP Media Folder library (folder and media)', 'wpmf') ?></p>
|
||||
</div>
|
||||
<div class="content-box">
|
||||
<div class="ju-settings-option wpmf_width_100 p-tb-20">
|
||||
<label data-wpmftippy="Select what do you want to export and run to generate a file that you will import on another website"
|
||||
class="ju-setting-label text wpmftippy"><?php esc_html_e('Export Media/Folders', 'wpmf'); ?></label>
|
||||
<select name="export_folder_type" class="ju-select export_folder_type">
|
||||
<option value="all" <?php selected($export_folder_type, 'all') ?>><?php esc_html_e('All folders and media', 'wpmf'); ?></option>
|
||||
<option value="only_folder" <?php selected($export_folder_type, 'only_folder') ?>><?php esc_html_e('Only the folder structure', 'wpmf'); ?></option>
|
||||
<option value="selection_folder" <?php selected($export_folder_type, 'selection_folder') ?>><?php esc_html_e('A selection of folders and media', 'wpmf'); ?></option>
|
||||
</select>
|
||||
<input type="hidden" name="wpmf_export_folders" class="wpmf_export_folders">
|
||||
<a href="#open_export_tree_folders"
|
||||
class="ju-button no-background open_export_tree_folders <?php echo ($export_folder_type === 'selection_folder') ? 'show' : 'hide' ?>"><?php esc_html_e('Select folders', 'wpmf'); ?></a>
|
||||
<a href="<?php echo esc_url(admin_url('options-general.php?page=option-folder&action=wpmf_export&wpmf_nonce=' . wp_create_nonce('wpmf_nonce') . '#server_export')) ?>"
|
||||
class="ju-button export_folder_btn no-background orange-button waves-effect waves-light"><?php esc_html_e('Run export', 'wpmf'); ?></a>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf_width_100 p-tb-20">
|
||||
<div class="wpmf_width_100">
|
||||
<label data-wpmftippy="Browse and select the file you've previously exported to run the media & folders import"
|
||||
class="ju-setting-label text wpmftippy"><?php esc_html_e('Import Media/Folders', 'wpmf'); ?></label>
|
||||
<input type="file" name="import" class="wpmf_import_folders">
|
||||
<input type="hidden" name="max_file_size" value="<?php echo esc_attr($bytes); ?>"/>
|
||||
<button name="import_folders_btn" type="submit"
|
||||
class="ju-button import_folder_btn no-background orange-button waves-effect waves-light"
|
||||
data-path="<?php echo (!empty($path)) ? esc_attr($path) : '' ?>"
|
||||
data-id="<?php echo (!empty($id)) ? esc_attr($id) : '' ?>"
|
||||
data-import_only_folder="<?php echo (!empty($import_only_folder)) ? esc_attr($import_only_folder) : '' ?>">
|
||||
<?php esc_html_e('Run import', 'wpmf'); ?>
|
||||
</button>
|
||||
</div>
|
||||
<div class="wpmf_width_100 p-lr-20 info-export-wrap">
|
||||
<label class="wpmftippy"
|
||||
data-wpmftippy="<?php esc_html_e('Server values are upload_max_filesize and post_max_size', 'wpmf'); ?>">
|
||||
<?php
|
||||
printf(esc_html__('Maximum size, server value: %s', 'wpmf'), esc_html($size));
|
||||
?>
|
||||
</label>
|
||||
|
||||
<?php if (apply_filters('import_allow_import_only_folder', true)) : ?>
|
||||
<p>
|
||||
<input type="checkbox" value="1" name="import_only_folder" id="import-attachments" checked/>
|
||||
<label for="import-attachments"><?php esc_html_e('Import only folder structure (not media)', 'wpmf'); ?></label>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
<div class="import_error_message_wrap">
|
||||
<?php
|
||||
if (isset($error_message) && $error_message !== '') {
|
||||
// phpcs:ignore WordPress.Security.EscapeOutput -- Content already escaped in the method
|
||||
echo '<div class="import_error_message">' . $error_message . '</div>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="white-popup mfp-hide" id="open_export_tree_folders">
|
||||
<div class="export_tree_folders"></div>
|
||||
<button class="ju-button save_export_folders orange-button"><?php esc_html_e('Save', 'wpmf'); ?></button>
|
||||
<span class="spinner save_export_folders_spinner"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div class="wpmf_width_100 top_bar">
|
||||
<h1><?php echo esc_html__('Import server folders', 'wpmf') ?></h1>
|
||||
</div>
|
||||
<div class="content-box">
|
||||
<div class="ju-settings-option wpmf_width_100 p-d-20 btnoption">
|
||||
<p class="description">
|
||||
<?php esc_html_e('Import folder structure and media from your
|
||||
server in the standard WordPress media manager', 'wpmf'); ?>
|
||||
<br><span class="text-orange"
|
||||
style="word-break: break-all;"><?php echo esc_html($allow_sync_extensions) ?></span>
|
||||
</p>
|
||||
<div class="wpmf_row_full">
|
||||
<div id="wpmf_foldertree" class="wpmf-no-padding"></div>
|
||||
<div class="wpmf-process-bar-full process_import_ftp_full" style="">
|
||||
<div class="wpmf-process-bar process_import_ftp" data-w="0"></div>
|
||||
</div>
|
||||
<button type="button"
|
||||
class="ju-button no-background orange-button waves-effect waves-light import_ftp_button"
|
||||
style="padding: 8.5px 15px">
|
||||
<label style="line-height: 20px"><?php esc_html_e('Import Folder', 'wpmf'); ?></label>
|
||||
<span class="spinner" style="display:none; margin: 0; vertical-align: middle"></span>
|
||||
</button>
|
||||
<span class="info_import"><?php esc_html_e('Imported!', 'wpmf'); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<?php
|
||||
/**
|
||||
* Filter check capability of current user to show import categories button
|
||||
*
|
||||
* @param boolean The current user has the given capability
|
||||
* @param string Action name
|
||||
*
|
||||
* @return boolean
|
||||
*
|
||||
* @ignore Hook already documented
|
||||
*/
|
||||
$wpmf_capability = apply_filters('wpmf_user_can', current_user_can('manage_options'), 'show_import_categories_button');
|
||||
if ($wpmf_capability) :
|
||||
?>
|
||||
<div id="server_import">
|
||||
<div class="wpmf_width_100 top_bar">
|
||||
<h1><?php echo esc_html__('Import WP media categories', 'wpmf') ?></h1>
|
||||
</div>
|
||||
<div class="content-box">
|
||||
<div class="ju-settings-option wpmf_width_100 p-d-20">
|
||||
<p class="description">
|
||||
<?php esc_html_e('Import current media and post categories as media folders', 'wpmf'); ?>
|
||||
</p>
|
||||
<p>
|
||||
<button type="button"
|
||||
class="ju-button no-background orange-button waves-effect waves-light wmpf_import_category"
|
||||
style="padding: 8.5px 15px">
|
||||
<label style="line-height: 20px"><?php esc_html_e('Import Now', 'wpmf'); ?></label>
|
||||
<span class="spinner" style="display:none; margin: 0; vertical-align: middle"></span>
|
||||
</button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php
|
||||
$folders = array();
|
||||
?>
|
||||
<div id="other_plugin_import" class="tab-content">
|
||||
<?php
|
||||
$find = false;
|
||||
$total = $wpdb->get_var('SELECT COUNT(term_id) as total FROM ' . $wpdb->term_taxonomy . ' WHERE taxonomy = "media_category"');
|
||||
if ($total > 0) :
|
||||
$eml_categories = $wpdb->get_results('SELECT * FROM ' . $wpdb->terms . ' as t INNER JOIN ' . $wpdb->term_taxonomy . ' AS tt ON tt.term_id = t.term_id WHERE taxonomy = "media_category"');
|
||||
$eml_categories = Joomunited\WPMediaFolder\wpmfHelper::parentSort($eml_categories);
|
||||
$fs = Joomunited\WPMediaFolder\wpmfHelper::loadImportExternalCatsScript($eml_categories, 'media_category');
|
||||
$folders = array_merge($folders, $fs);
|
||||
$find = true;
|
||||
?>
|
||||
<div class="tab-content">
|
||||
<div class="wpmf_width_100 top_bar">
|
||||
<h1><?php echo esc_html__('Import Enhanced Media Library media and folders', 'wpmf') ?></h1>
|
||||
</div>
|
||||
<div class="content-box">
|
||||
<div class="ju-settings-option wpmf_width_100 p-d-20">
|
||||
<p class="description">
|
||||
<?php echo sprintf(esc_html__('We found that you have %d media folders in Enhanced Media Library plugin. Would you like to import media and folders in your media library?', 'wpmf'), esc_html($total)) ?>
|
||||
</p>
|
||||
<p>
|
||||
<button type="button"
|
||||
class="ju-button no-background orange-button waves-effect waves-light open_import_eml open_import_external_cats"
|
||||
style="margin-left: 0 !important;" data-cat-name="media_category"><?php esc_html_e('Import Now', 'wpmf'); ?></button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
$total = $wpdb->get_var('SELECT COUNT(term_id) as total FROM ' . $wpdb->term_taxonomy . ' WHERE taxonomy = "happyfiles_category"');
|
||||
if ($total > 0) :
|
||||
$happy_categories = $wpdb->get_results('SELECT * FROM ' . $wpdb->terms . ' as t INNER JOIN ' . $wpdb->term_taxonomy . ' AS tt ON tt.term_id = t.term_id WHERE taxonomy = "happyfiles_category"');
|
||||
$happy_categories = Joomunited\WPMediaFolder\wpmfHelper::parentSort($happy_categories);
|
||||
$fs = Joomunited\WPMediaFolder\wpmfHelper::loadImportExternalCatsScript($happy_categories, 'happyfiles_category');
|
||||
$folders = array_merge($folders, $fs);
|
||||
$find = true;
|
||||
?>
|
||||
<div class="tab-content">
|
||||
<div class="wpmf_width_100 top_bar">
|
||||
<h1><?php echo esc_html__('Import HappyFiles media and folders', 'wpmf') ?></h1>
|
||||
</div>
|
||||
<div class="content-box">
|
||||
<div class="ju-settings-option wpmf_width_100 p-d-20">
|
||||
<p class="description">
|
||||
<?php echo sprintf(esc_html__('We found that you have %d media folders in HappyFiles plugin. Would you like to import media and folders in your media library?', 'wpmf'), esc_html($total)) ?>
|
||||
</p>
|
||||
<p>
|
||||
<button type="button"
|
||||
class="ju-button no-background orange-button waves-effect waves-light open_import_eml open_import_external_cats"
|
||||
style="margin-left: 0 !important;" data-cat-name="happyfiles_category"><?php esc_html_e('Import Now', 'wpmf'); ?></button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
$table_name = $wpdb->prefix . 'realmedialibrary';
|
||||
if ($wpdb->get_var('show tables like "'. $wpdb->prefix .'realmedialibrary"') === $table_name) {
|
||||
$total = $wpdb->get_var('SELECT COUNT(id) as total FROM ' . $wpdb->prefix . 'realmedialibrary');
|
||||
if ($total > 0) :
|
||||
$rml_categories = $wpdb->get_results('SELECT id as term_id, name, parent FROM ' . $wpdb->prefix . 'realmedialibrary');
|
||||
$rml_categories = Joomunited\WPMediaFolder\wpmfHelper::parentSort($rml_categories);
|
||||
$fs = Joomunited\WPMediaFolder\wpmfHelper::loadImportExternalCatsScript($rml_categories, 'real_media_library');
|
||||
$folders = array_merge($folders, $fs);
|
||||
$find = true;
|
||||
?>
|
||||
<div class="wpmf_width_100">
|
||||
<div class="wpmf_width_100 top_bar">
|
||||
<h1><?php echo esc_html__('Import Real Media Library media and folders', 'wpmf') ?></h1>
|
||||
</div>
|
||||
<div class="content-box">
|
||||
<div class="ju-settings-option wpmf_width_100 p-d-20">
|
||||
<p class="description">
|
||||
<?php echo sprintf(esc_html__('We found that you have %d media folders in Real Media Library plugin. Would you like to import media and folders in your media library?', 'wpmf'), esc_html($total)) ?>
|
||||
</p>
|
||||
<p><button type="button" class="ju-button no-background orange-button waves-effect waves-light open_import_fbv open_import_external_cats" data-cat-name="rml_category" style="margin-left: 0 !important;"><?php esc_html_e('Import Now', 'wpmf'); ?></button></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php } ?>
|
||||
<?php
|
||||
$table_name = $wpdb->prefix . 'fbv';
|
||||
if ($wpdb->get_var('show tables like "'. $wpdb->prefix .'fbv"') === $table_name) {
|
||||
$total = $wpdb->get_var('SELECT COUNT(id) as total FROM ' . $wpdb->prefix . 'fbv');
|
||||
if ($total > 0) :
|
||||
$fbv_categories = $wpdb->get_results('SELECT id as term_id, name, parent FROM ' . $wpdb->prefix . 'fbv');
|
||||
$fbv_categories = Joomunited\WPMediaFolder\wpmfHelper::parentSort($fbv_categories);
|
||||
$fs = Joomunited\WPMediaFolder\wpmfHelper::loadImportExternalCatsScript($fbv_categories, 'filebird');
|
||||
$folders = array_merge($folders, $fs);
|
||||
$find = true;
|
||||
?>
|
||||
<div class="wpmf_width_100">
|
||||
<div class="wpmf_width_100 top_bar">
|
||||
<h1><?php echo esc_html__('Import FileBird media and folders', 'wpmf') ?></h1>
|
||||
</div>
|
||||
<div class="content-box">
|
||||
<div class="ju-settings-option wpmf_width_100 p-d-20">
|
||||
<p class="description">
|
||||
<?php echo sprintf(esc_html__('We found that you have %d media folders in FileBird plugin. Would you like to import media and folders in your media library?', 'wpmf'), esc_html($total)) ?>
|
||||
</p>
|
||||
<p><button type="button" class="ju-button no-background orange-button waves-effect waves-light open_import_fbv open_import_external_cats" data-cat-name="filebird" style="margin-left: 0 !important;"><?php esc_html_e('Import Now', 'wpmf'); ?></button></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php } ?>
|
||||
<?php
|
||||
$total = $wpdb->get_var('SELECT COUNT(term_id) as total FROM ' . $wpdb->term_taxonomy . ' WHERE taxonomy = "media_folder"');
|
||||
if ($total > 0) :
|
||||
$eml_categories = $wpdb->get_results('SELECT * FROM ' . $wpdb->terms . ' as t INNER JOIN ' . $wpdb->term_taxonomy . ' AS tt ON tt.term_id = t.term_id WHERE taxonomy = "media_folder"');
|
||||
$eml_categories = Joomunited\WPMediaFolder\wpmfHelper::parentSort($eml_categories);
|
||||
$fs = Joomunited\WPMediaFolder\wpmfHelper::loadImportExternalCatsScript($eml_categories, 'media_folder');
|
||||
$folders = array_merge($folders, $fs);
|
||||
$find = true;
|
||||
?>
|
||||
<div class="wpmf_width_100">
|
||||
<div class="wpmf_width_100 top_bar">
|
||||
<h1><?php echo esc_html__('Import Folders media and folders', 'wpmf') ?></h1>
|
||||
</div>
|
||||
<div class="content-box">
|
||||
<div class="ju-settings-option wpmf_width_100 p-d-20">
|
||||
<p class="description">
|
||||
<?php echo sprintf(esc_html__('We found that you have %d media folders in Folders plugin. Would you like to import media and folders in your media library?', 'wpmf'), esc_html($total)) ?>
|
||||
</p>
|
||||
<p><button type="button" class="ju-button no-background orange-button waves-effect waves-light open_import_fbv open_import_external_cats" data-cat-name="media_folder" style="margin-left: 0 !important;"><?php esc_html_e('Import Now', 'wpmf'); ?></button></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* Filter check capability of current user to show import categories button
|
||||
*
|
||||
* @param boolean The current user has the given capability
|
||||
* @param string Action name
|
||||
*
|
||||
* @return boolean
|
||||
*
|
||||
* @ignore Hook already documented
|
||||
*/
|
||||
$wpmf_capability = apply_filters('wpmf_user_can', current_user_can('manage_options'), 'show_import_nextgen_gallery_button');
|
||||
if ($wpmf_capability && defined('NGG_PLUGIN_VERSION')) :
|
||||
$find = true;
|
||||
?>
|
||||
<div id="server_import" class="tab-content">
|
||||
<div class="wpmf_width_100 top_bar">
|
||||
<h1><?php echo esc_html__('Sync/Import NextGEN galleries', 'wpmf') ?></h1>
|
||||
</div>
|
||||
<div class="content-box">
|
||||
<div class="ju-settings-option wpmf_width_100 p-d-20">
|
||||
<p class="description">
|
||||
<?php esc_html_e('Import nextGEN albums as image in folders in the media manager.
|
||||
You can then create new galleries from WordPress media manager', 'wpmf'); ?>
|
||||
</p>
|
||||
<p>
|
||||
<button type="button"
|
||||
class="ju-button no-background orange-button waves-effect waves-light btn_import_gallery"
|
||||
style="padding: 8.5px 15px">
|
||||
<label style="line-height: 20px"><?php esc_html_e('Import Now', 'wpmf'); ?></label>
|
||||
<span class="spinner" style="display:none; margin: 0; vertical-align: middle"></span>
|
||||
</button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
if (!$find) {
|
||||
echo '<p class="description" style="text-align: center">'. esc_html__('No supported plugin detected, plugin supported are: WP Real media library, Filebird, Folders, Media library plus, HappyFiles plugins', 'wpmf') .'</p>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
global $pagenow;
|
||||
$vars = array(
|
||||
'ajaxurl' => admin_url('admin-ajax.php'),
|
||||
'pagenow' => $pagenow,
|
||||
'wpmf_nonce' => wp_create_nonce('wpmf_nonce')
|
||||
);
|
||||
|
||||
|
||||
$params = array('l18n' => array(
|
||||
'import_all_label' => esc_html__('Import All', 'wpmf'),
|
||||
'import_selected_label' => esc_html__('Import selected', 'wpmf'),
|
||||
'cancel_label' => esc_html__('Cancel', 'wpmf'),
|
||||
'eml_label_dialog' => esc_html__('Import categories from Enhanced Media Library plugin', 'wpmf'),
|
||||
'happyfiles_label_dialog' => esc_html__('Import categories from HappyFiles plugin', 'wpmf'),
|
||||
'rml_label_dialog' => esc_html__('Import categories from Real Media Library plugin', 'wpmf'),
|
||||
'fbv_label_dialog' => esc_html__('Import categories from FileBird plugin', 'wpmf'),
|
||||
'mf_label_dialog' => esc_html__('Import categories from Folders plugin', 'wpmf'),
|
||||
), 'vars' => array_merge($vars, $folders));
|
||||
wp_localize_script('wpmf-import-external-cats', 'import_external_cats_objects', $params);
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
/* Prohibit direct script loading */
|
||||
defined('ABSPATH') || die('No direct script access allowed!');
|
||||
?>
|
||||
<div style="margin: 0; float: left">
|
||||
<?php \Joomunited\WPMediaFolder\Jutranslation\Jutranslation::getInput(); ?>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,333 @@
|
||||
<?php
|
||||
/* Prohibit direct script loading */
|
||||
defined('ABSPATH') || die('No direct script access allowed!');
|
||||
?>
|
||||
<div id="user_media_access" class="tab-content">
|
||||
<div class="content-box content-wpmf-media-access">
|
||||
<div class="ju-settings-option">
|
||||
<div class="wpmf_row_full">
|
||||
<input type="hidden" name="wpmf_active_media" value="0">
|
||||
<label data-wpmftippy="<?php esc_html_e('Once user upload some media, he will have a
|
||||
personal folder, can be per User or per User Role', 'wpmf'); ?>"
|
||||
class="ju-setting-label text"><?php esc_html_e('Media access by User or User Role', 'wpmf') ?></label>
|
||||
<div class="ju-switch-button">
|
||||
<label class="switch">
|
||||
<input type="checkbox" name="wpmf_active_media" value="1"
|
||||
<?php
|
||||
if (isset($active_media) && (int)$active_media === 1) {
|
||||
echo 'checked';
|
||||
}
|
||||
?>
|
||||
>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf_right m-r-0">
|
||||
<div class="wpmf_row_full">
|
||||
<label data-wpmftippy="<?php esc_html_e('Automatically create a
|
||||
folder per User or per WordPress User Role', 'wpmf'); ?>"
|
||||
class="ju-setting-label text"><?php esc_html_e('Folder automatic creation', 'wpmf') ?></label>
|
||||
<label class="line-height-50 wpmf_right p-r-20">
|
||||
<select name="wpmf_create_folder">
|
||||
<option
|
||||
<?php selected($create_folder, 'user'); ?> value="user">
|
||||
<?php esc_html_e('By user', 'wpmf') ?>
|
||||
</option>
|
||||
<option
|
||||
<?php selected($create_folder, 'role'); ?> value="role">
|
||||
<?php esc_html_e('By role', 'wpmf') ?>
|
||||
</option>
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option">
|
||||
<h4 data-wpmftippy="<?php esc_html_e('Select the root folder to store all user media and
|
||||
folders (only if Media by User or User Role is activated above)', 'wpmf'); ?>"
|
||||
class="ju-setting-label text"><?php esc_html_e('User media folder root', 'wpmf') ?></h4>
|
||||
<div class="wpmf_row_full">
|
||||
<span id="wpmfjaouser"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf_right m-r-0">
|
||||
<div class="wpmf_row_full">
|
||||
<input type="hidden" name="all_media_in_user_root" value="0">
|
||||
<label data-wpmftippy="<?php esc_html_e('If activated the user will also be able to see the media uploaded by others in his own folder (additionally to his own media). If not activated, he\'ll see only his own media', 'wpmf'); ?>"
|
||||
class="ju-setting-label text"><?php esc_html_e('Display all media in user folder', 'wpmf') ?></label>
|
||||
<div class="ju-switch-button">
|
||||
<label class="switch">
|
||||
<input type="checkbox" name="all_media_in_user_root" value="1"
|
||||
<?php
|
||||
if (isset($all_media_in_user_root) && (int)$all_media_in_user_root === 1) {
|
||||
echo 'checked';
|
||||
}
|
||||
?>
|
||||
>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="file_design" class="tab-content">
|
||||
<div class="content-box content-wpmf-media-access">
|
||||
<div class="ju-settings-option">
|
||||
<div class="wpmf_row_full">
|
||||
<input type="hidden" name="wpmf_option_singlefile" value="0">
|
||||
<label data-wpmftippy="<?php esc_html_e('When enabling this option you will have the possibility to transform media file links (like .pdf, .doc... into a nice download button. Setup the button design below', 'wpmf'); ?>"
|
||||
class="ju-setting-label text">
|
||||
<?php esc_html_e('Single media download', 'wpmf') ?></label>
|
||||
<div class="ju-switch-button">
|
||||
<label class="switch">
|
||||
<input type="checkbox" name="wpmf_option_singlefile"
|
||||
value="1"
|
||||
<?php
|
||||
if (isset($option_singlefile) && (int)$option_singlefile === 1) {
|
||||
echo 'checked';
|
||||
}
|
||||
?>
|
||||
>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="p-d-20 ju-settings-option wpmf_width_100">
|
||||
<h4 style="font-size: 20px"><?php esc_html_e('Color Theme', 'wpmf') ?></h4>
|
||||
<div class="wpmf_width_100">
|
||||
<div class="ju-settings-option wpmf-no-shadow wpmf_width_20">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text"
|
||||
for="singlebg"><?php esc_html_e('Background color', 'wpmf') ?></label>
|
||||
<label>
|
||||
<input name="wpmf_color_singlefile[bgdownloadlink]" type="text"
|
||||
value="<?php echo esc_attr($media_download['bgdownloadlink']) ?>"
|
||||
class="inputbox input-block-level wp-color-field-bg wp-color-picker">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf-no-shadow wpmf_width_20">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text"
|
||||
for="singlebg"><?php esc_html_e('Hover color', 'wpmf') ?></label>
|
||||
<label>
|
||||
<input name="wpmf_color_singlefile[hvdownloadlink]" type="text"
|
||||
value="<?php echo esc_attr($media_download['hvdownloadlink']) ?>"
|
||||
class="inputbox input-block-level wp-color-field-hv wp-color-picker">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf_width_20 wpmf-no-shadow">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text"
|
||||
for="singlebg"><?php esc_html_e('Font color', 'wpmf') ?></label>
|
||||
<label>
|
||||
<input name="wpmf_color_singlefile[fontdownloadlink]" type="text"
|
||||
value="<?php echo esc_attr($media_download['fontdownloadlink']) ?>"
|
||||
class="inputbox input-block-level wp-color-field-font wp-color-picker">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf_width_20 wpmf-no-shadow">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text"
|
||||
for="singlebg"><?php esc_html_e('Hover font color', 'wpmf') ?></label>
|
||||
<label>
|
||||
<input name="wpmf_color_singlefile[hoverfontcolor]" type="text"
|
||||
value="<?php echo esc_attr($media_download['hoverfontcolor']) ?>"
|
||||
class="inputbox input-block-level wp-color-field-hvfont wp-color-picker">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="p-d-20 ju-settings-option wpmf_width_100">
|
||||
<h4 style="font-size: 20px"><?php esc_html_e('Icon', 'wpmf') ?></h4>
|
||||
<div class="wpmf_width_100 m-b-20">
|
||||
<?php
|
||||
$media_icons = array(
|
||||
'download_style_0' => array('label' => esc_html__('Default', 'wpmf'), 'url' => WPMF_PLUGIN_URL . 'assets/images/setting_download_style_0.svg'),
|
||||
'download_style_1' => array('label' => esc_html__('Style 1', 'wpmf'), 'url' => WPMF_PLUGIN_URL . 'assets/images/setting_download_style_1.svg'),
|
||||
'download_style_2' => array('label' => esc_html__('Style 2', 'wpmf'), 'url' => WPMF_PLUGIN_URL . 'assets/images/setting_download_style_2.svg'),
|
||||
'download_style_3' => array('label' => esc_html__('Style 3', 'wpmf'), 'url' => WPMF_PLUGIN_URL . 'assets/images/setting_download_style_3.svg'),
|
||||
'download_style_4' => array('label' => esc_html__('Style 4', 'wpmf'), 'url' => WPMF_PLUGIN_URL . 'assets/images/setting_download_style_4.svg')
|
||||
);
|
||||
foreach ($media_icons as $media_icon => $media_icon_url) :
|
||||
?>
|
||||
<div class="ju-settings-option wpmf-no-shadow wpmf_width_20 wpmf-media-icons">
|
||||
<div class="wpmf-media-icon">
|
||||
<img src="<?php echo esc_url($media_icon_url['url']) ?>">
|
||||
<div class="wpmf-media-icon-radio">
|
||||
<label class="radio">
|
||||
<input name="wpmf_color_singlefile[icon_image]" type="radio"
|
||||
value="<?php echo esc_attr($media_icon) ?>"
|
||||
class="inputbox input-block-level" <?php checked($media_download['icon_image'], $media_icon) ?>>
|
||||
<span class="outer"><span
|
||||
class="inner"></span></span><?php echo esc_html($media_icon_url['label']) ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<div class="wpmf_width_100">
|
||||
<div class="ju-settings-option wpmf-no-shadow wpmf_width_20">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text"
|
||||
for="singlebg"><?php esc_html_e('Icon color', 'wpmf') ?></label>
|
||||
<label>
|
||||
<input name="wpmf_color_singlefile[icon_color]" type="text"
|
||||
value="<?php echo esc_attr($media_download['icon_color']) ?>"
|
||||
class="inputbox input-block-level wp-color-field-icon-color wp-color-picker">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="p-d-20 ju-settings-option wpmf_width_100">
|
||||
<h4 style="font-size: 20px"><?php esc_html_e('Border', 'wpmf') ?></h4>
|
||||
<div class="wpmf_width_100">
|
||||
<div class="ju-settings-option wpmf-no-shadow wpmf_width_20">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text"
|
||||
for="singlebg"><?php esc_html_e('Border radius', 'wpmf') ?></label>
|
||||
<label>
|
||||
<input name="wpmf_color_singlefile[border_radius]" type="number"
|
||||
value="<?php echo esc_attr($media_download['border_radius']) ?>"
|
||||
class="inputbox input-block-level">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf-no-shadow wpmf_width_20">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text"
|
||||
for="singlebg"><?php esc_html_e('Border width', 'wpmf') ?></label>
|
||||
<label>
|
||||
<input name="wpmf_color_singlefile[border_width]" type="number"
|
||||
value="<?php echo esc_attr($media_download['border_width']) ?>"
|
||||
class="inputbox input-block-level">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf-no-shadow wpmf_width_20">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text"
|
||||
for="singlebg"><?php esc_html_e('Border type', 'wpmf') ?></label>
|
||||
<label>
|
||||
<select name="wpmf_color_singlefile[border_type]">
|
||||
<option value="solid" <?php selected($media_download['border_type'], 'solid') ?>><?php esc_html_e('Solid', 'wpmf') ?></option>
|
||||
<option value="double" <?php selected($media_download['border_type'], 'double') ?>><?php esc_html_e('Double', 'wpmf') ?></option>
|
||||
<option value="dotted" <?php selected($media_download['border_type'], 'dotted') ?>><?php esc_html_e('Dotted', 'wpmf') ?></option>
|
||||
<option value="dashed" <?php selected($media_download['border_type'], 'dashed') ?>><?php esc_html_e('Dashed', 'wpmf') ?></option>
|
||||
<option value="groove" <?php selected($media_download['border_type'], 'groove') ?>><?php esc_html_e('Groove', 'wpmf') ?></option>
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf-no-shadow wpmf_width_20">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text"
|
||||
for="singlebg"><?php esc_html_e('Border color', 'wpmf') ?></label>
|
||||
<label>
|
||||
<input name="wpmf_color_singlefile[border_color]" type="text"
|
||||
value="<?php echo esc_attr($media_download['border_color']) ?>"
|
||||
class="inputbox input-block-level wp-color-field-border-color wp-color-picker">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="p-d-20 ju-settings-option wpmf_width_100">
|
||||
<h4 style="font-size: 20px"><?php esc_html_e('Margin', 'wpmf') ?></h4>
|
||||
<div class="wpmf_width_100">
|
||||
<div class="ju-settings-option wpmf-no-shadow wpmf_width_20">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text"
|
||||
for="singlebg"><?php esc_html_e('Margin top', 'wpmf') ?></label>
|
||||
<label>
|
||||
<input name="wpmf_color_singlefile[margin_top]" type="number"
|
||||
value="<?php echo esc_attr($media_download['margin_top']) ?>"
|
||||
class="inputbox input-block-level">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf-no-shadow wpmf_width_20">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text"
|
||||
for="singlebg"><?php esc_html_e('Margin right', 'wpmf') ?></label>
|
||||
<label>
|
||||
<input name="wpmf_color_singlefile[margin_right]" type="number"
|
||||
value="<?php echo esc_attr($media_download['margin_right']) ?>"
|
||||
class="inputbox input-block-level">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf-no-shadow wpmf_width_20">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text"
|
||||
for="singlebg"><?php esc_html_e('Margin bottom', 'wpmf') ?></label>
|
||||
<label>
|
||||
<input name="wpmf_color_singlefile[margin_bottom]" type="number"
|
||||
value="<?php echo esc_attr($media_download['margin_bottom']) ?>"
|
||||
class="inputbox input-block-level">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf-no-shadow wpmf_width_20">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text"
|
||||
for="singlebg"><?php esc_html_e('Margin left', 'wpmf') ?></label>
|
||||
<label>
|
||||
<input name="wpmf_color_singlefile[margin_left]" type="number"
|
||||
value="<?php echo esc_attr($media_download['margin_left']) ?>"
|
||||
class="inputbox input-block-level">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="p-d-20 ju-settings-option wpmf_width_100">
|
||||
<h4 style="font-size: 20px"><?php esc_html_e('Padding', 'wpmf') ?></h4>
|
||||
<div class="wpmf_width_100">
|
||||
<div class="ju-settings-option wpmf-no-shadow wpmf_width_20">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text"
|
||||
for="singlebg"><?php esc_html_e('Padding top', 'wpmf') ?></label>
|
||||
<label>
|
||||
<input name="wpmf_color_singlefile[padding_top]" type="number"
|
||||
value="<?php echo esc_attr($media_download['padding_top']) ?>"
|
||||
class="inputbox input-block-level">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf-no-shadow wpmf_width_20">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text"
|
||||
for="singlebg"><?php esc_html_e('Padding right', 'wpmf') ?></label>
|
||||
<label>
|
||||
<input name="wpmf_color_singlefile[padding_right]" type="number"
|
||||
value="<?php echo esc_attr($media_download['padding_right']) ?>"
|
||||
class="inputbox input-block-level">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf-no-shadow wpmf_width_20">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text"
|
||||
for="singlebg"><?php esc_html_e('Padding bottom', 'wpmf') ?></label>
|
||||
<label>
|
||||
<input name="wpmf_color_singlefile[padding_bottom]" type="number"
|
||||
value="<?php echo esc_attr($media_download['padding_bottom']) ?>"
|
||||
class="inputbox input-block-level">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf-no-shadow wpmf_width_20">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text"
|
||||
for="singlebg"><?php esc_html_e('Padding left', 'wpmf') ?></label>
|
||||
<label>
|
||||
<input name="wpmf_color_singlefile[padding_left]" type="number"
|
||||
value="<?php echo esc_attr($media_download['padding_left']) ?>"
|
||||
class="inputbox input-block-level">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
wp_enqueue_style('wp-color-picker');
|
||||
wp_enqueue_script('wp-color-picker');
|
||||
?>
|
||||
@@ -0,0 +1,205 @@
|
||||
<?php
|
||||
/* Prohibit direct script loading */
|
||||
defined('ABSPATH') || die('No direct script access allowed!');
|
||||
include_once WP_MEDIA_FOLDER_PLUGIN_DIR . 'class/physical-folder' . DIRECTORY_SEPARATOR . 'helper.php';
|
||||
global $wpdb;
|
||||
// phpcs:ignore WordPress.WP.PreparedSQL.NotPrepared -- No variable needs to be prepared
|
||||
$folder_fields = JUQueueHelper::getDbColumns(true);
|
||||
$tables = wpmfGetOption('wp-media-folder-tables');
|
||||
$folder_options = get_option('wpmf_queue_options');
|
||||
if (empty($folder_options)) {
|
||||
$folder_options = array(
|
||||
'enable_physical_folders' => 0,
|
||||
'auto_detect_tables' => 1,
|
||||
'replace_relative_paths' => (get_option('uploads_use_yearmonth_folders')) ? 1 : 0,
|
||||
'search_full_database' => 0,
|
||||
'mode_debug' => 0
|
||||
);
|
||||
}
|
||||
?>
|
||||
<div id="physical_server_folders" class="tab-content">
|
||||
<div class="content-box">
|
||||
<div id="wpmf-disclaimer">
|
||||
<h2><?php esc_html_e('Please read this disclaimer first', 'wpmf') ?></h2>
|
||||
<p>
|
||||
<?php esc_html_e('This feature will move WordPress media inside real folders and edit filenames.
|
||||
In its default version it will allow you to edit the file path and name through the image edition in the
|
||||
WordPress default media manager.', 'wpmf') ?>
|
||||
</p>
|
||||
<h2><?php esc_html_e('Important restrictions', 'wpmf') ?></h2>
|
||||
<p>
|
||||
<?php esc_html_e('WordPress has not been designed to allow changing the path of files. You should use this feature only if
|
||||
you
|
||||
really need it but note that:', 'wpmf') ?>
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<strong><?php esc_html_e('Moving images won\'t help your SEO', 'wpmf') ?></strong> <?php esc_html_e('like other would expect you to believe, file name and Alt information are far more important.', 'wpmf') ?>
|
||||
</li>
|
||||
<li>
|
||||
<?php esc_html_e('Even if the plugin will try its best to find and replace URLs of files in your database, depending on how other plugins deals with URLs, it may fail', 'wpmf') ?>
|
||||
</li>
|
||||
<li><?php esc_html_e('The process of replacing requires strong server performances and the more content you have the more powerful your server has to be', 'wpmf') ?>
|
||||
</li>
|
||||
<li><strong><?php esc_html_e('Always make backups of your website before any modification', 'wpmf') ?></strong></li>
|
||||
</ul>
|
||||
<h2><?php esc_html_e('Important features restrictions', 'wpmf') ?></h2>
|
||||
<p><?php esc_html_e('Instead of using WordPress custom taxonomy, create physical folders for your media. This setting needs to activated only by experienced users as it breaks compatibility with other plugin features like', 'wpmf') ?></p>
|
||||
<ul>
|
||||
<li><?php esc_html_e('Keeping link to media when renaming folder and files', 'wpmf') ?></li>
|
||||
<li><?php esc_html_e('Large folder move', 'wpmf') ?></li>
|
||||
<li><?php esc_html_e('Media and folder import and synchronization', 'wpmf') ?></li>
|
||||
<li><?php esc_html_e('Media multiple folder', 'wpmf') ?></li>
|
||||
<li><?php esc_html_e('Undo modification...', 'wpmf') ?></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option">
|
||||
<div class="wpmf_row_full">
|
||||
<input type="hidden" name="wp-media-folder-options[enable_physical_folders]" value="0">
|
||||
<label data-wpmftippy="<?php esc_html_e('WARNING: Instead of using WordPress custom taxonomy, create physical folders for your media. Some features of the plugin will be disabled as they\'re not compatible with the setting! (Read more above)', 'wpmf'); ?>"
|
||||
class="ju-setting-label text"><?php esc_html_e('Enable physical folders', 'wpmf') ?></label>
|
||||
<div class="ju-switch-button">
|
||||
<label class="switch">
|
||||
<input type="checkbox" name="wp-media-folder-options[enable_physical_folders]"
|
||||
value="1"
|
||||
<?php
|
||||
echo (!empty($folder_options['enable_physical_folders'])) ? 'checked' : '';
|
||||
?>
|
||||
>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="ju-settings-option wpmf_right m-r-0">
|
||||
<div class="wpmf_row_full">
|
||||
<input type="hidden" name="wp-media-folder-options[auto_detect_tables]" value="0">
|
||||
<label data-wpmftippy="<?php esc_html_e('The plugin will auto select the tables and columns where the replacement of attachments (media) URLs should be proceeded. This is the better option if you want to make sure to not lose replacements. Disable this option if you know what you’re doing and want to select custom data set to optimize the process.', 'wpmf'); ?>"
|
||||
class="ju-setting-label text"><?php esc_html_e('Detect media tables to replace content', 'wpmf') ?></label>
|
||||
<div class="ju-switch-button">
|
||||
<label class="switch">
|
||||
<input type="checkbox" name="wp-media-folder-options[auto_detect_tables]"
|
||||
value="1"
|
||||
<?php
|
||||
if (!empty($folder_options['auto_detect_tables'])) {
|
||||
echo 'checked';
|
||||
}
|
||||
?>
|
||||
>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="table_replace"
|
||||
style="<?php echo !empty($folder_options['auto_detect_tables']) ? 'display:none' : ''; ?>">
|
||||
<p>
|
||||
<strong><?php esc_html_e('Tables to replace content into', 'wpmf'); ?></strong><br/>
|
||||
<?php esc_html_e('Select the tables which you want the images url to be replaced into', 'wpmf'); ?>
|
||||
</p>
|
||||
<div class="container">
|
||||
<?php
|
||||
$last_table = '';
|
||||
foreach ($folder_fields as $field) :
|
||||
if ($last_table !== $field->TABLE_NAME) :
|
||||
if ($last_table !== '') {
|
||||
echo '</div>';
|
||||
}
|
||||
$last_table = $field->TABLE_NAME; ?>
|
||||
<div class="database-table"><h2><?php echo esc_html($last_table); ?></h2>
|
||||
<?php endif; ?>
|
||||
<div class="database-field">
|
||||
<span><?php echo esc_html($field->COLUMN_NAME); ?></span>
|
||||
<span><input
|
||||
type="checkbox"
|
||||
name="wp-media-folder-tables[<?php echo esc_html($last_table); ?>][<?php echo esc_html($field->COLUMN_NAME); ?>]"
|
||||
<?php echo isset($tables[$last_table][$field->COLUMN_NAME]) ? 'checked' : ''; ?>
|
||||
/></span>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf_width_100">
|
||||
<div class="wpmf_row_full">
|
||||
<label data-wpmftippy="<?php esc_html_e('Additionally to the folder creation as physical folder, all the current folder structure and media will be transformed as WordPress physical folders', 'wpmf'); ?>"
|
||||
class="ju-setting-label text"><?php esc_html_e('Transform current media folders', 'wpmf'); ?></label>
|
||||
<button id="sync_wpmf"
|
||||
class="ju-button no-background orange-button waves-effect waves-light" <?php echo defined('WPMF_TAXO') ? '' : ('disabled="disabled" title="' . esc_html__('This functionnality requires WP Media Folder from Joomunited plugin', 'wpmf') . '"'); ?>>
|
||||
<?php esc_html_e('Move existing media', 'wpmf'); ?>
|
||||
</button>
|
||||
<p id="sync_wpmf_doing"
|
||||
style="display: none"><?php esc_html_e('Media will be moved asynchronously as a background task, please activate the top status bar to see the progression', 'wpmf'); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option full_search"
|
||||
style="<?php echo empty($folder_options['auto_detect_tables']) ? 'display:none' : ''; ?>">
|
||||
<div class="wpmf_row_full">
|
||||
<input type="hidden" name="wp-media-folder-options[search_full_database]" value="0">
|
||||
<label data-wpmftippy="<?php esc_html_e('If checked, the plugin will not only replace content in your wordpress tables but in all the tables it will find in the database. It could be useful if you use your attachments links in another cms or custom script. If you don\'t specifically need it, leave this option unchecked.', 'wpmf'); ?>"
|
||||
class="ju-setting-label text"><?php printf(esc_html__('Search into full database instead of only "%s" prefixed tables', 'wpmf'), esc_html($wpdb->prefix)) ?></label>
|
||||
<div class="ju-switch-button">
|
||||
<label class="switch">
|
||||
<input type="checkbox" name="wp-media-folder-options[search_full_database]"
|
||||
value="1"
|
||||
<?php
|
||||
if (!empty($folder_options['search_full_database'])) {
|
||||
echo 'checked';
|
||||
}
|
||||
?>
|
||||
>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option full_search wpmf_right m-r-0"
|
||||
style="<?php echo empty($folder_options['auto_detect_tables']) ? 'display:none' : ''; ?>">
|
||||
<div class="wpmf_row_full">
|
||||
<input type="hidden" name="wp-media-folder-options[replace_relative_paths]" value="0">
|
||||
<label data-wpmftippy="<?php esc_html_e('By default WordPress uses absolutes urls, but some plugins may use relative path. If checked, the plugin will try to replace also relative path in database, instead of only absolute urls. Replacements in database may fail in particular cases (files with the same name) if this option is used while you\'re not using the default year/month upload folders option in WordPress settings.', 'wpmf'); ?>"
|
||||
class="ju-setting-label text"><?php esc_html_e('Replace relative paths in database', 'wpmf') ?></label>
|
||||
<div class="ju-switch-button">
|
||||
<label class="switch">
|
||||
<input type="checkbox" name="wp-media-folder-options[replace_relative_paths]"
|
||||
value="1"
|
||||
<?php
|
||||
if (!empty($folder_options['replace_relative_paths'])) {
|
||||
echo 'checked';
|
||||
}
|
||||
?>
|
||||
>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ju-settings-option">
|
||||
<div class="wpmf_row_full">
|
||||
<input type="hidden" name="wp-media-folder-options[mode_debug]" value="0">
|
||||
<label data-wpmftippy="<?php esc_html_e('When enabled, all actions made by the plugin will be stored into a log file in the plugin folder', 'wpmf'); ?>"
|
||||
class="ju-setting-label text"><?php esc_html_e('Mode debug activated', 'wpmf') ?></label>
|
||||
<div class="ju-switch-button">
|
||||
<label class="switch">
|
||||
<input type="checkbox" name="wp-media-folder-options[mode_debug]"
|
||||
value="1"
|
||||
<?php
|
||||
if (!empty($folder_options['mode_debug'])) {
|
||||
echo 'checked';
|
||||
}
|
||||
?>
|
||||
>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/* Prohibit direct script loading */
|
||||
defined('ABSPATH') || die('No direct script access allowed!');
|
||||
?>
|
||||
<div class="content-box content-wpmf-regen-thumbnail">
|
||||
<div class="ju-settings-option wpmf_width_100 p-d-20">
|
||||
<div style="width: 30%;text-align: center;float:left; max-height:500px; overflow: hidden;">
|
||||
<img class="img_thumbnail" src="<?php echo esc_url(WPMF_PLUGIN_URL . '/assets/images/default.png') ?>">
|
||||
</div>
|
||||
|
||||
|
||||
<div class="right_wrap_render_thumbnail wpmf_width_100 wpmf-no-margin">
|
||||
<button type="button"
|
||||
class="ju-button orange-button waves-effect wpmf_width_100 waves-light btn_regenerate_thumbnails stop"><?php esc_html_e('Regenerate all image thumbnails', 'wpmf') ?></button>
|
||||
<button type="button"
|
||||
class="ju-button orange-button no-background waves-effect waves-light btn_stop_regenerate_thumbnails"
|
||||
><?php esc_html_e('Stop the process', 'wpmf') ?></button>
|
||||
|
||||
<div class="wpmf-process-bar-full process_gennerate_thumb_full" style="">
|
||||
<div class="wpmf-process-bar process_gennerate_thumb" data-w="0"></div>
|
||||
<span>0%</span>
|
||||
</div>
|
||||
|
||||
<div class="result_gennerate_thumb">
|
||||
<h3><?php esc_html_e('Information', 'wpmf') ?></h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
/* Prohibit direct script loading */
|
||||
defined('ABSPATH') || die('No direct script access allowed!');
|
||||
?>
|
||||
<div class="success updated wpmf-notice wpmf-is-dismissible">
|
||||
<p><strong><?php esc_html_e('Saved successfully', 'wpmf'); ?></strong></p>
|
||||
<button type="button" class="wpmf-notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button>
|
||||
</div>
|
||||
@@ -0,0 +1,212 @@
|
||||
<?php
|
||||
/* Prohibit direct script loading */
|
||||
defined('ABSPATH') || die('No direct script access allowed!');
|
||||
|
||||
$iptcHeaderArray = getIptcHeader();
|
||||
?>
|
||||
<div id="server_folder_sync" class="tab-content">
|
||||
<div class="wpmf_width_100 top_bar">
|
||||
<h1><?php echo esc_html__('Server Folder Sync', 'wpmf') ?></h1>
|
||||
<?php
|
||||
require WP_MEDIA_FOLDER_PLUGIN_DIR . '/class/pages/settings/submit_button.php';
|
||||
?>
|
||||
</div>
|
||||
<div class="content-box content-wpmf-media-sync">
|
||||
<div class="ju-settings-option btnoption">
|
||||
<div class="wpmf_row_full">
|
||||
<input type="hidden" name="wpmf_option_sync_media" value="0">
|
||||
<label data-wpmftippy="<?php esc_html_e('Activate the sync from External folder to WordPress media library', 'wpmf') ?>"
|
||||
class="ju-setting-label text"><?php esc_html_e('Activate the sync', 'wpmf') ?></label>
|
||||
<div class="ju-switch-button">
|
||||
<label class="switch">
|
||||
<input type="checkbox" id="cb_option_sync_media"
|
||||
name="wpmf_option_sync_media" value="1"
|
||||
<?php
|
||||
if (isset($option_sync_media) && (int) $option_sync_media === 1) {
|
||||
echo 'checked';
|
||||
}
|
||||
?>
|
||||
>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option btnoption wpmf_right m-r-0">
|
||||
<div class="wpmf_row_full">
|
||||
<input type="hidden" name="wpmf_option_sync_media_external" value="0">
|
||||
<label data-wpmftippy="<?php esc_html_e('Also activate the sync from
|
||||
WordPress media library to external folders', 'wpmf') ?>"
|
||||
class="ju-setting-label text"><?php esc_html_e('Activate 2 ways sync', 'wpmf') ?></label>
|
||||
<div class="ju-switch-button">
|
||||
<label class="switch">
|
||||
<input type="checkbox" id="cb_option_sync_media_external"
|
||||
name="wpmf_option_sync_media_external" value="1"
|
||||
<?php
|
||||
if (isset($option_sync_media_external) && (int) $option_sync_media_external === 1) {
|
||||
echo 'checked';
|
||||
}
|
||||
?>
|
||||
>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option btnoption">
|
||||
<div class="wpmf_row_full p-lr-20">
|
||||
<label data-wpmftippy="<?php esc_html_e('Launch an automatic synchronization between the media folders selected below, each X minutes', 'wpmf') ?>" class="setting-label-bold p-r-20"><?php esc_html_e('Sync delay', 'wpmf') ?></label>
|
||||
<label>
|
||||
<input type="text" name="input_time_sync" class="input_time_sync"
|
||||
value="<?php echo esc_attr($time_sync) ?>">
|
||||
</label>
|
||||
<label class="setting-label-bold"><?php esc_html_e('minutes', 'wpmf') ?></label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf_width_100 btnoption">
|
||||
<div class="wpmf_row_full">
|
||||
<div>
|
||||
<div class="wrap_dir_name_ftp wpmf_left">
|
||||
<div id="wpmf_foldertree_sync"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="wrap_dir_name_categories wpmf_left">
|
||||
<div id="wpmf_foldertree_categories"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="wpmf_width_100 p-lr-20">
|
||||
<div class="input_dir">
|
||||
<input type="text" name="dir_name_ftp" class="input_sync dir_name_ftp wpmf_left" readonly
|
||||
value="">
|
||||
<input type="text" name="dir_name_categories" class="input_sync dir_name_categories wpmf_left"
|
||||
readonly
|
||||
data-id_category="0" value="">
|
||||
</div>
|
||||
|
||||
<button type="button"
|
||||
class="m-t-10 ju-button no-background orange-button waves-effect waves-light btn_addsync_media"><?php esc_html_e('Add', 'wpmf') ?></button>
|
||||
<button type="button"
|
||||
class="m-t-10 ju-button no-background orange-button waves-effect waves-light btn_deletesync_media"><?php esc_html_e('Delete selected', 'wpmf') ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf_width_100 btnoption">
|
||||
<table class="wp-list-table widefat striped wp-list-table-sync">
|
||||
<thead>
|
||||
<tr>
|
||||
<td style="width: 1%"><label for="cb-select-all-sync-item"></label><input id="cb-select-all-sync-items" class="media_checkbox cb-select-all-sync-items" type="checkbox"></td>
|
||||
<td style="font-weight: bold; text-transform: uppercase"><?php esc_html_e('Server folder', 'wpmf') ?></td>
|
||||
<td style="font-weight: bold; text-transform: uppercase"><?php esc_html_e('Media Library', 'wpmf') ?></td>
|
||||
<td style="width: 300px"></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if (!empty($wpmf_list_sync_media)) : ?>
|
||||
<?php foreach ($wpmf_list_sync_media as $k => $v) : ?>
|
||||
<tr data-ftp="<?php echo esc_attr($v['folder_ftp']) ?>" data-id="<?php echo esc_html($k) ?>">
|
||||
<td>
|
||||
<label for="cb-select-<?php echo esc_html($k) ?>"></label>
|
||||
<input class="media_checkbox check-sync-item" id="cb-select-<?php echo esc_html($k) ?>"
|
||||
type="checkbox" name="post[]" value="<?php echo esc_html($k) ?>">
|
||||
</td>
|
||||
<td><?php echo esc_html($v['folder_ftp']) ?></td>
|
||||
<td><?php echo esc_html($this->breadcrumb_category[$k]) ?></td>
|
||||
<td>
|
||||
<button class="button ju-small-button add-syncftp-queue m-r-10" type="button"><?php esc_html_e('Add to queue', 'wpmf') ?><span class="wpmf_spinner"></span></button>
|
||||
<button class="button ju-small-button delete-syncftp-item" type="button"><?php esc_html_e('Delete', 'wpmf') ?></button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="server_sync_settings" class="tab-content">
|
||||
<div class="wpmf_width_100 top_bar">
|
||||
<h1><?php echo esc_html__('Settings', 'wpmf') ?></h1>
|
||||
<?php
|
||||
require WP_MEDIA_FOLDER_PLUGIN_DIR . '/class/pages/settings/submit_button.php';
|
||||
?>
|
||||
</div>
|
||||
<div class="content-box">
|
||||
<div class="ju-settings-option wpmf_width_100 p-lr-20">
|
||||
<div class="wpmf_row_full">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text">
|
||||
<?php esc_html_e('File type to include in import and synchronization', 'wpmf') ?></label>
|
||||
<label class="wpmf_width_100">
|
||||
<textarea name="allow_sync_extensions" class="wpmf_width_100 allow_sync_extensions"><?php echo esc_html($allow_sync_extensions) ?></textarea>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf_width_100">
|
||||
<div style="margin: 10px 0 0 0; width: 50%">
|
||||
<input type="hidden" name="import_iptc_meta" value="0">
|
||||
<label data-wpmftippy="<?php esc_html_e('When an image is imported, synchronized or uploaded to the WordPress media library, keep the IPTC metadata attached to the image file', 'wpmf'); ?>"
|
||||
class="wpmftippy ju-setting-label text"><?php esc_html_e('Enable import IPTC metadata', 'wpmf') ?></label>
|
||||
<div class="ju-switch-button">
|
||||
<label class="switch">
|
||||
<input type="checkbox" id="cb_option_import_iptc_meta" name="import_iptc_meta" class="import_iptc_meta"
|
||||
value="1"
|
||||
<?php
|
||||
if (isset($import_iptc_meta) && (int) $import_iptc_meta === 1) {
|
||||
echo 'checked';
|
||||
}
|
||||
?>
|
||||
>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="iptc_fields_wrap p-lr-20">
|
||||
<label class="ju-setting-label wpmf_width_100 wpmf-no-padding text" style="line-height: 40px"><?php esc_html_e('IPTC fields', 'wpmf') ?></label>
|
||||
<div class="iptc_field pure-checkbox m-b-20">
|
||||
<input type="hidden" name="iptc_fields[title]" value="0">
|
||||
<input type="checkbox" id="iptc_title" name="iptc_fields[title]"
|
||||
class="wpmf_checkbox_tree" value="1" <?php checked($iptc_fields['title'], 1) ?>>
|
||||
<label for="iptc_title"><?php esc_html_e('Title', 'wpmf') ?></label>
|
||||
</div>
|
||||
|
||||
<div class="iptc_field pure-checkbox">
|
||||
<input type="hidden" name="iptc_fields[alt]" value="0">
|
||||
<input type="checkbox" id="iptc_alt" name="iptc_fields[alt]"
|
||||
class="wpmf_checkbox_tree" value="1" <?php checked($iptc_fields['alt'], 1) ?>>
|
||||
<label for="iptc_alt"><?php esc_html_e('Alt', 'wpmf') ?></label>
|
||||
</div>
|
||||
|
||||
<div class="iptc_field pure-checkbox">
|
||||
<input type="hidden" name="iptc_fields[description]" value="0">
|
||||
<input type="checkbox" id="iptc_description" name="iptc_fields[description]"
|
||||
class="wpmf_checkbox_tree" value="1" <?php checked($iptc_fields['description'], 1) ?>>
|
||||
<label for="iptc_description"><?php esc_html_e('Description', 'wpmf') ?></label>
|
||||
</div>
|
||||
|
||||
<div class="iptc_field pure-checkbox">
|
||||
<input type="hidden" name="iptc_fields[caption]" value="0">
|
||||
<input type="checkbox" id="iptc_caption" name="iptc_fields[caption]"
|
||||
class="wpmf_checkbox_tree" value="1" <?php checked($iptc_fields['caption'], 1) ?>>
|
||||
<label for="iptc_caption"><?php esc_html_e('Caption', 'wpmf') ?></label>
|
||||
</div>
|
||||
|
||||
<?php foreach ($iptcHeaderArray as $code => $iptcHeader) : ?>
|
||||
<div class="iptc_field pure-checkbox">
|
||||
<input type="hidden" name="iptc_fields[<?php echo esc_attr($code) ?>]" value="0">
|
||||
<input type="checkbox" id="iptc_<?php echo esc_attr($code) ?>" name="iptc_fields[<?php echo esc_attr($code) ?>]"
|
||||
class="wpmf_checkbox_tree" value="1" <?php checked($iptc_fields[$code], 1) ?>>
|
||||
<label for="iptc_<?php echo esc_attr($code) ?>"><?php echo esc_html($iptcHeader) ?></label>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
/* Prohibit direct script loading */
|
||||
defined('ABSPATH') || die('No direct script access allowed!');
|
||||
$allow_tabs_submit = array(
|
||||
'general',
|
||||
'media_access',
|
||||
'wordpress_gallery',
|
||||
'sync_media',
|
||||
'gallery_addon',
|
||||
'files_folders',
|
||||
'server_sync',
|
||||
'physical_server_folders',
|
||||
'gallery_photographer_addon'
|
||||
);
|
||||
?>
|
||||
<?php if (in_array($ju_tab['id'], $allow_tabs_submit)) : ?>
|
||||
<div class="btn_wpmf_saves">
|
||||
<button type="submit" name="btn_wpmf_save"
|
||||
class="btn_wpmf_save ju-button orange-button waves-effect waves-light"><?php esc_html_e('Save Changes', 'wpmf'); ?></button>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,105 @@
|
||||
<?php
|
||||
/* Prohibit direct script loading */
|
||||
defined('ABSPATH') || die('No direct script access allowed!');
|
||||
?>
|
||||
<div class="content-box wpmf_width_80">
|
||||
<p class="description text_center" style="margin: 0">
|
||||
<?php esc_html_e('We have checked your server environment.
|
||||
If you see some warning below it means that some plugin features may not work properly.
|
||||
Reload the page to refresh the results', 'wpmf'); ?>
|
||||
</p>
|
||||
<div class="wpmf_width_100 p-tb-20 wpmf_left text label_text"><?php esc_html_e('PHP Version', 'wpmf'); ?></div>
|
||||
<div class="wpmf-field-setting">
|
||||
<label class="ju-setting-label php_version">
|
||||
<?php esc_html_e('PHP ', 'wpmf'); ?>
|
||||
<?php echo esc_html(PHP_VERSION) ?>
|
||||
<?php esc_html_e('version', 'wpmf'); ?>
|
||||
</label>
|
||||
|
||||
<div class="right-checkbox">
|
||||
<?php
|
||||
if (version_compare(PHP_VERSION, '7.2.0', '>=')) {
|
||||
echo '<i class="material-icons system-checkbox material-icons-success">check_circle</i>';
|
||||
} elseif (version_compare(PHP_VERSION, '7.2.0', '<') &&
|
||||
version_compare(PHP_VERSION, '7.0.0', '>=')) {
|
||||
echo '<img src="' . esc_url(WPMF_PLUGIN_URL . '/assets/images/icon-notification.png') . '" class="img_notification">';
|
||||
} else {
|
||||
echo '<i class="material-icons system-checkbox material-icons-info">info</i>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if (version_compare(PHP_VERSION, '7.2.0', '<')) : ?>
|
||||
<p class="description text_left p_warning">
|
||||
<?php esc_html_e('Your PHP version is ', 'wpmf'); ?>
|
||||
<?php echo esc_html(PHP_VERSION) ?>
|
||||
<?php esc_html_e('. For performance and security reasons it better to run PHP 7.2+. Comparing to previous versions the execution time of PHP 7.X is more than twice as fast and has 30 percent lower memory consumption', 'wpmf'); ?>
|
||||
</p>
|
||||
<?php else : ?>
|
||||
<p class="description text_center">
|
||||
<?php esc_html_e('Great ! Your PHP version is ', 'wpmf'); ?>
|
||||
<?php echo esc_html(PHP_VERSION) ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<div class="wpmf_width_100 p-tb-20 wpmf_left text label_text"><?php esc_html_e('PHP Extensions', 'wpmf'); ?></div>
|
||||
<div class="wpmf-field-setting">
|
||||
<label class="ju-setting-label"><?php esc_html_e('Curl', 'wpmf'); ?></label>
|
||||
<div class="right-checkbox">
|
||||
<?php if (!in_array('curl', get_loaded_extensions())) : ?>
|
||||
<img src="<?php echo esc_url(WPMF_PLUGIN_URL . '/assets/images/icon-information/icon-information.png') ?>"
|
||||
srcset="<?php echo esc_url(WPMF_PLUGIN_URL . '/assets/images/icon-information/icon-information@2x.png') ?> 2x, <?php echo esc_url(WPMF_PLUGIN_URL . '/assets/images/icon-information/icon-information@3x.png') ?> 3x"
|
||||
class="img_warning">
|
||||
<?php else : ?>
|
||||
<input type="checkbox" id="php_curl" name="php_curl" checked
|
||||
value="php_curl" disabled class="filled-in media_checkbox"/>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if (!in_array('curl', get_loaded_extensions())) : ?>
|
||||
<p class="description p_warning">
|
||||
<?php esc_html_e('PHP Curl extension has not been detected. You need to activate in order to load video in media library and for all the cloud connections (like Google Drive, Dropbox...)', 'wpmf'); ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
<div class="wpmf-field-setting">
|
||||
<label class="ju-setting-label"><?php esc_html_e('GD Library', 'wpmf'); ?></label>
|
||||
<div class="right-checkbox">
|
||||
<?php if (function_exists('gd_info')) : ?>
|
||||
<input type="checkbox" id="gd_info" name="gd_info" checked
|
||||
value="gd_info" disabled class="filled-in media_checkbox"/>
|
||||
<?php else : ?>
|
||||
<img src="<?php echo esc_url(WPMF_PLUGIN_URL . '/assets/images/icon-information/icon-information.png') ?>"
|
||||
srcset="<?php echo esc_url(WPMF_PLUGIN_URL . '/assets/images/icon-information/icon-information@2x.png') ?> 2x, <?php echo esc_url(WPMF_PLUGIN_URL . '/assets/images/icon-information/icon-information@3x.png') ?> 3x"
|
||||
class="img_warning">
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if (!function_exists('gd_info')) : ?>
|
||||
<p class="description p_warning">
|
||||
<?php esc_html_e('GD library is not detected. GD is an open source library related to image creation. The Watermark feature won’t work.', 'wpmf'); ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="wpmf_width_100 p-tb-20 wpmf_left text label_text"><?php esc_html_e('PHP Settings', 'wpmf'); ?></div>
|
||||
<div class="wpmf-field-setting">
|
||||
<label class="ju-setting-label"><?php esc_html_e('Allow URL open', 'wpmf'); ?></label>
|
||||
<div class="right-checkbox">
|
||||
<?php if (!ini_get('allow_url_fopen')) : ?>
|
||||
<img src="<?php echo esc_url(WPMF_PLUGIN_URL . '/assets/images/icon-information/icon-information.png') ?>"
|
||||
srcset="<?php echo esc_url(WPMF_PLUGIN_URL . '/assets/images/icon-information/icon-information@2x.png') ?> 2x, <?php echo esc_url(WPMF_PLUGIN_URL . '/assets/images/icon-information/icon-information@3x.png') ?> 3x"
|
||||
class="img_warning">
|
||||
<?php else : ?>
|
||||
<input type="checkbox" id="php_allow_url_fopen" name="php_allow_url_fopen" checked
|
||||
value="php_allow_url_fopen" disabled class="filled-in media_checkbox"/>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if (!ini_get('allow_url_fopen')) : ?>
|
||||
<p class="description p_warning">
|
||||
<?php esc_html_e('Allow URL fopen setting has not been detected. You need to activate in order to use remote video feature', 'wpmf'); ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
@@ -0,0 +1,645 @@
|
||||
<?php
|
||||
/* Prohibit direct script loading */
|
||||
defined('ABSPATH') || die('No direct script access allowed!');
|
||||
$wp_gallery_configs = wpmfGetOption('gallery_shortcode_cf');
|
||||
$wp_gallery_themes = array(
|
||||
'default' => esc_html__('Default', 'wpmf'),
|
||||
'masonry' => esc_html__('Masonry', 'wpmf'),
|
||||
'portfolio' => esc_html__('Portfolio', 'wpmf'),
|
||||
'slider' => esc_html__('Slider', 'wpmf')
|
||||
);
|
||||
?>
|
||||
<div id="gallery_features" class="tab-content">
|
||||
<div class="content-box">
|
||||
<div class="content-wpmf-gallery">
|
||||
<div class="ju-settings-option">
|
||||
<div class="wpmf_row_full">
|
||||
<input type="hidden" name="wpmf_usegellery" value="0">
|
||||
<label data-wpmftippy="<?php esc_html_e('Enhance the WordPress default gallery system
|
||||
by adding themes and additional parameters in the gallery manager', 'wpmf'); ?>"
|
||||
class="ju-setting-label text">
|
||||
<?php esc_html_e('Enable the gallery feature', 'wpmf') ?>
|
||||
</label>
|
||||
<div class="ju-switch-button">
|
||||
<label class="switch">
|
||||
<input type="checkbox" name="wpmf_usegellery" value="1"
|
||||
<?php
|
||||
if (isset($usegellery) && (int) $usegellery === 1) {
|
||||
echo 'checked';
|
||||
}
|
||||
?>
|
||||
>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf_right m-r-0">
|
||||
<div class="wpmf_row_full">
|
||||
<input type="hidden" name="wpmf_option_lightboximage" value="0">
|
||||
<label data-wpmftippy="<?php esc_html_e('Add a lightbox option on each image of your WordPress content', 'wpmf'); ?>"
|
||||
class="ju-setting-label text"><?php esc_html_e('Enable the single image lightbox feature', 'wpmf') ?></label>
|
||||
<div class="ju-switch-button">
|
||||
<label class="switch">
|
||||
<input type="checkbox" name="wpmf_option_lightboximage"
|
||||
id="cb_option_lightboximage" value="1"
|
||||
<?php
|
||||
if (isset($option_lightboximage) && (int) $option_lightboximage === 1) {
|
||||
echo 'checked';
|
||||
}
|
||||
?>
|
||||
>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option">
|
||||
<div class="wpmf_row_full">
|
||||
<input type="hidden" name="wpmf_usegellery_lightbox" value="0">
|
||||
<label data-wpmftippy="<?php esc_html_e('Add lightbox to images in WordPress default galleries', 'wpmf'); ?>"
|
||||
class="ju-setting-label text">
|
||||
<?php esc_html_e('Lightbox in galleries', 'wpmf') ?></label>
|
||||
<div class="ju-switch-button">
|
||||
<label class="switch">
|
||||
<input type="checkbox" name="wpmf_usegellery_lightbox" value="1"
|
||||
<?php
|
||||
if (isset($usegellery_lightbox) && (int) $usegellery_lightbox === 1) {
|
||||
echo 'checked';
|
||||
}
|
||||
?>
|
||||
>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf_right m-r-0">
|
||||
<div class="wpmf_row_full">
|
||||
<input type="hidden" name="caption_lightbox_gallery" value="0">
|
||||
<label data-wpmftippy="<?php esc_html_e('Use caption of images on lightbox instead title', 'wpmf'); ?>"
|
||||
class="ju-setting-label text">
|
||||
<?php esc_html_e('Caption on lightbox', 'wpmf') ?></label>
|
||||
<div class="ju-switch-button">
|
||||
<label class="switch">
|
||||
<input type="checkbox" name="caption_lightbox_gallery" value="1"
|
||||
<?php
|
||||
if (isset($caption_lightbox_gallery) && (int) $caption_lightbox_gallery === 1) {
|
||||
echo 'checked';
|
||||
}
|
||||
?>
|
||||
>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wpmf_row_full">
|
||||
<div class="wrap_left">
|
||||
<div id="gallery_image_size" class="div_list media_filter_block wpmf_width_100">
|
||||
<ul class="image_size">
|
||||
<li class="div_list_child accordion-section control-section control-section-default open">
|
||||
<h3 class="accordion-section-title wpmf-section-title"
|
||||
data-title="sizes"
|
||||
tabindex="0"><?php esc_html_e('List default filter size', 'wpmf') ?>
|
||||
<i class="zmdi zmdi-chevron-up"></i>
|
||||
<i class="zmdi zmdi-chevron-down"></i>
|
||||
</h3>
|
||||
<ul class="content_list_sizes">
|
||||
<?php
|
||||
$sizes = apply_filters('image_size_names_choose', array(
|
||||
'thumbnail' => __('Thumbnail', 'wpmf'),
|
||||
'medium' => __('Medium', 'wpmf'),
|
||||
'large' => __('Large', 'wpmf'),
|
||||
'full' => __('Full Size', 'wpmf'),
|
||||
));
|
||||
foreach ($sizes as $key => $size) :
|
||||
?>
|
||||
|
||||
<li class="wpmf-field-setting customize-control customize-control-select item_dimension" data-value="<?php echo esc_html($a_dimension); ?>">
|
||||
<div class="pure-checkbox ju-setting-label">
|
||||
<input title="" id="<?php echo esc_attr($key) ?>" type="checkbox"
|
||||
name="size_value[]"
|
||||
value="<?php echo esc_attr($key) ?>"
|
||||
<?php
|
||||
if (in_array($key, $size_selected)) {
|
||||
echo 'checked';
|
||||
}
|
||||
?>
|
||||
>
|
||||
<label for="<?php echo esc_html($key) ?>"><?php echo esc_html($size) ?></label>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<p class="description">
|
||||
<?php esc_html_e('Select the image size you can load in galleries.
|
||||
Custom image size available here can be generated by 3rd party plugins', 'wpmf'); ?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="wrap_right">
|
||||
<!-- setting padding -->
|
||||
<div id="gallery_image_padding" class="div_list media_filter_block wpmf_width_100">
|
||||
<ul class="image_size">
|
||||
<li class="div_list_child accordion-section control-section control-section-default open">
|
||||
<h3 class="accordion-section-title wpmf-section-title padding_title"
|
||||
data-title="padding" tabindex="0">
|
||||
<?php esc_html_e('Gallery themes settings', 'wpmf') ?>
|
||||
<i class="zmdi zmdi-chevron-up"></i>
|
||||
<i class="zmdi zmdi-chevron-down"></i>
|
||||
</h3>
|
||||
<div class="content_list_padding">
|
||||
<div class="wpmf-field-setting ju-settings-option customize-control customize-control-select">
|
||||
<div class="wpmf_row_full">
|
||||
<span><?php esc_html_e('Masonry Theme', 'wpmf'); ?></span>
|
||||
<label><?php esc_html_e('Space between images (padding)', 'wpmf') ?></label>
|
||||
<label>
|
||||
<input name="padding_gallery[wpmf_padding_masonry]"
|
||||
class="padding_gallery small-text"
|
||||
type="number" min="0" max="30"
|
||||
value="<?php echo esc_attr($padding_masonry) ?>">
|
||||
</label>
|
||||
<label><?php esc_html_e('px', 'wpmf') ?></label>
|
||||
</div>
|
||||
|
||||
<div class="wpmf_row_full">
|
||||
<span><?php esc_html_e('Portfolio Theme', 'wpmf'); ?></span>
|
||||
<label><?php esc_html_e('Space between images (padding)', 'wpmf') ?></label>
|
||||
<label>
|
||||
<input name="padding_gallery[wpmf_padding_portfolio]"
|
||||
class="padding_gallery small-text"
|
||||
type="number" min="0" max="30"
|
||||
value="<?php echo esc_attr($padding_portfolio) ?>">
|
||||
</label>
|
||||
<label><?php esc_html_e('px', 'wpmf') ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<p class="description"><?php esc_html_e('Determine the space between images', 'wpmf'); ?></p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="default_settings" class="tab-content">
|
||||
<div class="content-box usegellery content-wpmf-gallery">
|
||||
<?php
|
||||
// phpcs:ignore WordPress.Security.EscapeOutput -- Content already escaped in the method
|
||||
echo $glrdefault_settings_html;
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="wp_gallery_shortcode" class="tab-content">
|
||||
<div class="content-box">
|
||||
<div class="wp_gallery_shortcode_settings_wrap">
|
||||
<h2><?php esc_html_e('GALLERIES FROM FOLDER SHORTCODE GENERATOR', 'wpmf') ?></h2>
|
||||
<div class="wpmf_width_100">
|
||||
<div class="ju-settings-option wpmf-no-shadow">
|
||||
<div class="wpmf_row_full">
|
||||
<div class="wpmf_gallery_shortcode_cf_settings">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text">
|
||||
<?php esc_html_e('Gallery from folder', 'wpmf'); ?>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<?php
|
||||
$folder_args = array(
|
||||
'show_option_none' => __('Select a folder', 'wpmf'),
|
||||
'option_none_value' => 0,
|
||||
'hide_empty' => false,
|
||||
'hierarchical' => true,
|
||||
'orderby' => 'name',
|
||||
'taxonomy' => WPMF_TAXO,
|
||||
'class' => 'wp_gallery_shortcode_field wp_shortcode_gallery_folder_id',
|
||||
'name' => 'wpmf_gallery_shortcode_cf[wpmf_folder_id]',
|
||||
'selected' => (int) $wp_gallery_configs['wpmf_folder_id']
|
||||
);
|
||||
|
||||
$root_id = get_option('wpmf_folder_root_id');
|
||||
if (isset($root_id)) {
|
||||
$folder_args['exclude'] = array((int) $root_id);
|
||||
}
|
||||
|
||||
wp_dropdown_categories($folder_args);
|
||||
?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf-no-shadow">
|
||||
<div class="wpmf_row_full">
|
||||
<div class="wpmf_gallery_shortcode_cf_settings">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text">
|
||||
<?php esc_html_e('Choose a theme', 'wpmf'); ?>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<select class="wp_gallery_shortcode_field" name="wpmf_gallery_shortcode_cf[display]" data-param="display">
|
||||
<option value="default"><?php esc_html_e('Choose a theme', 'wpmf') ?></option>
|
||||
<?php foreach ($wp_gallery_themes as $theme_key => $theme_label) { ?>
|
||||
<?php if (isset($wp_gallery_configs['display'])
|
||||
&& $wp_gallery_configs['display'] === $theme_key) : ?>
|
||||
<option value="<?php echo esc_html($theme_key) ?>" selected>
|
||||
<?php echo esc_html($theme_label) ?>
|
||||
</option>
|
||||
<?php else : ?>
|
||||
<option value="<?php echo esc_html($theme_key) ?>">
|
||||
<?php echo esc_html($theme_label) ?>
|
||||
</option>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php } ?>
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf-no-shadow">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text wpmf_width_auto" data-wpmftippy="<?php esc_html_e('Number of columns
|
||||
by default in the gallery theme', 'wpmf'); ?>">
|
||||
<?php esc_html_e('Columns', 'wpmf'); ?>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<select class="columns wp_gallery_shortcode_field" data-param="columns"
|
||||
name="wpmf_gallery_shortcode_cf[columns]">
|
||||
<?php for ($i = 1; $i <= 9; $i ++) { ?>
|
||||
<option value="<?php echo esc_html($i) ?>" <?php selected((int) $wp_gallery_configs['columns'], (int) $i) ?> >
|
||||
<?php echo esc_html($i) ?>
|
||||
</option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf-no-shadow">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text wpmf_width_auto" data-wpmftippy="<?php esc_html_e('Image size to load
|
||||
by default as thumbnail', 'wpmf'); ?>">
|
||||
<?php esc_html_e('Gallery image size', 'wpmf'); ?>
|
||||
</label>
|
||||
<label class="size">
|
||||
<select class="wp_gallery_shortcode_field" data-param="size"
|
||||
name="wpmf_gallery_shortcode_cf[size]">
|
||||
<?php
|
||||
$sizes_value = json_decode(get_option('wpmf_gallery_image_size_value'));
|
||||
$sizes = apply_filters('image_size_names_choose', array(
|
||||
'thumbnail' => __('Thumbnail', 'wpmf'),
|
||||
'medium' => __('Medium', 'wpmf'),
|
||||
'large' => __('Large', 'wpmf'),
|
||||
'full' => __('Full Size', 'wpmf'),
|
||||
));
|
||||
?>
|
||||
|
||||
<?php foreach ($sizes_value as $key) : ?>
|
||||
<?php if (!empty($sizes[$key])) : ?>
|
||||
<option value="<?php echo esc_attr($key); ?>" <?php selected($wp_gallery_configs['size'], $key); ?>>
|
||||
<?php echo esc_html($sizes[$key]); ?>
|
||||
</option>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php endforeach; ?>
|
||||
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf-no-shadow">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text wpmf_width_auto" data-wpmftippy="<?php esc_html_e('Image size to load by default as full
|
||||
size (opened in the lightbox)', 'wpmf'); ?>">
|
||||
<?php esc_html_e('Lightbox size', 'wpmf'); ?>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<select class="wp_gallery_shortcode_field" data-param="targetsize"
|
||||
name="wpmf_gallery_shortcode_cf[targetsize]">
|
||||
<?php
|
||||
$sizes = array(
|
||||
'thumbnail' => __('Thumbnail', 'wpmf'),
|
||||
'medium' => __('Medium', 'wpmf'),
|
||||
'large' => __('Large', 'wpmf'),
|
||||
'full' => __('Full Size', 'wpmf'),
|
||||
);
|
||||
?>
|
||||
|
||||
<?php foreach ($sizes as $key => $name) : ?>
|
||||
<option value="<?php echo esc_attr($key); ?>"
|
||||
<?php selected($wp_gallery_configs['targetsize'], $key); ?>>
|
||||
<?php echo esc_html($name); ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf-no-shadow">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text wpmf_width_auto" data-wpmftippy="<?php esc_html_e('Action when the user
|
||||
click on the image thumbnail', 'wpmf'); ?>">
|
||||
<?php esc_html_e('Action on click', 'wpmf'); ?>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<select class="wp_gallery_shortcode_field" data-param="link"
|
||||
name="wpmf_gallery_shortcode_cf[link]">
|
||||
<option value="file" <?php selected($wp_gallery_configs['link'], 'file'); ?>>
|
||||
<?php esc_html_e('Lightbox', 'wpmf'); ?>
|
||||
</option>
|
||||
<option value="post" <?php selected($wp_gallery_configs['link'], 'post'); ?>>
|
||||
<?php esc_html_e('Attachment Page', 'wpmf'); ?>
|
||||
</option>
|
||||
<option value="none" <?php selected($wp_gallery_configs['link'], 'none'); ?>>
|
||||
<?php esc_html_e('None', 'wpmf'); ?>
|
||||
</option>
|
||||
<option value="custom" <?php selected($wp_gallery_configs['link'], 'custom'); ?>>
|
||||
<?php esc_html_e('Custom link', 'wpmf'); ?>
|
||||
</option>
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf-no-shadow">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text wpmf_width_auto" data-wpmftippy="<?php esc_html_e('Image gallery
|
||||
default ordering', 'wpmf'); ?>">
|
||||
<?php esc_html_e('Order by', 'wpmf'); ?>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<select class="wp_gallery_shortcode_field" data-param="wpmf_orderby"
|
||||
name="wpmf_gallery_shortcode_cf[wpmf_orderby]">
|
||||
<option value="post__in" <?php selected($wp_gallery_configs['wpmf_orderby'], 'post__in'); ?>>
|
||||
<?php esc_html_e('Custom', 'wpmf'); ?>
|
||||
</option>
|
||||
<option value="rand" <?php selected($wp_gallery_configs['wpmf_orderby'], 'rand'); ?>>
|
||||
<?php esc_html_e('Random', 'wpmf'); ?>
|
||||
</option>
|
||||
<option value="title" <?php selected($wp_gallery_configs['wpmf_orderby'], 'title'); ?>>
|
||||
<?php esc_html_e('Title', 'wpmf'); ?>
|
||||
</option>
|
||||
<option value="date" <?php selected($wp_gallery_configs['wpmf_orderby'], 'date'); ?>>
|
||||
<?php esc_html_e('Date', 'wpmf'); ?>
|
||||
</option>
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf-no-shadow">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text wpmf_width_auto" data-wpmftippy="<?php esc_html_e('By default, use ascending
|
||||
or descending order', 'wpmf'); ?>">
|
||||
<?php esc_html_e('Order', 'wpmf'); ?>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<select class="wp_gallery_shortcode_field" data-param="wpmf_order"
|
||||
name="wpmf_gallery_shortcode_cf[wpmf_order]">
|
||||
<option value="ASC" <?php selected($wp_gallery_configs['wpmf_order'], 'ASC'); ?>>
|
||||
<?php esc_html_e('Ascending', 'wpmf'); ?>
|
||||
</option>
|
||||
<option value="DESC" <?php selected($wp_gallery_configs['wpmf_order'], 'DESC'); ?>>
|
||||
<?php esc_html_e('Descending', 'wpmf'); ?>
|
||||
</option>
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf-no-shadow">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text">
|
||||
<?php esc_html_e('Margin', 'wpmf'); ?>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<input type="number" min="0" max="50" step="5" name="wpmf_gallery_shortcode_cf[gutterwidth]" class="wp_gallery_shortcode_field" data-param="gutterwidth" value="<?php echo esc_attr($wp_gallery_configs['gutterwidth']) ?>">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Border settings -->
|
||||
<div class="wpmf_width_100">
|
||||
<div class="ju-settings-option wpmf-no-shadow">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text">
|
||||
<?php esc_html_e('Border style', 'wpmf'); ?>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<select class="wp_gallery_shortcode_field" name="wpmf_gallery_shortcode_cf[border_style]" data-param="border_style">
|
||||
<option value="none" <?php selected($wp_gallery_configs['border_style'], 'none'); ?>><?php esc_html_e('None', 'wpmf'); ?></option>
|
||||
<option value="solid" <?php selected($wp_gallery_configs['border_style'], 'solid'); ?>><?php esc_html_e('Solid', 'wpmf'); ?></option>
|
||||
<option value="dotted" <?php selected($wp_gallery_configs['border_style'], 'dotted'); ?>><?php esc_html_e('Dotted', 'wpmf'); ?></option>
|
||||
<option value="dashed" <?php selected($wp_gallery_configs['border_style'], 'dashed'); ?>><?php esc_html_e('Dashed', 'wpmf'); ?></option>
|
||||
<option value="double" <?php selected($wp_gallery_configs['border_style'], 'double'); ?>><?php esc_html_e('Double', 'wpmf'); ?></option>
|
||||
<option value="groove" <?php selected($wp_gallery_configs['border_style'], 'groove'); ?>><?php esc_html_e('Groove', 'wpmf'); ?></option>
|
||||
<option value="ridge" <?php selected($wp_gallery_configs['border_style'], 'ridge'); ?>><?php esc_html_e('Ridge', 'wpmf'); ?></option>
|
||||
<option value="inset" <?php selected($wp_gallery_configs['border_style'], 'inset'); ?>><?php esc_html_e('Inset', 'wpmf'); ?></option>
|
||||
<option value="outset" <?php selected($wp_gallery_configs['border_style'], 'outset'); ?>><?php esc_html_e('Outset', 'wpmf'); ?></option>
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf-no-shadow">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text">
|
||||
<?php esc_html_e('Border radius', 'wpmf'); ?>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<input type="number" min="0" max="20" step="1" name="wpmf_gallery_shortcode_cf[img_border_radius]" class="wp_gallery_shortcode_field" data-param="img_border_radius" value="<?php echo esc_attr($wp_gallery_configs['img_border_radius']) ?>">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf-no-shadow">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text">
|
||||
<?php esc_html_e('Border width', 'wpmf'); ?>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<input type="number" min="0" max="10" step="1" name="wpmf_gallery_shortcode_cf[border_width]" class="wp_gallery_shortcode_field" data-param="border_width" value="<?php echo esc_attr($wp_gallery_configs['border_width']) ?>">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf-no-shadow">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text">
|
||||
<?php esc_html_e('Border color', 'wpmf'); ?>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<input name="wpmf_gallery_shortcode_cf[border_color]" type="text"
|
||||
value="<?php echo esc_attr($wp_gallery_configs['border_color']) ?>"
|
||||
class="inputbox input-block-level wp-color-field-hv wp-color-picker wp_gallery_shortcode_field" data-param="border_color">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Shadow settings -->
|
||||
<div class="wpmf_width_100">
|
||||
<?php
|
||||
$img_shadow = $wp_gallery_configs['img_shadow'];
|
||||
$shadows = explode(' ', $img_shadow);
|
||||
?>
|
||||
<div class="ju-settings-option wpmf-no-shadow">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text">
|
||||
<?php esc_html_e('Shadow H offset', 'wpmf'); ?>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<input type="number" min="-50" max="50" class="wp_gallery_shadow_field wp_gallery_shadow_h_field" value="<?php echo esc_attr(str_replace('px', '', $shadows[0])) ?>">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf-no-shadow">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text">
|
||||
<?php esc_html_e('Shadow V offset', 'wpmf'); ?>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<input type="number" min="-50" max="50" class="wp_gallery_shadow_field wp_gallery_shadow_v_field" value="<?php echo esc_attr(str_replace('px', '', $shadows[1])) ?>">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf-no-shadow">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text">
|
||||
<?php esc_html_e('Shadow blur', 'wpmf'); ?>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<input type="number" min="0" max="50" class="wp_gallery_shadow_field wp_gallery_shadow_blur_field" value="<?php echo esc_attr(str_replace('px', '', $shadows[2])) ?>">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf-no-shadow">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text">
|
||||
<?php esc_html_e('Shadow spread', 'wpmf'); ?>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<input type="number" min="0" max="50" class="wp_gallery_shadow_field wp_gallery_shadow_spread_field" value="<?php echo esc_attr(str_replace('px', '', $shadows[3])) ?>">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="ju-settings-option wpmf-no-shadow">
|
||||
<label class="wpmf_width_100 p-b-20 wpmf_left text label_text">
|
||||
<?php esc_html_e('Shadow Color', 'wpmf'); ?>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<input type="text"
|
||||
value="<?php echo esc_attr($shadows[4]) ?>"
|
||||
class="inputbox input-block-level wp-color-field-hv wp-color-picker wp_gallery_shadow_field wp_gallery_shadow_color_field">
|
||||
</label>
|
||||
</div>
|
||||
<input type="hidden" class="wp_gallery_shortcode_field" name="wpmf_gallery_shortcode_cf[img_shadow]" data-param="img_shadow" value="<?php echo esc_attr($img_shadow) ?>">
|
||||
</div>
|
||||
|
||||
<!-- Automatic animation -->
|
||||
<div class="wpmf_width_100">
|
||||
<label class="ju-setting-label setting wpmf-no-padding text wpmf-bold wpmf_left">
|
||||
<?php esc_html_e('Autoplay', 'wpmf'); ?>
|
||||
</label>
|
||||
|
||||
<label class="wpmf_left">
|
||||
<input type="hidden" data-param="autoplay"
|
||||
name="wpmf_gallery_shortcode_cf[autoplay]"
|
||||
value="0">
|
||||
<span class="ju-switch-button">
|
||||
<label class="switch">
|
||||
<?php if (isset($wp_gallery_configs['autoplay']) && (int) $wp_gallery_configs['autoplay'] === 1) : ?>
|
||||
<input type="checkbox" class="wp_gallery_shortcode_field" data-param="autoplay"
|
||||
name="wpmf_gallery_shortcode_cf[autoplay]"
|
||||
value="1" checked>
|
||||
<?php else : ?>
|
||||
<input type="checkbox" class="wp_gallery_shortcode_field" data-param="autoplay"
|
||||
name="wpmf_gallery_shortcode_cf[autoplay]"
|
||||
value="1">
|
||||
<?php endif; ?>
|
||||
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="wpmf_width_100">
|
||||
<label class="ju-setting-label setting wpmf-no-padding text wpmf-bold wpmf_left">
|
||||
<?php esc_html_e('Crop image', 'wpmf'); ?>
|
||||
</label>
|
||||
|
||||
<label class="wpmf_left">
|
||||
<input type="hidden" data-param="crop_image"
|
||||
name="wpmf_gallery_shortcode_cf[crop_image]"
|
||||
value="0">
|
||||
<span class="ju-switch-button">
|
||||
<label class="switch">
|
||||
<?php if (!isset($wp_gallery_configs['crop_image']) || (int)$wp_gallery_configs['crop_image'] === 1) : ?>
|
||||
<input type="checkbox" class="wp_gallery_shortcode_field" data-param="crop_image"
|
||||
name="wpmf_gallery_shortcode_cf[crop_image]"
|
||||
value="1" checked>
|
||||
<?php else : ?>
|
||||
<input type="checkbox" class="wp_gallery_shortcode_field" data-param="crop_image"
|
||||
name="wpmf_gallery_shortcode_cf[crop_image]"
|
||||
value="1">
|
||||
<?php endif; ?>
|
||||
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="wpmf_width_100">
|
||||
<label class="ju-setting-label setting wpmf-no-padding text wpmf-bold wpmf_left">
|
||||
<?php esc_html_e('Include images in subfolder', 'wpmf'); ?>
|
||||
</label>
|
||||
|
||||
<label class="wpmf_left">
|
||||
<input type="hidden" data-param="include_children"
|
||||
name="wpmf_gallery_shortcode_cf[include_children]"
|
||||
value="0">
|
||||
<span class="ju-switch-button">
|
||||
<label class="switch">
|
||||
<?php if (isset($wp_gallery_configs['include_children']) && (int) $wp_gallery_configs['include_children'] === 1) : ?>
|
||||
<input type="checkbox" class="wp_gallery_shortcode_field" data-param="include_children"
|
||||
name="wpmf_gallery_shortcode_cf[include_children]"
|
||||
value="1" checked>
|
||||
<?php else : ?>
|
||||
<input type="checkbox" class="wp_gallery_shortcode_field" data-param="include_children"
|
||||
name="wpmf_gallery_shortcode_cf[include_children]"
|
||||
value="1">
|
||||
<?php endif; ?>
|
||||
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="wpmf_width_100 m-t-30">
|
||||
<div class="wpmf_row_full" style="margin: 0 0 10px 0; position: relative;">
|
||||
<label class="wpmf_left text label_text" style="position: absolute; left: 0; bottom: 0;">
|
||||
<?php esc_html_e('Shortcode', 'wpmf') ?>
|
||||
</label>
|
||||
<div class="wpmf_copy_shortcode" data-input="wp_gallery_shortcode_input" style="margin: 0">
|
||||
<i data-wpmftippy="<?php esc_html_e('Copy shortcode', 'wpmf'); ?>"
|
||||
class="material-icons copy_wp_gallery_icon wpmftippy">content_copy</i>
|
||||
<label><?php esc_html_e('COPY', 'wpmf'); ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<input title type="text" name="wpmf_gallery_shortcode_cf[value]"
|
||||
class="wp_gallery_shortcode_input regular-text"
|
||||
value="<?php echo esc_attr(stripslashes($wp_gallery_configs['value'])) ?>">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,272 @@
|
||||
<?php
|
||||
/* Prohibit direct script loading */
|
||||
defined('ABSPATH') || die('No direct script access allowed!');
|
||||
$tabs_data = array(
|
||||
array(
|
||||
'id' => 'general',
|
||||
'title' => __('General', 'wpmf'),
|
||||
'icon' => 'home',
|
||||
'sub_tabs' => array(
|
||||
'additional_features' => __('Main settings', 'wpmf'),
|
||||
'media_filtering' => __('Media filtering', 'wpmf'),
|
||||
// 'advanced' => __('Advanced', 'wpmf')
|
||||
)
|
||||
),
|
||||
array(
|
||||
'id' => 'wordpress_gallery',
|
||||
'title' => __('Wordpress Gallery', 'wpmf'),
|
||||
'icon' => 'image',
|
||||
'sub_tabs' => array(
|
||||
'gallery_features' => __('Gallery features', 'wpmf'),
|
||||
'default_settings' => __('Default settings', 'wpmf'),
|
||||
'wp_gallery_shortcode' => __('Shortcode', 'wpmf')
|
||||
)
|
||||
),
|
||||
array(
|
||||
'id' => 'gallery_addon',
|
||||
'title' => __('Galleries Addon', 'wpmf'),
|
||||
'icon' => 'add_photo_alternate',
|
||||
'sub_tabs' => array(
|
||||
'galleryadd_default_settings' => __('Default settings', 'wpmf'),
|
||||
'gallery_shortcode_generator' => __('Shortcode generator', 'wpmf'),
|
||||
'gallery_social_sharing' => __('Social sharing', 'wpmf')
|
||||
)
|
||||
),
|
||||
array(
|
||||
'id' => 'gallery_photographer_addon',
|
||||
'title' => __('Photographer', 'wpmf'),
|
||||
'icon' => 'camera_alt'
|
||||
),
|
||||
array(
|
||||
'id' => 'media_access',
|
||||
'title' => __('Access & design', 'wpmf'),
|
||||
'icon' => 'format_color_fill',
|
||||
'sub_tabs' => array(
|
||||
'user_media_access' => __('Media access', 'wpmf'),
|
||||
'file_design' => __('File Design', 'wpmf')
|
||||
)
|
||||
),
|
||||
array(
|
||||
'id' => 'files_folders',
|
||||
'title' => __('Rename & Watermark', 'wpmf'),
|
||||
'icon' => 'picture_in_picture_alt',
|
||||
'sub_tabs' => array(
|
||||
'rename_on_upload' => __('Rename on upload', 'wpmf'),
|
||||
'watermark' => __('Watermark', 'wpmf'),
|
||||
)
|
||||
),
|
||||
array(
|
||||
'id' => 'import_export',
|
||||
'title' => __('Import/Export', 'wpmf'),
|
||||
'icon' => 'import_export',
|
||||
'sub_tabs' => array(
|
||||
'wordpress_import' => __('Wordpress', 'wpmf'),
|
||||
'other_plugin_import' => __('Other plugins', 'wpmf')
|
||||
)
|
||||
),
|
||||
array(
|
||||
'id' => 'server_sync',
|
||||
'title' => __('Server Folder Sync', 'wpmf'),
|
||||
'icon' => 'import_export',
|
||||
'sub_tabs' => array(
|
||||
'server_folder_sync' => __('Folder Sync', 'wpmf'),
|
||||
'server_sync_settings' => __('Filters', 'wpmf')
|
||||
)
|
||||
),
|
||||
array(
|
||||
'id' => 'regenerate_thumbnails',
|
||||
'title' => __('Regenerate Thumb', 'wpmf'),
|
||||
'icon' => 'update',
|
||||
'sub_tabs' => array()
|
||||
),
|
||||
array(
|
||||
'id' => 'physical_server_folders',
|
||||
'title' => __('Physical folders', 'wpmf'),
|
||||
'icon' => 'folder',
|
||||
'sub_tabs' => array()
|
||||
),
|
||||
array(
|
||||
'id' => 'image_compression',
|
||||
'title' => __('Image compression', 'wpmf'),
|
||||
'icon' => 'compare',
|
||||
'sub_tabs' => array()
|
||||
)
|
||||
);
|
||||
|
||||
if (!is_plugin_active('wp-media-folder-gallery-addon/wp-media-folder-gallery-addon.php')) {
|
||||
unset($tabs_data[2]);
|
||||
unset($tabs_data[3]);
|
||||
}
|
||||
|
||||
if (is_plugin_active('wp-media-folder-addon/wp-media-folder-addon.php')) {
|
||||
$tabs_data[] = array(
|
||||
'id' => 'cloud',
|
||||
'title' => __('Cloud', 'wpmf'),
|
||||
'icon' => 'cloud_queue',
|
||||
'sub_tabs' => array(
|
||||
'google_drive_box' => __('Google Drive', 'wpmf'),
|
||||
'google_photo' => __('Google Photo', 'wpmf'),
|
||||
'dropbox_box' => __('Dropbox', 'wpmf'),
|
||||
'one_drive_box' => __('OneDrive', 'wpmf'),
|
||||
'nextcloud' => __('Nextcloud', 'wpmf'),
|
||||
'storage_provider' => __('Offload Media', 'wpmf'),
|
||||
'synchronization' => __('Synchronization', 'wpmf')
|
||||
)
|
||||
);
|
||||
}
|
||||
$tabs_data[] = array(
|
||||
'id' => 'jutranslation',
|
||||
'title' => __('Translation', 'wpmf'),
|
||||
'icon' => 'format_color_text',
|
||||
'sub_tabs' => array()
|
||||
);
|
||||
|
||||
$tabs_data[] = array(
|
||||
'id' => 'system_check',
|
||||
'title' => __('System Check', 'wpmf'),
|
||||
'content' => 'system-check',
|
||||
'icon' => 'verified_user',
|
||||
'sub_tabs' => array()
|
||||
);
|
||||
|
||||
$dropbox_config = get_option('_wpmfAddon_dropbox_config');
|
||||
$google_config = get_option('_wpmfAddon_cloud_config');
|
||||
$onedrive_config = get_option('_wpmfAddon_onedrive_config');
|
||||
$onedrive_business_config = get_option('_wpmfAddon_onedrive_business_config');
|
||||
|
||||
?>
|
||||
<div class="ju-main-wrapper">
|
||||
<div class="ju-left-panel-toggle">
|
||||
<i class="dashicons dashicons-leftright ju-left-panel-toggle-icon"></i>
|
||||
</div>
|
||||
<div class="ju-left-panel">
|
||||
<div class="ju-logo">
|
||||
<a href="https://www.joomunited.com/" target="_blank">
|
||||
<img src="<?php echo esc_url(WPMF_PLUGIN_URL . 'assets/wordpress-css-framework/images/logo-joomUnited-white.png') ?>"
|
||||
alt="<?php esc_html_e('JoomUnited logo', 'wpmf') ?>">
|
||||
</a>
|
||||
</div>
|
||||
<div class="ju-menu-search">
|
||||
<i class="material-icons ju-menu-search-icon">
|
||||
search
|
||||
</i>
|
||||
|
||||
<input type="text" class="ju-menu-search-input"
|
||||
placeholder="<?php esc_html_e('Search settings', 'wpmf') ?>"
|
||||
>
|
||||
</div>
|
||||
<ul class="tabs ju-menu-tabs">
|
||||
<?php foreach ($tabs_data as $ju_tab) : ?>
|
||||
<li class="tab" data-tab-title="<?php echo esc_attr($ju_tab['title']) ?>">
|
||||
<a href="#<?php echo esc_attr($ju_tab['id']) ?>"
|
||||
class="link-tab white-text <?php echo (empty($ju_tab['sub_tabs'])) ? 'no-submenus' : 'with-submenus' ?>"
|
||||
>
|
||||
<i class="material-icons menu-tab-icon"><?php echo esc_html($ju_tab['icon']) ?></i>
|
||||
<span class="tab-title" title="<?php echo esc_attr($ju_tab['title']) ?>"><?php echo esc_html($ju_tab['title']) ?></span>
|
||||
|
||||
<?php
|
||||
if ($ju_tab['id'] === 'system_check') {
|
||||
if (version_compare(PHP_VERSION, '7.2.0', '<') || !in_array('curl', get_loaded_extensions()) || !function_exists('gd_info')) {
|
||||
echo '<i class="material-icons system-checkbox material-icons-menu-alert" style="float: right;vertical-align: text-bottom;">info</i>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="ju-right-panel">
|
||||
<div id="profiles-container">
|
||||
<?php
|
||||
if (!get_option('wpmf_cloud_connection_notice', false)) :
|
||||
if (!empty($dropbox_config['dropboxToken'])
|
||||
|| (!empty($google_config['connected']) && !empty($google_config['googleBaseFolder']))
|
||||
|| (!empty($onedrive_config['connected']) && !empty($onedrive_config['onedriveBaseFolder']['id']))
|
||||
|| (!empty($onedrive_business_config['connected']) && !empty($onedrive_business_config['onedriveBaseFolder']['id']))) :
|
||||
?>
|
||||
<div class="error wpmf_cloud_connection_notice" id="wpmf_error">
|
||||
<p><?php esc_html_e('WP Media Folder plugin has updated its cloud connection system, it\'s now fully integrated in the media library. It requires to make a synchronization', 'wpmf') ?>
|
||||
<button class="button button-primary btn-run-sync-cloud" style="margin: 0 5px;">
|
||||
<?php esc_html_e('RUN NOW', 'wpmf') ?><span class="spinner spinner-cloud-sync"
|
||||
style="display:none; visibility:visible"></span>
|
||||
</button>
|
||||
</p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<form enctype="multipart/form-data" name="form1" action="" method="post">
|
||||
<input type="hidden" name="wpmf_nonce"
|
||||
value="<?php echo esc_html(wp_create_nonce('wpmf_nonce')) ?>">
|
||||
<?php foreach ($tabs_data as $ju_tab) : ?>
|
||||
<div class="ju-content-wrapper" id="<?php echo esc_attr($ju_tab['id']) ?>" style="display: none">
|
||||
<?php
|
||||
if (!empty($ju_tab['sub_tabs'])) :
|
||||
?>
|
||||
<div class="ju-top-tabs-wrapper">
|
||||
<ul class="tabs ju-top-tabs">
|
||||
<?php
|
||||
foreach ($ju_tab['sub_tabs'] as $tab_id => $tab_label) :
|
||||
?>
|
||||
|
||||
<li class="tab">
|
||||
<a href="#<?php echo esc_html($tab_id) ?>"
|
||||
class="link-tab waves-effect waves-light">
|
||||
<?php echo esc_html($tab_label) ?>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<?php
|
||||
endforeach;
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
<?php if ($ju_tab['id'] !== 'image_compression' && $ju_tab['id'] !== 'cloud' && $ju_tab['id'] !== 'import_export' && $ju_tab['id'] !== 'server_sync') : ?>
|
||||
<div class="wpmf_width_100 top_bar">
|
||||
<h1><?php echo esc_html($ju_tab['title']) ?></h1>
|
||||
<?php
|
||||
require WP_MEDIA_FOLDER_PLUGIN_DIR . '/class/pages/settings/submit_button.php';
|
||||
?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
// phpcs:ignore WordPress.Security.NonceVerification.Missing -- View request, no action
|
||||
if (isset($_POST['btn_wpmf_save']) && $ju_tab['id'] !== 'cloud') {
|
||||
?>
|
||||
<div class="wpmf_width_100 top_bar saved_infos">
|
||||
<?php
|
||||
require WP_MEDIA_FOLDER_PLUGIN_DIR . '/class/pages/settings/saved_info.php';
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<?php include_once(WP_MEDIA_FOLDER_PLUGIN_DIR . '/class/pages/settings/' . $ju_tab['id'] . '.php'); ?>
|
||||
<?php
|
||||
require WP_MEDIA_FOLDER_PLUGIN_DIR . '/class/pages/settings/submit_button.php';
|
||||
?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<input type="hidden" class="setting_tab_value" name="setting_tab_value" value="wpmf-general">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
(function ($) {
|
||||
$(function () {
|
||||
jQuery('.wp-color-field-bg').wpColorPicker({width: 180, defaultColor: '#202231'});
|
||||
jQuery('.wp-color-field-hv').wpColorPicker({width: 180, defaultColor: '#1c1e2a'});
|
||||
jQuery('.wp-color-field-font').wpColorPicker({width: 180, defaultColor: '#f4f6ff'});
|
||||
jQuery('.wp-color-field-hvfont').wpColorPicker({width: 180, defaultColor: '#ffffff'});
|
||||
jQuery('.wp-color-field-icon-color').wpColorPicker({width: 180, defaultColor: '#f4f6ff'});
|
||||
jQuery('.wp-color-field-border-color').wpColorPicker({width: 180, defaultColor: '#f4f6ff'});
|
||||
});
|
||||
})(jQuery);
|
||||
</script>
|
||||
Reference in New Issue
Block a user