plugin updates

This commit is contained in:
Tony Volpe
2024-10-29 13:49:07 -04:00
parent 66268c4512
commit 9000316050
41 changed files with 916 additions and 570 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.9.7
Version: 5.9.8
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.9.7');
define('WPMF_VERSION', '5.9.8');
define('WPMF_HIDE_USER_MEDIA_FOLDER_ROOT', true);
include_once(ABSPATH . 'wp-admin/includes/plugin.php');
@@ -472,98 +472,20 @@ function wpmfUnInstall()
global $wpdb;
$wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'wpmf_s3_queue');
// delete option
// delete all options with prefix 'wpmf_';
$wpdb->query('DELETE FROM '.$wpdb->options. " WHERE option_name LIKE '%wpmf_%'");
// delete all options with prefix '_wpmfAddon_';
$wpdb->query('DELETE FROM '.$wpdb->options. " WHERE option_name LIKE '%_wpmfAddon_%'");
// delete other options
$options_list = array(
'wpmf_addon_version',
'wpmf_folder_root_id',
'wpmf_update_count',
'wpmf_version',
'wpmf_gallery_image_size_value',
'wpmf_padding_masonry',
'wpmf_padding_portfolio',
'wpmf_usegellery',
'wpmf_useorder',
'wpmf_create_folder',
'wpmf_option_override',
'wpmf_option_duplicate',
'wpmf_active_media',
'wpmf_folder_option2',
'wpmf_usegellery_lightbox',
'wpmf_media_rename',
'wpmf_patern_rename',
'wpmf_rename_number',
'wpmf_option_media_remove',
'wpmf_default_dimension',
'wpmf_selected_dimension',
'wpmf_weight_default',
'wpmf_weight_selected',
'wpmf_color_singlefile',
'wpmf_option_singlefile',
'wpmf_option_sync_media',
'wpmf_option_sync_media_external',
'wpmf_list_sync_media',
'wpmf_time_sync',
'wpmf_lastRun_sync',
'wpmf_slider_animation',
'wpmf_option_mediafolder',
'wpmf_option_countfiles',
'wpmf_option_lightboximage',
'wpmf_option_hoverimg',
'wpmf_options_format_title',
'wpmf_image_watermark_apply',
'wpmf_option_image_watermark',
'wpmf_watermark_position',
'wpmf_watermark_image',
'wpmf_watermark_image_id',
'wpmf_gallery_settings',
'_wpmf_import_notice_flag',
'_wpmf_import_order_notice_flag',
'_wpmfAddon_cloud_config',
'_wpmfAddon_dropbox_config',
'wpmf_onedrive_business',
'_wpmfAddon_aws3_config',
'wpmf_gallery_img_per_page',
'_wpmf_import_size_notice_flag',
'_wpmf_activation_redirect',
'wpmfgrl_relationships_media',
'wpmfgrl_relationships',
'wpmf_galleries',
'wpmf_import_nextgen_gallery',
'wpmf_onedrive_business_files',
'wpmf_odv_business_files',
'wpmf_odv_allfiles',
'wpmf_google_folders',
'wpmf_google_allfiles',
'wpmf_dropbox_allfiles',
'wpmf_dropbox_folders',
'wpmf_odv_folders',
'wpmf_odv_business_folders',
'wpmf_odv_business_allfiles',
'_wpmfAddon_onedrive_business_config',
'wpmf_onedrive_notice',
'_wpmfAddon_onedrive_config',
'wpmf_google_folder_id',
'wpmf_dropbox_folder_id',
'wpmf_odv_business_folder_id',
'wpmf_odv_folder_id',
'wpmf_cloud_connection_notice',
'wp-media-folder-addon-tables',
'_wpmf_activation_redirect',
'wpmf_use_taxonomy',
'wpmf_cloud_time_last_sync',
'wpmf_dropbox_attachments',
'wpmf_dropbox_folders',
'wpmf_dropbox_allfiles',
'wpmf_google_attachments',
'wpmf_google_folders',
'wpmf_google_allfiles',
'wpmf_odv_attachments',
'wpmf_odv_folders',
'wpmf_odv_allfiles',
'wpmf_odv_business_attachments',
'wpmf_odv_business_folders',
'wpmf_odv_business_allfiles',
'wpmf_cloud_name_syncing',
'wpmf_ftp_sync_time',
'wpmf_ftp_sync_token',
'wpmf_settings'
'wp-media-folder-addon-tables'
);
foreach ($options_list as $option) {
@@ -2027,3 +1949,42 @@ function wpmfDownloadFile()
}
}
}
/* Register wpmf_tag taxonomy */
add_action('init', 'wpmfTagRegisterTaxonomy', 0);
/**
* Register gallery taxonomy
*
* @return void
*/
function wpmfTagRegisterTaxonomy()
{
if (!taxonomy_exists('wpmf_tag')) {
register_taxonomy(
'wpmf_tag',
'attachment',
array(
'hierarchical' => false,
'show_in_nav_menus' => false,
'show_admin_column' => true,
'show_ui' => true,
'public' => true,
'update_count_callback' => '_update_generic_term_count',
'labels' => array(
'name' => __('Tags', 'wpmf'),
'singular_name' => __('Tags', 'wpmf'),
'menu_name' => __('Media Folder Tags', 'wpmf'),
'all_items' => __('All Tags', 'wpmf'),
'edit_item' => __('Edit Tag', 'wpmf'),
'view_item' => __('View Tag', 'wpmf'),
'update_item' => __('Update Tag', 'wpmf'),
'add_new_item' => __('Add New Tag', 'wpmf'),
'new_item_name' => __('New Tag Name', 'wpmf'),
'parent_item' => __('Parent Tag', 'wpmf'),
'parent_item_colon' => __('Parent Tag:', 'wpmf'),
'search_items' => __('Search Tag', 'wpmf'),
)
)
);
}
}