Articles of uploads

How can one update a theme on a live site without interruption?

So i have a WordPress-based site with a custom Genesis child theme. Once the site goes live, we are obviously going to need to make changes periodically to the child theme’s code — modifying CSS and similar. These are the problems i’ve run into: I don’t have shell or FTP access, so i can’t just […]

How to resize image on client-side before upload?

I’ve been using Plupload to resize images on the client side before uploading them to the server. I’ve implemented a front-end form which lets the user select a file from their computer and submit it. My Plupload config looks like this: var uploader = new plupload.Uploader({ browse_button: ‘browse’, url: $url, resize: { width: 100, height: […]

How to rename image at uploading on specific plugin or post-type in WordPress

I am working on a plugin. In plugin, there is a custom media uploader. All images upload successfully. Then I want that when I upload images its renamed, so i get this code and write it in my plugin file. function foo_rename_image($filename) { $info = pathinfo($filename); $ext = empty($info[‘extension’]) ? ” : ‘.’ . $info[‘extension’]; […]

Multisite media library uploads broken images

I am having an issue with one of my sub-sites media library. All it uploads are broken images. It loads fine locally but for some reason it gives me the error “Failed to load resource: the server responded with a status of 404 (Not Found) http://img.mywordpresstips.com/multisite/model6-150×150.jpg” Locally all uploads goes into my wp-content/uploads path, but […]

Add fields to the WordPress media uploader

I am trying to add an URL field to the WordPress media uploader using following code: /** * Add an URL field to gallery attachments * * @param $form_fields array, fields to include in attachment form * @param $post object, attachment record in database * @return $form_fields, modified form fields */ function add_attachment_url_field( $form_fields, $post […]

How to solve: An error occured in the upload

This error message appears when I try to upload any picture. Currently I am using WordPress 3.8.

User logged-in from front end is logged out automatically accessing wp-admin

I have stuck in serious problem. I want to create a document and upload a word doc from front end after user login. Logged in user is admin. The plugin bp-doc uses WordPress default media uploader to upload file. The plugin hits …/wp-admin/async-upload.php, but this throws an error An error occurred in the upload. Please […]

How to get profile user id when uploading image via media uploader on profile page

I have a PlugIn which lets a user upload an image to a user profile in the backend. Now I want to access the user id in the uploader to change the filename of the uploaded image. On the user profile edit page, I get the id via global $profileuser. But when I access it […]

Disable drag and upload in Media Library

Does any one knows a valid/standard way to disable drag and upload when accessing the media library in the admin area? In order to make this sense to you, I’m building a multisite and user of sub-site cannot upload media files but they can view. I can remove their capability ‘upload_file’ but that would completely […]

How to import 55k images (uploaded via FTP) into WordPress Media libary?

I have got 55k images in my WordPress Uploads folder which are not showing up in the Media Libary, how can I make them registered there ? I tried the plugin ‘Add from Server’ but there are to many images, and the Plugin fails to do anything. Any other suggestions, how I could try to […]