Media Manager (since 3.5): How to show an empty Media Library when creating a media frame?

It’s not a pretty solution but I used the post__in attribute for this once in a custom plugin. Basically you usually define an array of attachment id’s to show in the media library. library: { type: ‘image’, post__in:[23,25,26] // or a javascript variable that contained the array of id’s } My code was originally built … Read more

Capability to prevent upload of files

You can try with this: function remove_media_tabs($strings) { unset($strings[“insertFromUrlTitle”]); unset($strings[“setFeaturedImageTitle”]); unset($strings[“createGalleryTitle”]); unset($strings[“uploadFilesTitle”]); return $strings; } add_filter(‘media_view_strings’,’remove_media_tabs’); This will remove ‘Upload file’ and ‘Insert from URL’ links when you open insert media screen, so user will be able only to select images or whatever that is already in media library. For more things you can do … Read more

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