are unattached media files a problem?

There are no real runtime or developmental issues you can run into when having unattached media. The Media Library is a place for you to keep any past or future media ( whether it be images, pdfs, docs, etc. ). You don’t need to go through and ensure that every media is attached to any … Read more

What would be the URL to display the WordPress image editor with an image from the media library?

If the edit link to your image is: http://example.tld/wp-admin/post.php?post=551&action=edit then the link to the image editor for that image is: http://example.tld/wp-admin/post.php?post=551&action=edit&image-editor The $_GET[‘image-editor’] is checked for in the edit_form_image_editor() function. PS: I first noticed this trick, when testing this avatar plugin recently (I’m not related to that plugin)

Create a pre-filtered version of the Media Library

Thanks to Milo for the pointer. I’m going to have to work on my application, but the main point is this filters the media library as required. function only_licensed_images($query){ global $pagenow; if( ! in_array( $pagenow, array( ‘upload.php’, ‘admin-ajax.php’ ) ) ) return; $query->set( ‘attachment_category’, ‘Licensed Stock Images’ ); } add_action(‘pre_get_posts’,’only_licensed_images’);

ACF and Gravity Form file upload frontend [closed]

An even easier option is to use my Gravity Forms Media Library plugin. Here’s the meat and potatoes of the functionality: public function maybe_upload_to_media_library( $entry, $form ) { $has_change = false; foreach( $form[‘fields’] as $field ) { if( ! $this->is_applicable_field( $field ) ) { continue; } $value = $entry[ $field->id ]; if( $field->multipleFiles ) { … Read more