How to display .ico files in the media library

Update: It looks like this will be supported in 5.0+. See ticket #43458 The default This is how the favicon (.ico) files show up in the Media Grid view: This is the corresponding part of the micro template: <# } else if ( ‘image’ === data.type && data.sizes ) { #> <div class=”centered”> <img src=”https://wordpress.stackexchange.com/questions/177981/{{ … Read more

Unwanted media library URLs in posts?

This thing you are saying is unwanted is just normal functionality under WordPress and it cannot be removed. However there are things you can do to point the unwanted URL to something more usefull. Here is a forum post on this issue with some interesting fixes and a description on what is happening: http://wordpress.org/support/topic/disable-attachment-posts-without-remove-the-medias Attachments … Read more

Upload Multiple Files With media_handle_upload

here if you use custom template past this in the begining <?php if( ‘POST’ == $_SERVER[‘REQUEST_METHOD’] ) { if ( $_FILES ) { $files = $_FILES[“my_file_upload”]; foreach ($files[‘name’] as $key => $value) { if ($files[‘name’][$key]) { $file = array( ‘name’ => $files[‘name’][$key], ‘type’ => $files[‘type’][$key], ‘tmp_name’ => $files[‘tmp_name’][$key], ‘error’ => $files[‘error’][$key], ‘size’ => $files[‘size’][$key] ); … Read more

How do I select an image from Media Library in my plugin?

You should use wp.media to use the WordPress Media Manager dialog. First, you need to enqueue the scritps: // As you are dealing with plugin settings, // I assume you are in admin side add_action( ‘admin_enqueue_scripts’, ‘load_wp_media_files’ ); function load_wp_media_files( $page ) { // change to the $page where you want to enqueue the script … Read more

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