File tree Expand file tree Collapse file tree 3 files changed +30
-0
lines changed
Expand file tree Collapse file tree 3 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ Following standard features of the WordPress Core are manipulated or extended.
3939* Search
4040* Site Health
4141* Update
42+ * Uploads
4243
4344### Archives
4445
@@ -101,6 +102,10 @@ Following standard features of the WordPress Core are manipulated or extended.
101102* Run Plugin Updates automaticly
102103* Run Theme Updates automaticly
103104
105+ ###
106+
107+ * Add Subdirectory YEAR for Uploads
108+
104109## Plugin Modifications
105110
106111Standard features of the following plugins will be manipulated or extended.
@@ -220,6 +225,7 @@ This project is licensed under the GPL3 License.
220225
221226Release pending.
222227
228+ * Added: Custom Upload Subdirectories
223229* Added: TootPress Afterloop Filter
224230* Added: Caching of ActivityPub Endpoints in WP REST API
225231* Added: Fade out WB REST CACHE Icon @ Admin Bar
Original file line number Diff line number Diff line change 4949require_once ('unmus_visibility.php ' );
5050require_once ('unmus_cache.php ' );
5151require_once ('unmus_tootpress.php ' );
52+ require_once ('unmus_ftp.php ' );
5253
5354// Ensure that all required functions are available during setup
5455require_once ( ABSPATH . 'wp-admin/includes/upgrade.php ' );
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ /**
4+ * FTP
5+ *
6+ * @package unmus
7+ * @since 0.9
8+ */
9+
10+ function unmus_media_path ( $ param ){
11+
12+ $ year =date ("Y " );
13+ $ custom_path = '/ ' .$ year ;
14+
15+ $ param ['path ' ] = $ param ['path ' ] . $ custom_path ;
16+ $ param ['url ' ] = $ param ['url ' ] . $ custom_path ;
17+
18+ return $ param ;
19+
20+ }
21+ add_filter ('upload_dir ' , 'unmus_media_path ' );
22+
23+ ?>
You can’t perform that action at this time.
0 commit comments