update_user_meta inside a popup/modal

From what I can tell, it sounds like you need to be using AJAX to update that user meta. Also you might need to retrieve the “content” with AJAX as well, so as to get the updated information if the popup modal is called again. There is a lot of documentation on AJAX in wordpress, … Read more

How to create different media uploader frames / filter library depending on a custom action

You will have to create two different media modals that are fired depending on your click event. Here is some code from a recent project where I added these buttons to the tinyMCE visual editor: jQuery(document).ready(function($){ $(document).on(‘click’, ‘.mce-my_upload_button’, upload_image_tinymce); $(document).on(‘click’, ‘.mce-my_upload_pdf_button’, upload_pdf_tinymce); function upload_image_tinymce(e) { e.preventDefault(); var $input_field = $(‘.mce-my_input_image’); var custom_uploader = wp.media.frames.file_frame = … Read more

Modal opens all post IDs

So your script is doing exactly what you have told it to do. Here you are passing the element to the function, but you never use it, instead you just query all elements with a class and add another class. function moreinfoModal(field) { console.log(field.id); $(‘.moreinfo-modal’).toggleClass(‘open’); } What you should do is only add the class … Read more

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