plugin updates
This commit is contained in:
@@ -3526,3 +3526,7 @@ dialog :link {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
#toolbarViewer .toolbarButton {
|
||||
cursor: pointer;
|
||||
}
|
||||
@@ -576,17 +576,20 @@ input.ju-radiobox:focus {
|
||||
}
|
||||
|
||||
.ju-main-wrapper .ju-right-panel .tabs.ju-top-tabs {
|
||||
/* width: fit-content !important */
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.ju-main-wrapper .ju-right-panel .tabs.ju-top-tabs li.tab {
|
||||
text-transform: capitalize;
|
||||
min-width: 200px;
|
||||
background-color: #fff;
|
||||
width: 20%;
|
||||
flex-grow: inherit;
|
||||
}
|
||||
|
||||
.ju-main-wrapper .ju-right-panel #cloud .tabs.ju-top-tabs li.tab {
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.ju-main-wrapper .ju-right-panel .tabs.ju-top-tabs li.tab a.link-tab {
|
||||
color: #ff8726;
|
||||
background-color: #fff;
|
||||
|
||||
@@ -400,13 +400,21 @@ class WpmfDisplayGallery
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* Filter gallery query argument to get images.
|
||||
*
|
||||
* @param array Gallery query arguments
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
$args = apply_filters('wpmf_gallery_query_args', $args);
|
||||
$query = new WP_Query($args);
|
||||
$_attachments = $query->get_posts();
|
||||
$gallery_items = array();
|
||||
|
||||
$last_folder_parent = $this->getFolderParent($wpmf_folder_id[0]);
|
||||
foreach ($_attachments as $key => $val) {
|
||||
if (($last_folder_parent->slug !== 'nextcloud' || !strpos($val->post_mime_type, 'avif')) && !strpos($val->post_mime_type, 'pdf')) { // hide file pdf and avif in nextcloud folder
|
||||
if ($last_folder_parent->slug !== 'nextcloud' || !strpos($val->post_mime_type, 'avif')) { // hide avif in nextcloud folder
|
||||
$gallery_items[$val->ID] = $_attachments[$key];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -210,6 +210,8 @@ class WpmfPdfEmbed
|
||||
$plugin_dir_url = plugin_dir_url(__DIR__);
|
||||
$viewer_base_url = $plugin_dir_url . 'class/templates/pdf-embed.php';
|
||||
|
||||
$remove_items = apply_filters('wpmf_pdf_embed_remove_button', false);
|
||||
|
||||
$response = wp_remote_head($url);
|
||||
if (is_wp_error($response)) {
|
||||
$url = $plugin_dir_url . 'assets/pdf-loading-error.pdf';
|
||||
@@ -222,6 +224,11 @@ class WpmfPdfEmbed
|
||||
|
||||
$attachment_info = '?file=' . urlencode($url);
|
||||
$final_url = $viewer_base_url . $attachment_info . '&plugins_url=' . urlencode($plugin_dir_url);
|
||||
if (!empty($remove_items) && is_array($remove_items)) {
|
||||
$remove_items = implode(',', $remove_items);
|
||||
$remove_items = urlencode($remove_items);
|
||||
$final_url .= '&remove_items='.$remove_items;
|
||||
}
|
||||
$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 {
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
<?php
|
||||
/* PDF embed template */
|
||||
$plugins_url = $_GET['plugins_url']; // phpcs:ignore
|
||||
// phpcs:disable
|
||||
$plugins_url = $_GET['plugins_url'];
|
||||
if (isset($_GET['remove_items'])) {
|
||||
$remove_items = $_GET['remove_items'];
|
||||
$remove_items = explode(',', $remove_items);
|
||||
}
|
||||
// phpcs:enable
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
@@ -41,6 +47,17 @@ See https://github.com/adobe-type-tools/cmap-resources
|
||||
wpmf_pdf_embed_obj.errorLoadingPdf = "<?php echo $plugins_url . 'assets/pdf-loading-error.pdf'; // phpcs:ignore ?>";
|
||||
</script>
|
||||
<script src="<?php echo $plugins_url . 'assets/js/pdf-embed/viewer.js' ?>"></script><?php // phpcs:ignore ?>
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
var removeItems = <?php echo json_encode($remove_items); ?>;
|
||||
removeItems.forEach(function(itemId) {
|
||||
var element = document.getElementById(itemId);
|
||||
if (element) {
|
||||
element.remove();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body tabindex="1">
|
||||
@@ -176,9 +193,9 @@ See https://github.com/adobe-type-tools/cmap-resources
|
||||
|
||||
<div class="horizontalToolbarSeparator visibleLargeView"></div>
|
||||
|
||||
<button id="presentationMode" class="secondaryToolbarButton" title="Switch to Presentation Mode" tabindex="54" data-l10n-id="presentation_mode">
|
||||
<!-- <button id="presentationMode" class="secondaryToolbarButton" title="Switch to Presentation Mode" tabindex="54" data-l10n-id="presentation_mode">
|
||||
<span data-l10n-id="presentation_mode_label">Presentation Mode</span>
|
||||
</button>
|
||||
</button> -->
|
||||
|
||||
<a href="#" id="viewBookmark" class="secondaryToolbarButton" title="Current Page (View URL from Current Page)" tabindex="55" data-l10n-id="bookmark1">
|
||||
<span data-l10n-id="bookmark1_label">Current Page</span>
|
||||
@@ -288,7 +305,9 @@ See https://github.com/adobe-type-tools/cmap-resources
|
||||
<span data-l10n-id="save_label">Save</span>
|
||||
</button>
|
||||
|
||||
<div class="verticalToolbarSeparator hiddenMediumView"></div>
|
||||
<button id="presentationMode" class="toolbarButton hiddenMediumView" title="Switch to Presentation Mode" tabindex="54" data-l10n-id="presentation_mode">
|
||||
<span data-l10n-id="presentation_mode_label">Presentation Mode</span>
|
||||
</button>
|
||||
|
||||
<div id="editorModeButtons" class="splitToolbarButton toggled" role="radiogroup">
|
||||
<button id="editorFreeText" class="toolbarButton" disabled="disabled" title="Text" role="radio" aria-checked="false" aria-controls="editorFreeTextParamsToolbar" tabindex="34" data-l10n-id="editor_free_text2">
|
||||
@@ -302,7 +321,6 @@ See https://github.com/adobe-type-tools/cmap-resources
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div id="editorModeSeparator" class="verticalToolbarSeparator"></div>
|
||||
|
||||
<button id="secondaryToolbarToggle" class="toolbarButton" title="Tools" tabindex="48" data-l10n-id="tools" aria-expanded="false" aria-controls="secondaryToolbar">
|
||||
<span data-l10n-id="tools_label">Tools</span>
|
||||
|
||||
Binary file not shown.
@@ -1,9 +1,9 @@
|
||||
=== WP Media Folder ===
|
||||
Tags: media, folder
|
||||
Requires at least: 4.7.0
|
||||
Tested up to: 6.6
|
||||
Tested up to: 6.7
|
||||
Requires PHP: 5.6
|
||||
Stable tag: 5.9.10
|
||||
Stable tag: 5.9.11
|
||||
License: GPLv2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
@@ -20,6 +20,10 @@ Stop searching for an image through thousand of media, just navigate like you do
|
||||
|
||||
= Changelog =
|
||||
|
||||
= 5.9.11 =
|
||||
* Fix : Disable warning _load_textdomain_just_in_time in WordPress 6.7
|
||||
* Fix : Error when missing required PHP DOM extension
|
||||
|
||||
= 5.9.10 =
|
||||
* Fix : Upload file to wrong folder in specific case
|
||||
* Fix : A PHP warning
|
||||
|
||||
@@ -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.10
|
||||
Version: 5.9.11
|
||||
Update URI: https://www.joomunited.com/juupdater_files/wp-media-folder.json
|
||||
Author URI: http://www.joomunited.com
|
||||
Text Domain: wpmf
|
||||
@@ -79,9 +79,11 @@ 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.10');
|
||||
define('WPMF_VERSION', '5.9.11');
|
||||
define('WPMF_HIDE_USER_MEDIA_FOLDER_ROOT', true);
|
||||
|
||||
// disable warning function _load_textdomain_just_in_time was called incorrectly
|
||||
add_filter('doing_it_wrong_trigger_error', '__return_false');
|
||||
include_once(ABSPATH . 'wp-admin/includes/plugin.php');
|
||||
//Include the jutranslation helpers
|
||||
include_once('jutranslation' . DIRECTORY_SEPARATOR . 'jutranslation.php');
|
||||
@@ -1648,13 +1650,20 @@ if ($remote_video) {
|
||||
*/
|
||||
function wpmfFindImages($content)
|
||||
{
|
||||
if (!class_exists('DOMDocument')) {
|
||||
return $content;
|
||||
}
|
||||
if (preg_match_all('/(<img[^>]+>)/i', $content, $matches)) {
|
||||
if (isset($matches[0]) && is_array($matches[0])) {
|
||||
foreach ($matches[0] as $img) {
|
||||
$dom = new DOMDocument();
|
||||
$dom->loadHTML($img, LIBXML_NOERROR);
|
||||
$src = $dom->getElementsByTagName('img')->item(0)->getAttribute('src');
|
||||
$type = $dom->getElementsByTagName('img')->item(0)->getAttribute('data-type');
|
||||
$imgItem = $dom->getElementsByTagName('img')->item(0);
|
||||
if (empty($imgItem)) {
|
||||
return $content;
|
||||
}
|
||||
$src = $imgItem->getAttribute('src');
|
||||
$type = $imgItem->getAttribute('data-type');
|
||||
if ($type === 'wpmfgalleryimg') {
|
||||
return $content;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user