Articles of uploads

WordPress “HTTP error.” when uploading Media – IIS

I am receiving the error message: “HTTP error.” in WordPress when trying to upload a 300 MB FLV file to the media library. Environment WordPress 4.7.2 PHP 5.6.27 IIS 7 Windows Server 2008 R2

Get User's Facebook Photos as WordPress Upload

I am new and a bit of troublesome on how WordPress work as I have plan to use it as CMS for my commercial website. I have been figuring out on how to make an image that I have retrieved from user’s Facebook photo and save it as upload file in WordPress. Let me explain […]

Override json encoding in rest api

I’m trying to create a secure download plugin. I found the rest api the best option for this task, but i cant change headers like Content-Type:. In the register_rest_route callback these headers already set. If i set Content-disposition: attachment, filename=asd.txt i get ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION in chrome. I know rest is not meant to handle these tasks, […]

Generating different dimension images while uploading image file from custom plugin page

There is a file upload provision in my custom plugin page. On this, I’m saving the image details into post table as an attachment post type and moving the uploaded file manually. Here is my code: $wp_upload_dir = wp_upload_dir(); $filetype = $_FILES[‘img_name’]; $filename = $filetype[‘name’]; $attachment = array( ‘guid’ => $wp_upload_dir[‘url’] . ‘/’ . basename( […]

Using the default wordpress uploader inside plugin

I’m developing a plugin which requires some files which the user must upload. I’ve seen that some plugins (like WooCommerce) seem to use the internal WP uploader. How do I use it to let wp handle file uploads admin-side?

Protecting direct access to PDF and ZIP unless user logged in (without plugin)

Working on a WordPress support site which has registered only user content, including uploaded PDF and ZIP files. I’m looking for a way to prevent direct access to those PDFs and ZIP files inside the wp-content/uploads directory without the use of a plugin. Reading through older questions, this is REALLY close (but comments are closed): […]

Allow Author on Site A capability to upload files on Site B in Multi Site

I have a multisite. In Site A, a user is logged in as author. In Site B, user is still logged without role, but he can’t upload file in a front end form (made in ACF). I need that user only logged in Site A, can upload file in this front end form in Site […]

WordPress Fancybox Resize Large Image

I have a wordpress users that aren’t very good at resizing images so when they upload an image to wordpress it’s still big > 3000px. They can import into a post and a thumbnail is generated. When you click on the thumbnail the image appears in a light box (using fancybox) but because the image […]

Is there a plugin or simple way to add a multiple images metabox to a post?

I am looking for a way to create a custom field/metabox that allow to attach multiple and infinite images to a post. This would allow to create a custom post type for a portfolio and allow to attach images without pasting them inside the post textarea. Most plugins I’ve seen allow for only 1 image. […]

Rename the insert button in media upload window

I have several different posts type, each with a media upload. What I want to do is to rename the “insert into post” button so it correlates to the individual custom-posts. For example – custom post type – “award” and then the media upload box would have the following button, “insert into award”. Any ideas?