I’m using add_meta_box() but want to include TinyMCE editor *and* Media Uploads for each box

Here is a complete tutorial with source files that do exactly what you want, You can upload multi images by cloning the input field and also you can preview, delete images with ajax, add multi metaboxes to multiple/different post types and more. http://www.deluxeblogtips.com/2010/05/howto-meta-box-wordpress.html And here you can find some good information on how you call … Read more

How do I modify the “Insert Media” lightbox in the admin to only show media items from a category?

I think you can go about the filter list_terms_exclusions, but i don`t tested. example: function fb_list_terms_exclusions($args) { if ( ‘media-upload-popup’ != $where ) return $where; if ( !current_user_can(‘manage_categories’) ) $where = ” AND t.slug NOT IN (‘uncategorized’, ‘category-2’)”; // slug of categories return $where; } add_filter( ‘list_terms_exclusions’, ‘fb_list_terms_exclusions’ ); update for the comments to this … Read more

Control attachments menu order with jQuery Sortable

To save the menu order use wp_update_post() with each attachment ID and its new menu position: $thisattachment = array(); $thisattachment[‘ID’] = $thisid; $thisattachment[‘menu_order’] = $new_menu_position; wp_update_post($thisattachment); EDIT – assuming these are already attachments and you’re updating them? Otherwise you have to insert the attachments first with wp_insert_attachment

change video icons to selected thumbnail?

You can do this with a three easy steps: Create a directory in your theme that will hold all the new icons /themes/theme-name/images/icons/ Copy all the images from /wp-includes/images/crystal/ to your new directory Hook into the wp_mime_type_icon filter in your functions.php file Your filter would look like this: function change_mime_icon($icon, $mime = null, $post_id = … Read more

Clean up wp-content/upload/ folder

Every time you upload an image, WordPress automatically create duplicate copies of that image and re-size them to thumbnail and medium size. Most of the time, these images are not used. In addition, there could also be some images that you have uploaded, but did not use them in the post. These unused images could … Read more

offload media to external services [closed]

You can check out the following plugins that use an external storage for media. Some of them supposedly use the build in media (S3), while other simply allow you to use the storage in your post (azure) via a button. http://wordpress.org/extend/plugins/windows-azure-storage/ , yes Microsoft wrote this plugin. http://wordpress.org/extend/plugins/tantan-s3-cloudfront/ Amazon S3 for WordPress. http://wordpress.org/extend/plugins/cdn-sync-tool/ Several services(cloudfiles, … Read more

Image Uploader API

This tutorial explains basic use of WordPress media uploader. http://wp.tutsplus.com/tutorials/creative-coding/how-to-integrate-the-wordpress-media-uploader-in-theme-and-plugin-options To add image sizes use <?php add_image_size( $name, $width, $height, $crop ); ?> Read more on this at Codex http://codex.wordpress.org/Function_Reference/add_image_size

Where does the gallery shortcode gets its attachments from?

This completely depends on how your gallery shortcode looks like. If you replaced it with something custom, then you’ll have to take a look at the plugin (or the theme). The default gallery shortcode gets it from a query: $query_args = array( ‘post_status’ => ‘inherit’ ,’post_type’ => ‘attachment’ ,’post_mime_type’ => ‘image’ ,’order’ => $order ,’orderby’ … Read more

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