Flexible Upload(Image upload plugin) V1.13 bug patch for WordPress V2.6.5
I have installed lightbox plugin in my WordPress, but every images need input ref=lightbox, it bozes me.
Maybe there is a plugin can solve my issue, it’s Flexible Upload.
The following description is from WordPress.org.
Flexible Upload is a plugin for WordPress intended to extend WordPress basic upload functionality.
The main features are:
* Automatically resize/crop picture at upload
* Create thumbnail of the desired size* Include watermark in every uploaded picture
* Support for picture alignment (left/right/center)
* Support Lightbox (or other) “rel” or “target” tag
* Support for picture caption (not when using tinyMCE)
* Support multiple file upload
* Multi-language support
* Fully configurable
Download: http://wordpress.org/extend/plugins/flexible-upload/
or using Plugin Manager to download and activate automatically.
Refer: http://www.laotudou.com/wordpress-plugin-manager.html
Flexible Upload provide some extension of upload function, I’m satisfied with it.
But, after activated, when uploading images, it shows error as following,
Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, ‘media_admin_css’ was given in /www/users/……./wp-includes/plugin.php on line 311
To solve the error, please refer: http://wordpress.org/support/topic/186579, and look at alexrabe’s reply,
what should be done is to modify “flexible-upload-wp25.php” and find following content,
function fup_set_actions() {
remove_action(‘media_upload_image’, ‘media_upload_image’);
add_action(‘media_upload_image’, ‘fup_media_upload_image’);
add_action(‘admin_head_fup_media_upload_form’, ‘media_admin_css’);
remove_filter(‘media_send_to_editor’, ‘image_media_send_to_editor’);
add_filter(‘media_send_to_editor’, ‘fup_media_send_to_editor’, 10, 3);
}
and add red font part
function fup_set_actions() {
remove_action(‘media_upload_image’, ‘media_upload_image’);
add_action(‘media_upload_image’, ‘fup_media_upload_image’);
// not longer needed for wp2.6
if ( !function_exists(‘wp_enqueue_style’) )
add_action(‘admin_head_fup_media_upload_form’, ‘media_admin_css’);
remove_filter(‘media_send_to_editor’, ‘image_media_send_to_editor’);
add_filter(‘media_send_to_editor’, ‘fup_media_send_to_editor’, 10, 3);
}
After the modification, upload the new “flexible-upload-wp25.php”, and test upload image funtion, it works!
Note: only image upload is supported by Flexible Upload.
