Version Description
Better media library to folders bulk drag and drop in list mode
Download this release
Release Info
Developer | galdub |
Plugin | Folders – Unlimited Folders to Organize Media Library Folder, Pages, Posts, File Manager |
Version | 2.2.9 |
Comparing to | |
See all releases |
Code changes from version 2.2.8 to 2.2.9
- assets/css/design.css +1 -0
- assets/js/custom.js +35 -18
- folders.php +8 -3
- includes/class-affiliate.php +171 -0
- readme.txt +4 -1
assets/css/design.css
CHANGED
@@ -787,6 +787,7 @@ div#custom-menu {
|
|
787 |
-webkit-border-radius: 5px;
|
788 |
margin-top: 0px;
|
789 |
cursor: none;
|
|
|
790 |
}
|
791 |
.media-frame, .media-frame-content, .media-frame .attachments-browser {
|
792 |
overflow: inherit;
|
787 |
-webkit-border-radius: 5px;
|
788 |
margin-top: 0px;
|
789 |
cursor: none;
|
790 |
+
font-size: 12px;
|
791 |
}
|
792 |
.media-frame, .media-frame-content, .media-frame .attachments-browser {
|
793 |
overflow: inherit;
|
assets/js/custom.js
CHANGED
@@ -755,18 +755,33 @@ jQuery(document).ready(function(){
|
|
755 |
});
|
756 |
});
|
757 |
|
758 |
-
jQuery(".wcp-move-multiple").
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
770 |
});
|
771 |
|
772 |
jQuery("h3.title").livequery(function(){
|
@@ -1199,13 +1214,15 @@ if(wcp_settings.post_type == "attachment") {
|
|
1199 |
}
|
1200 |
}
|
1201 |
if(res.taxonomies.length) {
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
|
|
|
|
|
|
1207 |
}
|
1208 |
-
selectedDD.val(selectedVal);
|
1209 |
}
|
1210 |
if(activeRecordID != "") {
|
1211 |
jQuery("#wcp_folder_"+activeRecordID).addClass("active-item");
|
755 |
});
|
756 |
});
|
757 |
|
758 |
+
jQuery(".wcp-move-multiple").livequery(function(){
|
759 |
+
jQuery(this).draggable({
|
760 |
+
revert: "invalid",
|
761 |
+
containment: "document",
|
762 |
+
helper: function (event, ui) {
|
763 |
+
jQuery(".selected-items").remove();
|
764 |
+
selectedItems = jQuery("#the-list th input:checked").length;
|
765 |
+
if(selectedItems > 0) {
|
766 |
+
selectedItems = (selectedItems == 0 || selectedItems == 1) ? "1 Item" : selectedItems + " Items";
|
767 |
+
return jQuery("<div class='selected-items'><span class='total-post-count'>" + selectedItems + " Selected</span></div>");
|
768 |
+
} else {
|
769 |
+
return jQuery("<div class='selected-items'><span class='total-post-count'>Select Items to move</span></div>");
|
770 |
+
}
|
771 |
+
},
|
772 |
+
start: function( event, ui){
|
773 |
+
jQuery("body").addClass("no-hover-css");
|
774 |
+
},
|
775 |
+
cursor: "move",
|
776 |
+
cursorAt: {
|
777 |
+
left: 0,
|
778 |
+
top: 0
|
779 |
+
},
|
780 |
+
stop: function( event, ui ) {
|
781 |
+
jQuery(".selected-items").remove();
|
782 |
+
jQuery("body").removeClass("no-hover-css");
|
783 |
+
}
|
784 |
+
});
|
785 |
});
|
786 |
|
787 |
jQuery("h3.title").livequery(function(){
|
1214 |
}
|
1215 |
}
|
1216 |
if(res.taxonomies.length) {
|
1217 |
+
if(jQuery("#media-attachment-taxonomy-filter").length) {
|
1218 |
+
folders_media_options.terms = res.taxonomies;
|
1219 |
+
var selectedDD = jQuery("#media-attachment-taxonomy-filter");
|
1220 |
+
selectedDD.html("<option value='all'>All Folders</option><option value='unassigned'>(Unassigned)</option>");
|
1221 |
+
for (i = 0; i < res.taxonomies.length; i++) {
|
1222 |
+
selectedDD.append("<option value='" + res.taxonomies[i].term_id + "'>" + res.taxonomies[i].name + " (" + res.taxonomies[i].count + ")</option>");
|
1223 |
+
}
|
1224 |
+
selectedDD.val(selectedVal);
|
1225 |
}
|
|
|
1226 |
}
|
1227 |
if(activeRecordID != "") {
|
1228 |
jQuery("#wcp_folder_"+activeRecordID).addClass("active-item");
|
folders.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Plugin Name: Folders
|
4 |
* Description: Arrange media, pages, custom post types and posts into folders
|
5 |
-
* Version: 2.2.
|
6 |
* Author: Premio
|
7 |
* Author URI: https://premio.io/downloads/folders/
|
8 |
*/
|
@@ -15,8 +15,13 @@ define('WCP_FOLDER', 'folders');
|
|
15 |
define('WCP_FOLDER_VAR', 'folders_settings');
|
16 |
define("WCP_DS", DIRECTORY_SEPARATOR);
|
17 |
define('WCP_FOLDER_URL',plugin_dir_url(__FILE__));
|
18 |
-
define('WCP_FOLDER_VERSION',"2.2.
|
19 |
|
20 |
include_once plugin_dir_path(__FILE__)."includes/folders.class.php";
|
21 |
register_activation_hook( __FILE__, array( 'WCP_Folders', 'activate' ) );
|
22 |
-
WCP_Folders::get_instance();
|
|
|
|
|
|
|
|
|
|
2 |
/**
|
3 |
* Plugin Name: Folders
|
4 |
* Description: Arrange media, pages, custom post types and posts into folders
|
5 |
+
* Version: 2.2.9
|
6 |
* Author: Premio
|
7 |
* Author URI: https://premio.io/downloads/folders/
|
8 |
*/
|
15 |
define('WCP_FOLDER_VAR', 'folders_settings');
|
16 |
define("WCP_DS", DIRECTORY_SEPARATOR);
|
17 |
define('WCP_FOLDER_URL',plugin_dir_url(__FILE__));
|
18 |
+
define('WCP_FOLDER_VERSION',"2.2.9");
|
19 |
|
20 |
include_once plugin_dir_path(__FILE__)."includes/folders.class.php";
|
21 |
register_activation_hook( __FILE__, array( 'WCP_Folders', 'activate' ) );
|
22 |
+
WCP_Folders::get_instance();
|
23 |
+
|
24 |
+
/* Affiliate Class*/
|
25 |
+
if(is_admin()) {
|
26 |
+
include_once plugin_dir_path(__FILE__)."includes/class-affiliate.php";
|
27 |
+
}
|
includes/class-affiliate.php
ADDED
@@ -0,0 +1,171 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Folder_affiliate_program {
|
3 |
+
|
4 |
+
public $plugin_name = "Folders";
|
5 |
+
|
6 |
+
public $plugin_slug = "folders";
|
7 |
+
|
8 |
+
public function __construct() {
|
9 |
+
add_action("wp_ajax_".$this->plugin_slug."_affiliate_program", array($this, "affiliate_program"));
|
10 |
+
|
11 |
+
add_action('admin_notices', array($this, 'admin_notices'));
|
12 |
+
}
|
13 |
+
|
14 |
+
public function affiliate_program() {
|
15 |
+
$nonce = filter_input(INPUT_POST, 'nonce', FILTER_SANITIZE_STRING);
|
16 |
+
$days = filter_input(INPUT_POST, 'days', FILTER_SANITIZE_STRING);
|
17 |
+
if(!empty($nonce) && wp_verify_nonce($nonce, $this->plugin_slug."_affiliate_program")) {
|
18 |
+
if($days == -1) {
|
19 |
+
add_option($this->plugin_slug."_hide_affiliate_box", "1");
|
20 |
+
} else {
|
21 |
+
$date = date("Y-m-d", strtotime("+".$days." days"));
|
22 |
+
update_option($this->plugin_slug."_show_affiliate_box_after", $date);
|
23 |
+
}
|
24 |
+
}
|
25 |
+
die;
|
26 |
+
}
|
27 |
+
|
28 |
+
public function admin_notices() {
|
29 |
+
$is_hidden = get_option($this->plugin_slug."_hide_affiliate_box");
|
30 |
+
if($is_hidden !== false) {
|
31 |
+
return;
|
32 |
+
}
|
33 |
+
$date_to_show = get_option($this->plugin_slug."_show_affiliate_box_after");
|
34 |
+
if($date_to_show === false || empty($date_to_show)) {
|
35 |
+
$date = date("Y-m-d", strtotime("+5 days"));
|
36 |
+
update_option($this->plugin_slug."_show_affiliate_box_after", $date);
|
37 |
+
return;
|
38 |
+
}
|
39 |
+
$current_date = date("Y-m-d");
|
40 |
+
if($current_date < $date_to_show) {
|
41 |
+
return;
|
42 |
+
}
|
43 |
+
?>
|
44 |
+
<style>
|
45 |
+
.<?php echo $this->plugin_slug ?>-premio-affiliate p a {
|
46 |
+
display: inline-block;
|
47 |
+
float: right;
|
48 |
+
text-decoration: none;
|
49 |
+
color: #999999;
|
50 |
+
position: absolute;
|
51 |
+
right: 12px;
|
52 |
+
top: 12px;
|
53 |
+
}
|
54 |
+
.<?php echo $this->plugin_slug ?>-premio-affiliate p a:hover, .<?php echo $this->plugin_slug ?>-premio-affiliate p a:focus {
|
55 |
+
color: #333333;
|
56 |
+
}
|
57 |
+
.<?php echo $this->plugin_slug ?>-premio-affiliate .button span {
|
58 |
+
display: inline-block;
|
59 |
+
line-height: 27px;
|
60 |
+
font-size: 16px;
|
61 |
+
}
|
62 |
+
.<?php echo $this->plugin_slug ?>-premio-affiliate {
|
63 |
+
padding: 1px 100px 12px 12px;
|
64 |
+
margin: 15px 15px 2px;
|
65 |
+
position: relative;
|
66 |
+
}
|
67 |
+
.<?php echo $this->plugin_slug ?>-affiliate-popup {
|
68 |
+
position: fixed;
|
69 |
+
width: 100%;
|
70 |
+
height: 100%;
|
71 |
+
z-index: 10001;
|
72 |
+
background: rgba(0,0,0,0.65);
|
73 |
+
top: 0;
|
74 |
+
left: 0;
|
75 |
+
display: none;
|
76 |
+
}
|
77 |
+
.<?php echo $this->plugin_slug ?>-affiliate-popup-content {
|
78 |
+
background: #ffffff;
|
79 |
+
padding: 20px;
|
80 |
+
position: absolute;
|
81 |
+
max-width: 450px;
|
82 |
+
width: 100%;
|
83 |
+
margin: 0 auto;
|
84 |
+
top: 45%;
|
85 |
+
left: 0;
|
86 |
+
right: 0;
|
87 |
+
-webkit-border-radius: 5px;
|
88 |
+
-moz-border-radius: 5px;
|
89 |
+
border-radius: 5px;: ;
|
90 |
+
}
|
91 |
+
.<?php echo $this->plugin_slug ?>-affiliate-title {
|
92 |
+
padding: 0 0 10px 0;
|
93 |
+
font-weight: bold;
|
94 |
+
}
|
95 |
+
.<?php echo $this->plugin_slug ?>-affiliate-options a {
|
96 |
+
display: block;
|
97 |
+
margin: 5px 0 5px 0;
|
98 |
+
color: #333;
|
99 |
+
text-decoration: none;
|
100 |
+
}
|
101 |
+
.<?php echo $this->plugin_slug ?>-affiliate-options a.dismiss {
|
102 |
+
color: #999;
|
103 |
+
}
|
104 |
+
.<?php echo $this->plugin_slug ?>-affiliate-options a:hover, .affiliate-options a:focus {
|
105 |
+
color: #0073aa;
|
106 |
+
}
|
107 |
+
button.<?php echo $this->plugin_slug ?>-close-affiliate-popup {
|
108 |
+
position: absolute;
|
109 |
+
top: 5px;
|
110 |
+
right: 0;
|
111 |
+
border: none;
|
112 |
+
background: transparent;
|
113 |
+
cursor: pointer;
|
114 |
+
}
|
115 |
+
a.button.button-primary.<?php echo $this->plugin_slug ?>-affiliate-btn {
|
116 |
+
font-size: 14px;
|
117 |
+
background: #F51366;
|
118 |
+
color: #fff;
|
119 |
+
border: solid 1px #F51366;
|
120 |
+
border-radius: 3px;
|
121 |
+
line-height: 24px;
|
122 |
+
-webkit-box-shadow: 0 3px 5px -3px #333333;
|
123 |
+
-moz-box-shadow: 0 3px 5px -3px #333333;
|
124 |
+
box-shadow: 0 3px 5px -3px #333333;
|
125 |
+
text-shadow: none;
|
126 |
+
}
|
127 |
+
</style>
|
128 |
+
<div class="notice notice-info chaty-notice <?php echo $this->plugin_slug ?>-premio-affiliate <?php echo $this->plugin_slug ?>-premio-affiliate">
|
129 |
+
<p>Hi there, you've been using <?php echo $this->plugin_name ?> for a while now. Do you know that <b><?php echo $this->plugin_name ?></b> has an affiliate program? Join now and get 25% lifetime commission <a href="javascript:;" class="dismiss-btn"><span class="dashicons dashicons-no-alt"></span> Dismiss</a></p>
|
130 |
+
<div class="clear clearfix"></div>
|
131 |
+
<a class="button button-primary <?php echo $this->plugin_slug ?>-affiliate-btn" target="_blank" href="https://premio.io/affiliates/?utm_source=inapp&domain=<?php echo $_SERVER['HTTP_HOST'] ?>">Tell me more <span class="dashicons dashicons-arrow-right-alt"></span></a>
|
132 |
+
</div>
|
133 |
+
<div class="<?php echo $this->plugin_slug ?>-affiliate-popup">
|
134 |
+
<div class="<?php echo $this->plugin_slug ?>-affiliate-popup-content">
|
135 |
+
<button class="<?php echo $this->plugin_slug ?>-close-affiliate-popup"><span class="dashicons dashicons-no-alt"></span></button>
|
136 |
+
<div class="<?php echo $this->plugin_slug ?>-affiliate-title">Would you like us to remind you about this later?</div>
|
137 |
+
<div class="<?php echo $this->plugin_slug ?>-affiliate-options">
|
138 |
+
<a href="javascript:;" data-days="3">Remind me in 3 days</a>
|
139 |
+
<a href="javascript:;" data-days="10">Remind me in 10 days</a>
|
140 |
+
<a href="javascript:;" data-days="-1" class="dismiss">Don't remind me about this</a>
|
141 |
+
</div>
|
142 |
+
</div>
|
143 |
+
</div>
|
144 |
+
<script>
|
145 |
+
jQuery(document).ready(function(){
|
146 |
+
jQuery(document).on("click", ".<?php echo $this->plugin_slug ?>-premio-affiliate p a.dismiss-btn", function(){
|
147 |
+
jQuery(".<?php echo $this->plugin_slug ?>-affiliate-popup").show();
|
148 |
+
});
|
149 |
+
jQuery(document).on("click", ".<?php echo $this->plugin_slug ?>-close-affiliate-popup", function(){
|
150 |
+
jQuery(".<?php echo $this->plugin_slug ?>-affiliate-popup").hide();
|
151 |
+
});
|
152 |
+
jQuery(document).on("click", ".<?php echo $this->plugin_slug ?>-affiliate-options a", function(){
|
153 |
+
var dataDays = jQuery(this).attr("data-days");
|
154 |
+
jQuery(".<?php echo $this->plugin_slug ?>-affiliate-popup").hide();
|
155 |
+
jQuery(".<?php echo $this->plugin_slug ?>-premio-affiliate").hide();
|
156 |
+
jQuery.ajax({
|
157 |
+
url: "<?php echo admin_url("admin-ajax.php") ?>",
|
158 |
+
data: "action=<?php echo esc_attr($this->plugin_slug) ?>_affiliate_program&days="+dataDays+"&nonce=<?php echo esc_attr(wp_create_nonce($this->plugin_slug."_affiliate_program")) ?>",
|
159 |
+
type: "post",
|
160 |
+
success: function() {
|
161 |
+
jQuery(".<?php echo $this->plugin_slug ?>-affiliate-popup").remove();
|
162 |
+
jQuery(".<?php echo $this->plugin_slug ?>-premio-affiliate").remove();
|
163 |
+
}
|
164 |
+
});
|
165 |
+
});
|
166 |
+
});
|
167 |
+
</script>
|
168 |
+
<?php
|
169 |
+
}
|
170 |
+
}
|
171 |
+
$Folder_affiliate_program = new Folder_affiliate_program();
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: galdub, tomeraharon, premio
|
|
3 |
Tags: folder, folders, organize, pages folders, media library, posts folders, media folders, subfolders, file manager, directories
|
4 |
Requires at least: 3.0.0
|
5 |
Tested up to: 5.2
|
6 |
-
Stable tag: 2.2.
|
7 |
Plugin URI: https://premio.io/downloads/folders/
|
8 |
|
9 |
Folders is a WordPress plugin that will help you quickly organize and manage all of your Pages, Posts and Media library files in folders.
|
@@ -133,6 +133,9 @@ A live demo for the Folders plugin is available at <a href="https://demo.premio.
|
|
133 |
|
134 |
== Changelog ==
|
135 |
|
|
|
|
|
|
|
136 |
= 2.2.8 =
|
137 |
Folder organization dropdown bug
|
138 |
|
3 |
Tags: folder, folders, organize, pages folders, media library, posts folders, media folders, subfolders, file manager, directories
|
4 |
Requires at least: 3.0.0
|
5 |
Tested up to: 5.2
|
6 |
+
Stable tag: 2.2.9
|
7 |
Plugin URI: https://premio.io/downloads/folders/
|
8 |
|
9 |
Folders is a WordPress plugin that will help you quickly organize and manage all of your Pages, Posts and Media library files in folders.
|
133 |
|
134 |
== Changelog ==
|
135 |
|
136 |
+
= 2.2.9 =
|
137 |
+
Better media library to folders bulk drag and drop in list mode
|
138 |
+
|
139 |
= 2.2.8 =
|
140 |
Folder organization dropdown bug
|
141 |
|