Permission to edit media files (photo captions, alt tags)
Permission to edit media files (photo captions, alt tags)
Permission to edit media files (photo captions, alt tags)
Replacing embedded post images from another site
images inside uploads folder will return 404
You can try to use the next code: // NAV: Different upload file size limits based on file type function wpcoder_upload_files_limits($file) { // Define custom file size limits based on file type $file_size_limits = array( ‘mp4’ => 64 * 1024 * 1024, // 64 MB ‘pdf’ => 30 * 1024 * 1024, // 30 MB … Read more
Yoast SEO (and probably other SEO plugins as well) handles that issue by redirecting to the image itself. I’m not sure how they do it, but you can either go the quick route and install the plugin, or you try to look trough the code to decipher it for your own code. Otherwise, this is … Read more
I have uploaded thousands of files in the uploads folder via FTP and I want to register them into the database without any plugin
WordPress isn’t doing this, those files are served by the server underneath WordPress, aka Nginx/Apache/etc. This is because there’s a cost to loading WordPress and you don’t want to pay that cost for assets such as JPEG’s or other files in the uploads folder, it’s much faster to let Apache/Nginx do it as that’s something … Read more
How to make the search form in “Add media” search custom attachment fields?
Well I have figured out the answer to my question. As mentioned in the comments, I’m making an ajax call to get the list of entries for the custom ‘select’ dropdown. In the ajax function, I’m comparing window.location.pathname to this regex:var regex = /\/wp-admin\/post[-new]*\.php/; to make sure that it only executes when I’m trying to … Read more
How to Upload a media item with alt text and description