Async.upload.php (Error Message: Failed to load response data)
Async.upload.php (Error Message: Failed to load response data)
Async.upload.php (Error Message: Failed to load response data)
I was finally offered a link to use the browser uploader. I tried that and got a descriptive error message, approximately this: “Php could not get permission to temporary folder UNKNOWN”. Now that’s something I can work with. I went to php.ini and found sys_temp_dir which says it will default to the standard temporary directory. … Read more
Set attachment category from file name on upload
I found a plugin called Add from server that I used to pull in the images. It doesn’t feel rock solid but I think it worked.
Uploads from site on Server A uploaded on Server B (Like sort of CDN)
My plugin Gravity Forms Media Library provides this functionality for Gravity Forms: https://gravitywiz.com/documentation/gravity-forms-media-library/
The media_sideload_image() function is only available in the admin by default, and init runs on all page loads. See the Codex article: If you want to use this function outside of the context of /wp-admin/ (typically if you are writing a more advanced custom importer script) you need to include media.php and depending includes: require_once(ABSPATH … Read more
I believe you can use wp_get_attachment_image_attributes filter here like so: function custom_class( $attr ) { $attr[‘class’] = ‘custom-class’; return $attr; }); add_filter( ‘wp_get_attachment_image_attributes’, ‘custom_class’ );
Access featured image URL based on media ID?
Try changing current_user_can(‘contributor’) to current_user_can(‘edit_posts’). According to the Codex, ‘Passing role names to current_user_can() is discouraged as this is not guaranteed to work correctly.’