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

@@ -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
*