No there is no pro version, and is no plan for pro version. For custom development, contact from here: https://ximdevs.com/contact-us/
Hi Nazmul, I’m trying to use the id given in the shortcode to an attachments content (description). WP uses the the post_content value given in the array as the description so I thought I’d be able to set this as the id variable.
In your core functions where you create the $attachment array, I want to use the value here..
Ive tried 'post_content' => $id with no luck
Would yo be able to put me in the right track here?
$id is undefined there. You have to pass $id with dropzone when submitting the data e.g. with ‘sending’ event. Then you will be able to use the id in wp_dz_ajax_upload_handle function.
Where would I configure the sending event? As if doing so in your core functions file the Id wouldn’t be defined.
Could I call a custom function in the js file, like on success perhaps?
-
This reply was modified 7 years, 11 months ago by
joelyorca.
try something like this in callback
sending: function(file, xhr, formData) {
formData.append('id', id_of_dom_here);
}
then in wp_dz_ajax_upload_handle function, use
'post_content' => $_REQUEST['id']
Thanks Nazmul, think I’m very close!
Is that in a shortcode do you mean? I’ve tried that like this
<?php echo do_shortcode('[wp-dropzone callback="sending: function(file, xhr, formData) {
formData.append('id', id_of_dom_here);
}"]'); ?>
But I get error.. unexpected id
-
This reply was modified 7 years, 11 months ago by
joelyorca.
-
This reply was modified 7 years, 11 months ago by
joelyorca.
-
This reply was modified 7 years, 11 months ago by
joelyorca.
Try something like this:
<?php echo do_shortcode('[wp-dropzone id="myID" callback="sending: function(file, xhr, formData) {formData.append("id", "myID")}"]'); ?>