Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [ziparchive]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
39 views

Using unzip_file() to get contents of file

With each post, I save a zip folder as an attachment containing a json file with large amount of data. When looping through posts, I need to open this folder and retrieve the contents of json file but ...
0
votes
0answers
47 views

Zip a file and add as attachment

I first add support for mime type attachments // ADD MIME TYPEs FOR ATTACHMENTS add_filter( 'upload_mimes', 'my_myme_types', 1, 1 ); function my_myme_types( $mime_types ) { $mime_types['txt'] = '...
1
vote
2answers
43 views

Can a manually uploaded plugin be made to track updates from the WordPress.org plugin directory?

I've made a plugin which I will give to some users to test by manually uploading the zip file. I later on want to host the plugin in the WordPress.org plugin directory, but I want to avoid users ...
6
votes
2answers
1k views

How to assign multiple file-mime-types to extension?

To allow extra file types for upload, we use: add_filter('mime_types', 'my_mimes'); function my_mimes($all) { $all['zip'] = 'application/zip'; return $all; } But how to assign multiple file ...
0
votes
1answer
521 views

Download a zip folder of selected files

I'm trying to download multiple files from the server in a zipped folder. Here is the code I have thus far: HTML <form method="post"> <input type="checkbox" name="checked[]" value="<?...
0
votes
1answer
211 views

Why does unzip_file always return true but nothing happens?

I am trying to use the $wp_filesystem of WordPress to unzip a file located inside the wp-content/plugins and place it at the same location. However whatever I try the WordPress method unzip_file() ...
1
vote
1answer
200 views

How can I fix my server so core/plugins/theme update don't silently fail?

I run my own server and have a few dozen WordPress sites. Recently, many updates (plugin and core) have been silently failing. If I try to do the update from the updates page, I get a message like ...
2
votes
1answer
1k views

AJAX issue - Uncaught SyntaxError when processing Zip File

I'm creating an application that will allow a user to fill out a form and then have a customized zip file downloaded for them upon submit. I'm utilizing AJAX to accomplish this task. Build....
2
votes
2answers
2k views

How do you use unzip_file()?

I have been trying to use the unzip_file() function. It says undefined so I looked into it and the WP_Filesystem() must be called and set up. So easy, right? require_once(ABSPATH .'/wp-admin/includes/...
-1
votes
1answer
17 views

Duplicating wordpress install issue

I wonder if anyone could help me with a problem that I am having. I am having a guy do some plugin/theme customization on my wordpress site and he wants to have a duplicate of the site to work with on ...
-3
votes
1answer
101 views

What does the output of this plugin mean? [closed]

I just tried to compress a file and am not sure if it worked or not. The plugin I am using gave me the following results: adding: wp-includes/js/tinymce/plugins/wpeditimage/editimage.html (deflated ...
2
votes
2answers
1k views

How do you protect a premium theme from being copied?

I'm thinking of doing up a couple of premium themes, and selling copies of them. I've never done anything like this before, so I have a couple of questions. I appreciate that this is mainly a forum ...
0
votes
1answer
175 views

What should I pass for $needed_dirs when calling _unzip_file_pclzip (aka PclZip)?

I'm trying to create a fallback method when ZipArchive is not present. I'm seeking to use the _unzip_file_pclzip() function contained in wp-admin/includes/file.php However, I'm not sure what is ...