Hot answers tagged

1

custom_uploader is actually an instance of wp.media() and not an HTML element, so the variable does not have a onselect property, but it does have a on() method/function which you can use to listen to the select event which is triggered after an attachment is selected. Secondly, an HTML element does not have a innerHTML() method, only a property of the same ...


1

Apply the following fixes (those with the // Fix <number>: comment) and your code would work in that only one random folder that will be created for all the uploads in the current session: (Note: I presumed the $countfiles is properly defined in your actual code.) function file_upload_callback() { global $wpdb; $table_name = '...


Only top voted, non community-wiki answers of a minimum length are eligible