Thickbox hacking – removing fields

Tricky but once you understand how WordPress sets the sizes and the fields then the rest is easy: function thickbox_fields($form_fields, $post){ unset( $form_fields[‘post_title’], //disables “Title” field and so forth… $form_fields[‘url’], $form_fields[‘image_alt’], $form_fields[‘post_excerpt’], $form_fields[‘post_content’], $form_fields[‘align’], $form_fields[‘image-size’] ); //create the size input for full only and set display to none $size=”full”; $css_id = “image-size-{$size}-{$post->ID}”; $html = “<div … Read more

Set custom upload path for custom post type only?

You can add a filter to upload_dir. Here is a simple class I wrote to do this for a project. Use the protected $filter_path variable to define the alternate uploads directory (*will be relative to wp-content/uploads) class UGC_Attachment { protected $upload_dir; protected $upload_url; protected $filter_path=”/relative_path_from_wp-content/uploads”; function __construct() { $dir = wp_upload_dir(); $this->upload_dir = $dir[‘basedir’] . … Read more

hook into completed image upload filter

WordPress’ media handling strikes me as scattered and inconsistent. I say that only to say that I can’t promise this will work in all cases. However, I think I’d use the add_attachment hook from wp_insert_attachment. You will get a post ID, so you will have to … retrieve the image src with wp_get_attachment_imge_src, probably, retrieve … Read more

How to upload images manually to wordpress?

I haven’t tested this in multi-site but can’t see any reason that it wouldn’t work. The Add from Server plugin searches for images that you manually upload to WordPress and adds them to the media manager. You can find it here: http://wordpress.org/extend/plugins/add-from-server/ Tested on the latest WordPress.

Organize uploaded media files

Thans but I’ve found the solution, what it need to do is to edit the site (Network -> Sites -> Edit -> Settings ) and change the following parameters: Uploads Use Yearmonth Folders 0 Upload Path wp-content/blogs.dir/1/uploads Fileupload Url http://www.mydomain.com/myblog/uploads

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)