plugin update (wp-media-folder)

This commit is contained in:
Tony Volpe
2024-09-05 11:05:17 -04:00
parent 50cd64dd3d
commit daa614524b
20 changed files with 16137 additions and 73 deletions

View File

@@ -335,6 +335,11 @@
column-gap: 10px;
}
.edit-php .wpmf-folder-actions {
width: calc(100% - 40px);
margin: 0 10px 10px 10px;
}
.media-frame .wpmf-folder-actions {
width: calc(50% - 25px);
}
@@ -771,7 +776,7 @@
padding: 0 10px !important;
background: #0073ab !important;
color: #ffffff;
width: 186px !important;
width: 210px !important;
height: 40px !important;
overflow: hidden;
text-overflow: ellipsis;
@@ -3759,4 +3764,130 @@ svg.wpmf-icon-category {
.table-view-list.media .media-icon.image-icon img{
width: 60px!important;
height: 60px!important;
}
.wpmf-folder-post-type {
position: fixed !important;
top: 32px;
left: 160px;
bottom: 0;
box-sizing: border-box;
z-index: 1;
direction: ltr;
}
body.folded .wpmf-folder-post-type {
left: 36px!important;
}
.wpmf-folder-post-type .wpmf-main-tree {
padding: 15px 0 0;
transition: all .15s linear;
-webkit-transition: all .15s linear;
-moz-transition: all .15s linear;
}
.wpmf-folder-post-type .wpmf-main-tree-resize {
top: 65px;
}
.wpmf-folder-post-type .wpmf-tree-actions {
justify-content: center;
}
.wpmf-folder-post-type .wpmf-new-folder {
cursor: pointer;
}
.wp-list-table tr td .wpmf-folder-move-file {
vertical-align: middle;
opacity: 0;
cursor: move;
}
.wp-list-table tr:hover td .wpmf-folder-move-file {
opacity: 1;
}
.wp-list-table tr td .wpmf-folder-move-file .wpmf-folder-item {
display: none;
}
.wpmf-folder-post-type .wpmf-main-tree li > .wpmf-item .wpmf-item-count-all {
display: inline-block;
}
#wpmf_folder_move {
width: 20px!important;
}
.wpmf-folder-type-metabox {
margin-top: 0;
}
.wpmf-folder-type-metabox .tabs-panel {
border: none!important;
padding: 0!important;
}
[id^="taxonomy_wpmf-folder-type-"][id$="_metabox"] h2 {
padding: 16px!important;
font-weight: 500!important;
font-size: 13px!important;
}
[id^="taxonomy_wpmf-folder-type-"][id$="_metabox"] .inside {
margin: 0!important;
padding: 0 16px 16px!important;
}
[id^="taxonomy_wpmf-folder-type-"][id$="_metabox"] .categorychecklist li {
margin-left: 1px;
}
[id^="wpmf-folder-type-"][id$="-checklist"] {
margin: 0!important;
}
[id^="wpmf-folder-type-"][id$="-all"] #genesis-category-checklist-toggle {
display: none!important;
}
.wpmf-item-icon.wpmf-item-unassigned {
margin-left: 3px;
}
.wpmf-hide-show-buttons {
position: absolute;
top: 22px;
right: -12px;
cursor: pointer;
}
.wpmf-hide-folder-tree .wpmf-hide-show-buttons {
right: -22px;
}
.wpmf-hide-show-buttons .toggle-buttons {
display: none;
}
.wpmf-hide-show-buttons .toggle-buttons .dashicons {
color: transparent;
width: 24px;
height: 24px;
}
.wpmf-hide-show-buttons .toggle-buttons.active {
display: block;
}
.wpmf-hide-show-buttons .hide-folders {
background: url('../images/folder-off.svg') no-repeat;
}
.wpmf-hide-show-buttons .show-folders {
background: url('../images/drive-file-move-outline.svg') no-repeat;
}
.wpmf-hide-folder-tree .wpmf-main-tree {
width: 0!important;
min-width: 0!important;
}
.wpmf-hide-folder-tree .wpmf-tree-actions, .wpmf-hide-folder-tree .wpmf-expandable-search, .wpmf-hide-folder-tree .wpmf-all-tree, .wpmf-hide-folder-tree .wpmf-main-tree-resize {
display: none;
transition: all .15s linear;
-webkit-transition: all .15s linear;
-moz-transition: all .15s linear;
}
body.wp-admin #wpcontent {
transition: all .15s linear;
-webkit-transition: all .15s linear;
-moz-transition: all .15s linear;
}
body.woocommerce-page th#taxonomy-wpmf-folder-type-product, body.woocommerce-admin-page th#taxonomy-wpmf-folder-type-product {
width: 10% !important;
}

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#0073ab"><path d="m488-400-65 65 56 56 161-161-161-161-56 56 65 65H320v80h168ZM160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h240l80 80h320q33 0 56.5 23.5T880-640v400q0 33-23.5 56.5T800-160H160Zm0-80h640v-400H447l-80-80H160v480Zm0 0v-480 480Z"/></svg>

After

Width:  |  Height:  |  Size: 361 B

View File

@@ -0,0 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-folder-off" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
<line x1="3" y1="3" x2="21" y2="21" stroke="#0073ab"/>
<path d="M19 19h-14a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 1.172 -1.821m3.828 -.179h1l3 3h7a2 2 0 0 1 2 2v8" stroke="#0073ab" fill="#0073ab"/>
</svg>

After

Width:  |  Height:  |  Size: 486 B

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -340,14 +340,16 @@ var wpmfFoldersModule = void 0,
}
};
// Create an observer instance linked to the callback function
const observer = new MutationObserver(callback);
if (targetNode){
// Create an observer instance linked to the callback function
const observer = new MutationObserver(callback);
// Start observing the target node for configured mutations
observer.observe(targetNode, config);
// Start observing the target node for configured mutations
observer.observe(targetNode, config);
// Later, you can stop observing
// observer.disconnect();
// Later, you can stop observing
// observer.disconnect();
}
// Add the creation gallery from folder button

View File

@@ -91,7 +91,7 @@ var wpmfSnackbarModule = void 0;
// Reset the close function as we've done an undo
wpmfSnackbarModule.snackbar_ids[snack_id].onClose = function () {};
// Finally close the snackbar
wpmfSnackbarModule.snackbar_ids[snack_id].close(snack_id);
wpmfSnackbarModule.close(snack_id);
});
Object.keys(wpmfSnackbarModule.snackbar_ids).map(function (snack_id, index) {

File diff suppressed because it is too large Load Diff

View File

@@ -2297,4 +2297,24 @@ class WpmfHelper
return 'application/octet-stream';
}
}
/**
* Check is folder active for post type
*
* @param string $post_type Post type name
*
* @return boolean
*/
public static function isForThisPostType($post_type)
{
$settings = get_option('wpmf_settings');
if (isset($settings) && isset($settings['wpmf_active_folders_post_types'])) {
$post_types = $settings['wpmf_active_folders_post_types'];
$post_types = is_array($post_types) ? $post_types : [];
} else {
$post_types = array();
}
return in_array($post_type, $post_types);
}
}

View File

@@ -1016,6 +1016,12 @@ class WpMediaFolder
*/
public function loadAssets()
{
global $typenow, $current_screen;
if (WpmfHelper::isForThisPostType($typenow) && 'edit' == $current_screen->base) {
return;
}
wp_enqueue_script('jquery');
wp_enqueue_script('jquery-ui-sortable');
wp_enqueue_script('jquery-ui-draggable');
@@ -2042,7 +2048,8 @@ class WpMediaFolder
continue;
}
if (defined('WPMFAD_PLUGIN_DIR')) {
// Todo: Upon disconnection, remove cloud folder data from the database. This will bypass the unnecessary 'exclude' check, enhancing overall performance
if (false && defined('WPMFAD_PLUGIN_DIR')) {
$type = $this->getTermMeta($term->term_id, 'wpmf_drive_type');
if ((in_array('Dropbox', $exclude) && $type === 'dropbox')
|| (in_array('Google Drive', $exclude) && $type === 'google_drive')

View File

@@ -201,22 +201,29 @@ class WpmfPdfEmbed
$width = (!empty($attrs['width']) && strpos($attrs['width'], '%') === false) ? $attrs['width'] : '100%';
$height = (!empty($attrs['height']) && strpos($attrs['height'], '%') === false) ? $attrs['height'] : '800';
$download = (!empty($attrs['download'])) ? $attrs['download'] : 'off';
$plugin_dir_url = plugin_dir_url(__DIR__);
$viewer_base_url = $plugin_dir_url . 'class/templates/pdf-embed.php';
$response = wp_remote_head($url);
if (is_wp_error($response)) {
$url = $plugin_dir_url . 'assets/pdf-loading-error.pdf';
}
$status_code = wp_remote_retrieve_response_code($response);
if ($status_code === 404) {
$url = $plugin_dir_url . 'assets/pdf-loading-error.pdf';
}
$wpmf_pdf_embed_old = apply_filters('wpmf_pdf_embed_old', false);
if ($wpmf_pdf_embed_old) {
$width = (!empty($attrs['width']) && strpos($attrs['width'], '%') === false) ? $attrs['width'] : '';
$return = '<a class="wpmf-pdfemb-viewer" data-download="'. $download .'" data-width="'. (int)$width .'" data-height="'. ((int)$height - 31) .'" href="'.esc_url($url).'">'.esc_html($title).'</a>';
} else {
$plugin_dir_url = plugin_dir_url(__DIR__);
$viewer_base_url = $plugin_dir_url . 'class/templates/pdf-embed.php';
$attachment_info = '?file=' . urlencode($url);
$final_url = $viewer_base_url . $attachment_info . '&plugins_url=' . urlencode($plugin_dir_url);
$return = '<div><iframe width="' . esc_attr($width) . '" height="' . esc_attr($height) . '" src="' . esc_url($final_url) . '" title="Embedded PDF" class="wpmf-pdfjs-iframe"></iframe></div>';
$response = wp_remote_head($url);
if (is_wp_error($response)) {
$url = $plugin_dir_url . 'assets/pdf-loading-error.pdf';
}
$status_code = wp_remote_retrieve_response_code($response);
if ($status_code === 404) {
$url = $plugin_dir_url . 'assets/pdf-loading-error.pdf';
}
$attachment_info = '?file=' . urlencode($url);
$final_url = $viewer_base_url . $attachment_info . '&plugins_url=' . urlencode($plugin_dir_url);
$return = '<div><iframe width="' . esc_attr($width) . '" height="' . esc_attr($height) . '" src="' . esc_url($final_url) . '" title="Embedded PDF" class="wpmf-pdfjs-iframe"></iframe></div>';
}
} else {
$return = '<a href="'.esc_url($url).'" '. (($attrs['target'] !== '') ? 'target="'.esc_attr($attrs['target']).'"' : '') .'>'.esc_html($title).'</a>';
}
@@ -257,7 +264,13 @@ class WpmfPdfEmbed
*/
public function enqueue()
{
wp_enqueue_script('wpmf_compat_js');
$wpmf_pdf_embed_old = apply_filters('wpmf_pdf_embed_old', false);
if ($wpmf_pdf_embed_old) {
wp_enqueue_script('wpmf_embed_pdf_js');
wp_enqueue_script('wpmf_compat_js');
wp_enqueue_script('wpmf_pdf_js');
wp_enqueue_style('pdfemb_embed_pdf_css');
}
}
/**
@@ -269,7 +282,6 @@ class WpmfPdfEmbed
public function getTranslation()
{
$array = array(
// 'worker_src' => plugins_url('assets/js/pdf-embed/pdf.worker.min.js', dirname(__FILE__)),
'worker_src' => plugins_url('assets/js/pdf-embed/pdf.worker.js', dirname(__FILE__)),
'cmap_url' => plugins_url('assets/js/pdf-embed/cmaps/', dirname(__FILE__)),
'pdf_sandbox'=> plugins_url('assets/js/pdf-embed/pdf.sandbox.js', dirname(__FILE__)),
@@ -292,6 +304,11 @@ class WpmfPdfEmbed
'poweredby' => 1
)
);
$wpmf_pdf_embed_old = apply_filters('wpmf_pdf_embed_old', false);
if ($wpmf_pdf_embed_old) {
$array['worker_src'] = plugins_url('assets/js/pdf-embed/pdf.worker.min.js', dirname(__FILE__));
unset($array['pdf_sandbox']);
}
return $array;
}
@@ -404,22 +421,33 @@ class WpmfPdfEmbed
*/
public function registerScript()
{
wp_register_script(
'wpmf_compat_js',
plugins_url('assets/js/pdf-embed/compatibility.js', dirname(__FILE__)),
array('jquery')
);
}
/**
* Add script
*
* @return void
*/
public function addCustomPdfL10nLink()
{
$locale_url = plugins_url('assets/js/pdf-embed/locale/locale.properties', dirname(__FILE__));
echo '<link rel="resource" type="application/l10n" href="' . esc_url($locale_url) . '">';
$wpmf_pdf_embed_old = apply_filters('wpmf_pdf_embed_old', false);
if ($wpmf_pdf_embed_old) {
wp_register_script(
'wpmf_embed_pdf_js',
plugins_url('assets/js/pdf-embed/all-pdfemb-basic.min.js', dirname(__FILE__)),
array('jquery')
);
wp_localize_script(
'wpmf_embed_pdf_js',
'wpmf_pdfemb_trans',
$this->getTranslation()
);
wp_register_script(
'wpmf_compat_js',
plugins_url('assets/js/pdf-embed/compatibility.js', dirname(__FILE__)),
array('jquery')
);
wp_register_script(
'wpmf_pdf_js',
plugins_url('assets/js/pdf-embed/pdf-old.js', dirname(__FILE__)),
array()
);
wp_register_style(
'pdfemb_embed_pdf_css',
plugins_url('assets/css/pdfemb-embed-pdf.css', dirname(__FILE__))
);
}
}
/**

View File

@@ -1693,6 +1693,22 @@ class WpmfMediaFolderOption
if (!get_option('wpmf_gallery_settings', false)) {
add_option('wpmf_gallery_settings', $gallery_settings, '', 'yes');
}
if (!get_option('wpmf_minimize_folder_tree_post_type', false)) {
add_option('wpmf_minimize_folder_tree_post_type', 1, '', 'yes');
}
$post_types = $this->getAllPostTypes();
foreach ($post_types as $post_type) {
$option_name = 'wpmf_option_folder_'.$post_type->name;
if (!get_option($option_name, false)) {
if ($option_name === 'wpmf_option_folder_post') {
add_option($option_name, 1, '', 'yes');
} else {
add_option($option_name, 0, '', 'yes');
}
}
}
}
/**
@@ -2474,7 +2490,8 @@ class WpmfMediaFolderOption
'root_media_count',
'watermark_exclude_public_gallery',
'watermark_exclude_photograph_gallery',
'connect_nextcloud'
'connect_nextcloud',
'wpmf_minimize_folder_tree_post_type'
);
if (isset($_POST['btn_wpmf_save'])) {
if (empty($_POST['wpmf_nonce'])
@@ -2743,6 +2760,19 @@ class WpmfMediaFolderOption
}
}
$post_types = $this->getAllPostTypes();
$wpmf_active_folders_post_types = array();
foreach ($post_types as $post_type) {
$option = 'wpmf_option_folder_'.$post_type->name;
if (isset($_POST[$option])) {
wpmfSetOption($option, $_POST[$option]);
if ((int) $_POST[$option] === 1) {
$wpmf_active_folders_post_types[] = $post_type->name;
}
}
}
wpmfSetOption('wpmf_active_folders_post_types', $wpmf_active_folders_post_types);
if (isset($_POST['wpmf_active_media']) && (int) $_POST['wpmf_active_media'] === 1) {
$wpmf_checkbox_tree = get_option('wpmf_checkbox_tree');
if (!empty($wpmf_checkbox_tree)) {
@@ -4404,4 +4434,29 @@ class WpmfMediaFolderOption
);
}
}
/**
* Get all post types
*
* @return array
*/
public function getAllPostTypes()
{
$post_types = get_post_types(array( 'show_in_menu' => true ), 'objects');
// List of post types to exclude
$page_builder_post_types = array(
'elementor_library',
'e-landing-page',
'wpb',
'attachment'
);
foreach ($page_builder_post_types as $page_builder_post_type) {
if (isset($post_types[$page_builder_post_type])) {
unset($post_types[$page_builder_post_type]);
}
}
return $post_types;
}
}

View File

@@ -601,3 +601,81 @@ $featured_image_folder = wpmfGetOption('featured_image_folder');
</div>
</div>
</div>
<!--------------------------------------- Folder settings ----------------------------------->
<?php
$post_types = get_post_types(array( 'show_in_menu' => true ), 'objects');
// List of post types to exclude
$exclude_post_types = array(
'elementor_library',
'e-landing-page',
'wpb',
'attachment',
'shop_order',
'shop_coupon'
);
foreach ($exclude_post_types as $exclude_post_type) {
if (isset($post_types[$exclude_post_type])) {
unset($post_types[$exclude_post_type]);
}
}
$countPostTypes = 0;
?>
<div id="folder_settings" class="tab-content">
<div class="content-box">
<div class="ju-settings-option">
<div class="wpmf_row_full">
<input type="hidden" name="wpmf_minimize_folder_tree_post_type" value="0">
<label data-wpmftippy="<?php esc_html_e('Open folders sidebar minimized by default on posts and pages', 'wpmf'); ?>" class="ju-setting-label text" for="wpmf_minimize_folder_tree_post_type"><?php echo esc_html__('Open sidebar minimized', 'wpmf') ?></label>
<div class="ju-switch-button">
<label class="switch">
<input type="checkbox" name="wpmf_minimize_folder_tree_post_type" id="wpmf_minimize_folder_tree_post_type" value="1"
<?php
$minimize_folder_tree_option = wpmfGetOption('wpmf_minimize_folder_tree_post_type');
if (isset($minimize_folder_tree_option) && (int) $minimize_folder_tree_option === 1) {
echo 'checked';
}
?>
>
<span class="slider round"></span>
</label>
</div>
</div>
</div>
<?php foreach ($post_types as $value) : ?>
<?php
$countPostTypes++;
$classSetting = 'ju-settings-option';
if ($countPostTypes % 2 === 1) {
$classSetting = 'ju-settings-option wpmf_right m-r-0';
}
$tooltip_string = esc_html__('Activate a folder management for WordPress', 'wpmf').' '.strtolower($value->label).' '.esc_html__('(ie. classify', 'wpmf').' '.strtolower($value->label).' '.esc_html__('in folders, like virtual categories)', 'wpmf');
?>
<div class="<?php echo esc_attr($classSetting); ?>">
<div class="wpmf_row_full">
<input type="hidden" name="wpmf_option_folder_<?php echo esc_attr($value->name); ?>" value="0">
<label data-wpmftippy="<?php echo esc_attr($tooltip_string); ?>" class="ju-setting-label text" for="wpmf_option_folder_<?php echo esc_attr($value->name); ?>"><?php echo esc_html__('Activate folders for', 'wpmf') . ' ' . esc_attr($value->label) ?></label>
<div class="ju-switch-button">
<label class="switch">
<input type="checkbox" name="wpmf_option_folder_<?php echo esc_attr($value->name); ?>" id="wpmf_option_folder_<?php echo esc_attr($value->name); ?>" value="1"
<?php
$option_name = 'wpmf_option_folder_'.$value->name;
$option_folder = wpmfGetOption($option_name);
if (isset($option_folder) && (int) $option_folder === 1) {
echo 'checked';
}
?>
>
<span class="slider round"></span>
</label>
</div>
</div>
</div>
<?php endforeach; ?>
</div>
</div>

View File

@@ -9,7 +9,7 @@ $tabs_data = array(
'sub_tabs' => array(
'additional_features' => __('Main settings', 'wpmf'),
'media_filtering' => __('Media filtering', 'wpmf'),
// 'advanced' => __('Advanced', 'wpmf')
'folder_settings' => __('Folder settings', 'wpmf')
)
),
array(

View File

@@ -0,0 +1,24 @@
<?php
global $typenow;
if ($typenow === 'page') {
$label = esc_html__('pages', 'wpmf');
} elseif ($typenow === 'post') {
$label = esc_html__('posts', 'wpmf');
} else {
$post_type_name = $typenow;
$post_types = get_post_types([ 'name' => $post_type_name], 'objects');
if (!empty($post_types) && is_array($post_types) && isset($post_types[$post_type_name]) && isset($post_types[$post_type_name]->label)) {
$label = $post_types[$post_type_name]->label;
}
}
$folder_tree_status_option = wpmfGetOption('wpmf_folder_tree_status');
$class_name = '';
if (!empty($folder_tree_status_option) && (isset($folder_tree_status_option[$typenow]) && $folder_tree_status_option[$typenow] === 'hide') || !isset($folder_tree_status_option[$typenow])) {
$class_name = 'wpmf-hide-folder-tree';
}
?>
<div class="wpmf-folder-post-type <?php echo esc_attr($class_name); ?>">
<div class="wpmf-main-tree"></div>
</div>

View File

@@ -3,7 +3,7 @@ Tags: media, folder
Requires at least: 4.7.0
Tested up to: 6.6
Requires PHP: 5.6
Stable tag: 5.8.9
Stable tag: 5.9.3
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -20,6 +20,20 @@ Stop searching for an image through thousand of media, just navigate like you do
= Changelog =
= 5.9.3 =
* Fix : The Screen Options dropdown menu on the admin screen is not working
= 5.9.2 =
* Fix : Error when saving post with some post type
= 5.9.1 =
* Fix : Error with some custom post type.
= 5.9.0 =
* Add : Possibility to organize posts with folders (activated by default)
* Add : Possibility to organize pages with folders (not enabled by default)
* Add : Possibility to organize custom post with folders (not enabled by default)
= 5.8.9 =
* Fix : Drop and drag issue on Chrome browser (v127)

View File

@@ -4,7 +4,7 @@
Plugin URI: http://www.joomunited.com
Description: WP media Folder is a WordPress plugin that enhance the WordPress media manager by adding a folder manager inside.
Author: Joomunited
Version: 5.8.9
Version: 5.9.3
Update URI: https://www.joomunited.com/juupdater_files/wp-media-folder.json
Author URI: http://www.joomunited.com
Text Domain: wpmf
@@ -79,7 +79,7 @@ if (!defined('WPMF_TAXO')) {
define('_WPMF_GALLERY_PREFIX', '_wpmf_gallery_');
define('WPMF_PLUGIN_URL', plugin_dir_url(__FILE__));
define('WPMF_DOMAIN', 'wpmf');
define('WPMF_VERSION', '5.8.9');
define('WPMF_VERSION', '5.9.3');
define('WPMF_HIDE_USER_MEDIA_FOLDER_ROOT', true);
include_once(ABSPATH . 'wp-admin/includes/plugin.php');
@@ -219,30 +219,6 @@ function wpmfSyncServerFolder()
}
}
/**
* Modify script tags to use type="module" for specific scripts.
*
* This function hooks into the 'script_loader_tag' filter to modify the script
* tags for specific handles ('wpmf_pdf_js', 'wpmf_embed_pdf_js'). If a script's
* handle matches one of these, the function changes the script tag to include
* type="module", which is necessary for ES6 module scripts.
*
* @param string $tag The original HTML script tag.
* @param string $handle The handle of the script.
* @param string $src The source URL of the script.
*
* @return string The modified script tag.
*/
function add_module_to_my_script($tag, $handle, $src)
{
if ('wpmf_pdf_js' === $handle || 'wpmf_embed_pdf_js' === $handle || 'wpmf_embed_pdf_js' === $handle) {
$tag = '<script type="module" src="' . esc_url($src) . '"></script>';//phpcs:ignore
}
return $tag;
}
add_filter('script_loader_tag', 'add_module_to_my_script', 10, 3);
// Reintegrate WP Media Folders
if (is_admin()) {
if (!class_exists('\Joomunited\Queue\JuMainQueue')) {
@@ -962,7 +938,11 @@ function wpmfGetOption($option_name)
'border_color' => '#f4f6ff',
'icon_image' => 'download_style_0',
'icon_color' => '#f4f6ff'
), $media_download)
), $media_download),
'wpmf_minimize_folder_tree_post_type' => 1,
'wpmf_option_folder_post' => 0,
'wpmf_folder_tree_status' => array(),
'wpmf_active_folders_post_types' => array()
);
$settings = get_option('wpmf_settings');
if (isset($settings) && isset($settings[$option_name])) {
@@ -977,6 +957,10 @@ function wpmfGetOption($option_name)
}
}
if (!isset($default_settings[$option_name])) {
return false;
}
return $default_settings[$option_name];
}
@@ -1220,7 +1204,7 @@ function wpmfVcBeforeInit()
array(),
WPMF_VERSION
);
if (file_exists(WP_PLUGIN_DIR . '/wp-media-folder-gallery-addon/wp-media-folder-gallery-addon.php')) {
if (is_plugin_active(WP_PLUGIN_DIR . '/wp-media-folder-gallery-addon/wp-media-folder-gallery-addon.php')) {
wp_enqueue_style(
'wpmf-bakery-download-all-style',
WP_PLUGIN_URL . '/wp-media-folder-gallery-addon/assets/css/download_gallery.css',
@@ -1370,6 +1354,9 @@ if (isset($load_gif) && (int) $load_gif === 0) {
new WpmfLoadGif();
}
require_once(WP_MEDIA_FOLDER_PLUGIN_DIR . 'class/class-folder-post-type.php');
new WpmfMediaFolderPostType();
/**
* Get cloud folder ID
*