Media upload on WordPress changes title of image
Media upload on WordPress changes title of image
Media upload on WordPress changes title of image
How select multiple document as like media gallery
Display attachments by the ID of the post being edited in the wp.media frame (frontend)
Thanks for your help. Managed to figure out a temporary solution, should anyone else have a similar query. Temporarily edited media.php $filename = basename( wp_get_attachment_url( $attachment_id ) ); $default_types = wp_get_video_extensions(); $defaults_atts = array( ‘src’ => ”, ‘poster’ => “diary/wp-content/Pictures/posters/”.$filename.”.jpg'”, ‘loop’ => ”, ‘autoplay’ => ”, ‘preload’ => ‘none’, ‘width’ => 640, ‘height’ => 360, … Read more
add this to your functions.php or in a snippet, with this code the users with role external will only see their own uploads, any other role will see them all just has before. add_filter( ‘ajax_query_attachments_args’, ‘role_external’ ); function role_external( $query ) { $user_id = get_current_user_id(); if ( $user_id && current_user_can(‘external’) ) { $query[‘author’] = $user_id; … Read more
This probably isn’t the whole solution for you as you didn’t post any code, so I can’t incorporate what I know with anything, however, the following snippet will upload an image into a custom directory, made at the time of execution, as the attachment. I’ve commented the key lines… function upload_to_new_dir() { global $post; //This … Read more
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
http://en.support.wordpress.com/audio/
From comments: You have to use the image_send_to_editor filter to filter the string before it arrives at the window.send_to_editor javascript function. add_filter(‘image_send_to_editor’, ‘my_image_send_to_editor’, 10, 2); function my_image_send_to_editor($html, $id) { $description = str_replace(“\r\n”,’ ‘, $description); }
Use get_children() (Codex ref): $images = get_children( array( ‘post_parent’ => $post->ID, ‘post_type’ => ‘attachment’, ‘post_mime_type’ => ‘image’, ‘orderby’ => ‘menu_order’, ‘order’ => ‘ASC’ ) ); The first image will be $images[0]. EDIT: And by “first image”, I mean, the $ID of the first image, which you can use with any of the myriad image- and … Read more